commit
efd5643858
19
Makefile
19
Makefile
|
@ -1,26 +1,25 @@
|
||||||
|
CC ?= gcc
|
||||||
|
|
||||||
PREFIX ?= /usr
|
PREFIX ?= /usr
|
||||||
BINDIR ?= $(PREFIX)/bin
|
BINDIR ?= $(PREFIX)/bin
|
||||||
MANDIR ?= $(PREFIX)/share/man/man1
|
MANDIR ?= $(PREFIX)/share/man/man1
|
||||||
|
|
||||||
PACKAGES = x11 xcomposite xfixes xdamage xrender
|
PACKAGES = x11 xcomposite xfixes xdamage xrender
|
||||||
LIBS = `pkg-config --libs $(PACKAGES)` -lm
|
LIBS = $(shell pkg-config --libs $(PACKAGES)) -lm
|
||||||
INCS = `pkg-config --cflags $(PACKAGES)`
|
INCS = $(shell pkg-config --cflags $(PACKAGES))
|
||||||
CFLAGS = -Wall
|
CFLAGS += -Wall
|
||||||
OBJS = compton.o
|
OBJS = compton.o
|
||||||
|
|
||||||
%.o: src/%.c src/%.h
|
%.o: src/%.c src/%.h
|
||||||
$(CC) $(CFLAGS) $(INCS) -c src/$*.c
|
$(CC) $(CFLAGS) $(INCS) -c src/$*.c
|
||||||
|
|
||||||
compton: $(OBJS)
|
compton: $(OBJS)
|
||||||
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
|
||||||
|
|
||||||
install: compton
|
install: compton
|
||||||
@[ -e "$(PREFIX)" ] || mkdir -p "$(PREFIX)"
|
@install -Dm755 compton "$(BINDIR)"/compton
|
||||||
@[ -e "$(BINDIR)" ] || mkdir -p "$(BINDIR)"
|
@install -Dm755 bin/settrans "$(BINDIR)"/settrans
|
||||||
@[ -e "$(MANDIR)" ] || mkdir -p "$(MANDIR)"
|
@install -Dm644 man/compton.1 "$(MANDIR)"/compton.1
|
||||||
@cp compton "$(BINDIR)"
|
|
||||||
@cp bin/settrans "$(BINDIR)"
|
|
||||||
@cp man/compton.1 "$(MANDIR)"
|
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
@rm -f "$(BINDIR)/compton"
|
@rm -f "$(BINDIR)/compton"
|
||||||
|
|
Loading…
Reference in New Issue