Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 43 lines (33 sloc) 1.302 kB
a0f4bfb respect cflags and ldflags, default to gcc if CC is unset, fix instal…
hasufell authored
1 CC ?= gcc
2
b01cfea @chjj minor changes
authored
3 PREFIX ?= /usr
24bf591 @chjj destdir
authored
4 BINDIR ?= $(PREFIX)/bin
5 MANDIR ?= $(PREFIX)/share/man/man1
b01cfea @chjj minor changes
authored
6
ee9e90e @richardgv Feature: Configuration file parsing
richardgv authored
7 PACKAGES = x11 xcomposite xfixes xdamage xrender xext libconfig
a0f4bfb respect cflags and ldflags, default to gcc if CC is unset, fix instal…
hasufell authored
8 LIBS = $(shell pkg-config --libs $(PACKAGES)) -lm
0d67243 @richardgv Feature: Issue #29: Alternative shadow blacklist implementation
richardgv authored
9 LIBS += $(shell pcre-config --libs)
a0f4bfb respect cflags and ldflags, default to gcc if CC is unset, fix instal…
hasufell authored
10 INCS = $(shell pkg-config --cflags $(PACKAGES))
0d67243 @richardgv Feature: Issue #29: Alternative shadow blacklist implementation
richardgv authored
11 INCS += $(shell pcre-config --cflags)
12 CFLAGS += -Wall -std=c99
48e0ecc @chjj clean makefile, add transset script
authored
13 OBJS = compton.o
de8b773 @chjj clean tree
authored
14
9139d03 @richardgv Bug fix: #48: Compilation failure with old libconfig/libpcre
richardgv authored
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
8f4eafa @chjj reorganize tree
authored
21 %.o: src/%.c src/%.h
22 $(CC) $(CFLAGS) $(INCS) -c src/$*.c
de8b773 @chjj clean tree
authored
23
24 compton: $(OBJS)
a0f4bfb respect cflags and ldflags, default to gcc if CC is unset, fix instal…
hasufell authored
25 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
de8b773 @chjj clean tree
authored
26
27 install: compton
24bf591 @chjj destdir
authored
28 @install -Dm755 compton "$(DESTDIR)$(BINDIR)"/compton
2a566e8 @chjj rename settrans to compton-trans, add manpage.
authored
29 @install -Dm755 bin/compton-trans "$(DESTDIR)$(BINDIR)"/compton-trans
24bf591 @chjj destdir
authored
30 @install -Dm644 man/compton.1 "$(DESTDIR)$(MANDIR)"/compton.1
2a566e8 @chjj rename settrans to compton-trans, add manpage.
authored
31 @install -Dm644 man/compton-trans.1 "$(DESTDIR)$(MANDIR)"/compton-trans.1
de8b773 @chjj clean tree
authored
32
33 uninstall:
24bf591 @chjj destdir
authored
34 @rm -f "$(DESTDIR)$(BINDIR)/compton"
2a566e8 @chjj rename settrans to compton-trans, add manpage.
authored
35 @rm -f "$(DESTDIR)$(BINDIR)/compton-trans"
24bf591 @chjj destdir
authored
36 @rm -f "$(DESTDIR)$(MANDIR)/compton.1"
2a566e8 @chjj rename settrans to compton-trans, add manpage.
authored
37 @rm -f "$(DESTDIR)$(MANDIR)/compton-trans.1"
de8b773 @chjj clean tree
authored
38
39 clean:
1e2bb55 @chjj disable fading opacity changes
authored
40 @rm -f $(OBJS) compton
de8b773 @chjj clean tree
authored
41
42 .PHONY: uninstall clean
Something went wrong with that request. Please try again.