picom/Makefile

35 lines
917 B
Makefile
Raw Normal View History

CC ?= gcc
2012-02-27 20:49:50 +08:00
PREFIX ?= /usr
2012-03-21 08:30:20 +08:00
BINDIR ?= $(PREFIX)/bin
MANDIR ?= $(PREFIX)/share/man/man1
2012-02-27 20:49:50 +08:00
PACKAGES = x11 xcomposite xfixes xdamage xrender xext
LIBS = $(shell pkg-config --libs $(PACKAGES)) -lm
INCS = $(shell pkg-config --cflags $(PACKAGES))
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) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
2011-11-07 08:20:45 +08:00
install: compton
2012-03-21 08:30:20 +08:00
@install -Dm755 compton "$(DESTDIR)$(BINDIR)"/compton
@install -Dm755 bin/compton-trans "$(DESTDIR)$(BINDIR)"/compton-trans
2012-03-21 08:30:20 +08:00
@install -Dm644 man/compton.1 "$(DESTDIR)$(MANDIR)"/compton.1
@install -Dm644 man/compton-trans.1 "$(DESTDIR)$(MANDIR)"/compton-trans.1
2011-11-07 08:20:45 +08:00
uninstall:
2012-03-21 08:30:20 +08:00
@rm -f "$(DESTDIR)$(BINDIR)/compton"
@rm -f "$(DESTDIR)$(BINDIR)/compton-trans"
2012-03-21 08:30:20 +08:00
@rm -f "$(DESTDIR)$(MANDIR)/compton.1"
@rm -f "$(DESTDIR)$(MANDIR)/compton-trans.1"
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