X-Git-Url: http://git.tuebingen.mpg.de/dss.git/log?a=blobdiff_plain;f=Makefile;h=c6780ef026ff86197073c007cf5100a78188cb68;hb=727cf8701027f1d043f75941417dcf315ce5f875;hp=42adf47daadf1c0b1d64c1ecd1578b6ac5cbb29c;hpb=3025388040c1521121255e5ae7ceabdcb1b1e421;p=dss.git diff --git a/Makefile b/Makefile index 42adf47..c6780ef 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,13 @@ +PREFIX ?= /usr/local +INSTALL ?= install +INSTALL_PROGRAM ?= $(INSTALL) +INSTALL_DATA ?= $(INSTALL) -m 644 +MKDIR_P := mkdir -p + VERSION_STRING = 0.1.7 dss_objects := dss.o str.o file.o exec.o sig.o daemon.o df.o tv.o snap.o ipc.o dss.lsg.o -all: dss +all: dss dss.1 man: dss.1 DEBUG_CFLAGS ?= @@ -47,6 +53,15 @@ dss: $(dss_objects) clean: rm -f *.o dss dss.1 dss.1.html Makefile.deps *.png *~ index.html dss.lsg.h dss.lsg.c +ifneq ($(findstring strip, $(MAKECMDGOALS)),) + strip_option := -s +endif +bindir := $(DESTDIR)$(PREFIX)/bin +mandir := $(DESTDIR)$(PREFIX)/share/man/man1 +install install-strip: all + $(MKDIR_P) $(bindir) $(mandir) + $(INSTALL_PROGRAM) $(strip_option) dss $(bindir) + $(INSTALL_DATA) dss.1 $(mandir) index.html: dss.1.html index.html.in INSTALL README NEWS sed -e '/@README@/,$$d' index.html.in > $@