Permalink
Newer
Older
100644 43 lines (33 sloc) 1.27 KB
Feb 27, 2012
3
PREFIX ?= /usr
Mar 21, 2012
4
BINDIR ?= $(PREFIX)/bin
5
MANDIR ?= $(PREFIX)/share/man/man1
Feb 27, 2012
6
7
PACKAGES = x11 xcomposite xfixes xdamage xrender xext libconfig
8
LIBS = $(shell pkg-config --libs $(PACKAGES)) -lm
Feature: Issue #29: Alternative shadow blacklist implementation
Sep 22, 2012
9
LIBS += $(shell pcre-config --libs)
10
INCS = $(shell pkg-config --cflags $(PACKAGES))
Feature: Issue #29: Alternative shadow blacklist implementation
Sep 22, 2012
11
INCS += $(shell pcre-config --cflags)
12
CFLAGS += -Wall -std=c99
13
OBJS = compton.o
Nov 7, 2011
14
Bug fix: #48: Compilation failure with old libconfig/libpcre
Sep 28, 2012
15
CFG ?= -DCONFIG_LIBCONFIG -DCONFIG_REGEX_PCRE -DCONFIG_REGEX_PCRE_JIT
16
# libconfig-1.3* does not define LIBCONFIG_VER* macros, so we use pkg-config
17
# to determine its version here
18
CFG += $(shell pkg-config --atleast-version=1.4 libconfig || echo '-DCONFIG_LIBCONFIG_LEGACY')
19
CFLAGS += $(CFG)
20
Feb 27, 2012
21
%.o: src/%.c src/%.h
22
$(CC) $(CFLAGS) $(INCS) -c src/$*.c
Nov 7, 2011
23
24
compton: $(OBJS)
25
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
Nov 7, 2011
26
27
install: compton
Mar 21, 2012
28
@install -Dm755 compton "$(DESTDIR)$(BINDIR)"/compton
29
@install -Dm755 bin/compton-trans "$(DESTDIR)$(BINDIR)"/compton-trans
Mar 21, 2012
30
@install -Dm644 man/compton.1 "$(DESTDIR)$(MANDIR)"/compton.1
31
@install -Dm644 man/compton-trans.1 "$(DESTDIR)$(MANDIR)"/compton-trans.1
Nov 7, 2011
32
33
uninstall:
Mar 21, 2012
34
@rm -f "$(DESTDIR)$(BINDIR)/compton"
35
@rm -f "$(DESTDIR)$(BINDIR)/compton-trans"
Mar 21, 2012
36
@rm -f "$(DESTDIR)$(MANDIR)/compton.1"
37
@rm -f "$(DESTDIR)$(MANDIR)/compton-trans.1"
Nov 7, 2011
38
39
clean:
40
@rm -f $(OBJS) compton
Nov 7, 2011
41
42
.PHONY: uninstall clean