improve make install. closes #9.
This commit is contained in:
parent
674ac5b6cd
commit
f7b57d527f
17
Makefile
17
Makefile
|
@ -1,4 +1,5 @@
|
||||||
PREFIX ?= /usr
|
PREFIX ?= /usr
|
||||||
|
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
|
||||||
|
@ -14,15 +15,17 @@ compton: $(OBJS)
|
||||||
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
|
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
|
||||||
|
|
||||||
install: compton
|
install: compton
|
||||||
@cp compton $(PREFIX)/bin
|
@[ -e "$(PREFIX)" ] || mkdir -p "$(PREFIX)"
|
||||||
@[ -d "$(MANDIR)" ] \
|
@[ -e "$(BINDIR)" ] || mkdir -p "$(BINDIR)"
|
||||||
&& cp man/compton.1 "$(MANDIR)"
|
@[ -e "$(MANDIR)" ] || mkdir -p "$(MANDIR)"
|
||||||
@cp bin/settrans $(PREFIX)/bin
|
@cp compton "$(BINDIR)"
|
||||||
|
@cp bin/settrans "$(BINDIR)"
|
||||||
|
@cp man/compton.1 "$(MANDIR)"
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
@rm -f $(PREFIX)/bin/compton
|
@rm -f "$(BINDIR)/compton"
|
||||||
@rm -f $(MANDIR)/compton.1
|
@rm -f "$(BINDIR)/settrans"
|
||||||
@rm -f $(PREFIX)/bin/settrans
|
@rm -f "$(MANDIR)/compton.1"
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@rm -f $(OBJS) compton
|
@rm -f $(OBJS) compton
|
||||||
|
|
Loading…
Reference in New Issue