2012-02-27 20:49:50 +08:00
|
|
|
PREFIX ?= /usr
|
|
|
|
MANDIR ?= $(PREFIX)/share/man/man1
|
|
|
|
|
2011-11-07 08:20:45 +08:00
|
|
|
PACKAGES = x11 xcomposite xfixes xdamage xrender
|
2011-12-08 02:35:22 +08:00
|
|
|
LIBS = `pkg-config --libs $(PACKAGES)` -lm
|
|
|
|
INCS = `pkg-config --cflags $(PACKAGES)`
|
2011-11-07 08:20:45 +08:00
|
|
|
CFLAGS = -Wall
|
2011-12-08 02:35:22 +08:00
|
|
|
OBJS = compton.o
|
2011-11-07 08:20:45 +08:00
|
|
|
|
2012-02-27 15:42:38 +08:00
|
|
|
%.o: src/%.c src/%.h
|
|
|
|
$(CC) $(CFLAGS) $(INCS) -c src/$*.c
|
2011-11-07 08:20:45 +08:00
|
|
|
|
|
|
|
compton: $(OBJS)
|
|
|
|
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
|
|
|
|
|
|
|
|
install: compton
|
2011-12-08 02:35:22 +08:00
|
|
|
@cp -t $(PREFIX)/bin compton
|
|
|
|
@[ -d "$(MANDIR)" ] \
|
2012-02-27 15:42:38 +08:00
|
|
|
&& cp -t "$(MANDIR)" man/compton.1
|
|
|
|
@cp -t $(PREFIX)/bin bin/settrans
|
2011-11-07 08:20:45 +08:00
|
|
|
|
|
|
|
uninstall:
|
2011-12-08 02:35:22 +08:00
|
|
|
@rm -f $(PREFIX)/bin/compton
|
|
|
|
@rm -f $(MANDIR)/compton.1
|
2012-01-11 04:51:09 +08:00
|
|
|
@rm -f $(PREFIX)/bin/settrans
|
2011-11-07 08:20:45 +08:00
|
|
|
|
|
|
|
clean:
|
2011-12-09 22:46:40 +08:00
|
|
|
@rm -f $(OBJS) compton
|
2011-11-07 08:20:45 +08:00
|
|
|
|
|
|
|
.PHONY: uninstall clean
|