improve make install. closes #9.

This commit is contained in:
Christopher Jeffrey 2012-02-28 08:59:38 -06:00
parent 674ac5b6cd
commit f7b57d527f
1 changed files with 10 additions and 7 deletions

View File

@ -1,4 +1,5 @@
PREFIX ?= /usr
BINDIR ?= $(PREFIX)/bin
MANDIR ?= $(PREFIX)/share/man/man1
PACKAGES = x11 xcomposite xfixes xdamage xrender
@ -14,15 +15,17 @@ compton: $(OBJS)
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
install: compton
@cp compton $(PREFIX)/bin
@[ -d "$(MANDIR)" ] \
&& cp man/compton.1 "$(MANDIR)"
@cp bin/settrans $(PREFIX)/bin
@[ -e "$(PREFIX)" ] || mkdir -p "$(PREFIX)"
@[ -e "$(BINDIR)" ] || mkdir -p "$(BINDIR)"
@[ -e "$(MANDIR)" ] || mkdir -p "$(MANDIR)"
@cp compton "$(BINDIR)"
@cp bin/settrans "$(BINDIR)"
@cp man/compton.1 "$(MANDIR)"
uninstall:
@rm -f $(PREFIX)/bin/compton
@rm -f $(MANDIR)/compton.1
@rm -f $(PREFIX)/bin/settrans
@rm -f "$(BINDIR)/compton"
@rm -f "$(BINDIR)/settrans"
@rm -f "$(MANDIR)/compton.1"
clean:
@rm -f $(OBJS) compton