picom/Makefile

33 lines
736 B
Makefile
Raw Normal View History

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