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
|
2012-02-20 18:38:16 +08:00
|
|
|
PREFIX = /usr
|
2011-12-08 02:35:22 +08:00
|
|
|
MANDIR = $(PREFIX)/share/man/man1
|
|
|
|
OBJS = compton.o
|
2011-11-07 08:20:45 +08:00
|
|
|
|
|
|
|
.c.o:
|
|
|
|
$(CC) $(CFLAGS) $(INCS) -c $*.c
|
|
|
|
|
|
|
|
compton: $(OBJS)
|
|
|
|
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
|
|
|
|
|
|
|
|
$(OBJS): compton.h
|
|
|
|
|
|
|
|
install: compton
|
2011-12-08 02:35:22 +08:00
|
|
|
@cp -t $(PREFIX)/bin compton
|
|
|
|
@[ -d "$(MANDIR)" ] \
|
|
|
|
&& cp -t "$(MANDIR)" compton.1
|
2012-01-11 04:51:09 +08:00
|
|
|
@cp -t $(PREFIX)/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
|