2012-03-17 21:00:49 -04:00
|
|
|
CC ?= gcc
|
|
|
|
|
2012-02-27 07:49:50 -05:00
|
|
|
PREFIX ?= /usr
|
2012-03-20 20:30:20 -04:00
|
|
|
BINDIR ?= $(PREFIX)/bin
|
|
|
|
MANDIR ?= $(PREFIX)/share/man/man1
|
2012-02-27 07:49:50 -05:00
|
|
|
|
2011-11-06 19:20:45 -05:00
|
|
|
PACKAGES = x11 xcomposite xfixes xdamage xrender
|
2012-03-17 21:00:49 -04:00
|
|
|
LIBS = $(shell pkg-config --libs $(PACKAGES)) -lm
|
|
|
|
INCS = $(shell pkg-config --cflags $(PACKAGES))
|
|
|
|
CFLAGS += -Wall
|
2011-12-07 13:35:22 -05:00
|
|
|
OBJS = compton.o
|
2011-11-06 19:20:45 -05:00
|
|
|
|
2012-02-27 02:42:38 -05:00
|
|
|
%.o: src/%.c src/%.h
|
|
|
|
$(CC) $(CFLAGS) $(INCS) -c src/$*.c
|
2011-11-06 19:20:45 -05:00
|
|
|
|
|
|
|
compton: $(OBJS)
|
2012-03-17 21:00:49 -04:00
|
|
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
|
2011-11-06 19:20:45 -05:00
|
|
|
|
|
|
|
install: compton
|
2012-03-20 20:30:20 -04:00
|
|
|
@install -Dm755 compton "$(DESTDIR)$(BINDIR)"/compton
|
|
|
|
@install -Dm755 bin/settrans "$(DESTDIR)$(BINDIR)"/settrans
|
|
|
|
@install -Dm644 man/compton.1 "$(DESTDIR)$(MANDIR)"/compton.1
|
2011-11-06 19:20:45 -05:00
|
|
|
|
|
|
|
uninstall:
|
2012-03-20 20:30:20 -04:00
|
|
|
@rm -f "$(DESTDIR)$(BINDIR)/compton"
|
|
|
|
@rm -f "$(DESTDIR)$(BINDIR)/settrans"
|
|
|
|
@rm -f "$(DESTDIR)$(MANDIR)/compton.1"
|
2011-11-06 19:20:45 -05:00
|
|
|
|
|
|
|
clean:
|
2011-12-09 09:46:40 -05:00
|
|
|
@rm -f $(OBJS) compton
|
2011-11-06 19:20:45 -05:00
|
|
|
|
|
|
|
.PHONY: uninstall clean
|