hopefully more packaging-friendly makefile

This commit is contained in:
Erik Ekman 2007-06-17 12:32:16 +00:00
parent 854c7ed1c1
commit 502205f1a1

View File

@ -1,6 +1,11 @@
PREFIX=/usr/local prefix=/usr/local
sbindir=$(prefix)/sbin
datadir=$(prefix)/share
mandir=$(datadir)/man
INSTALL=/usr/bin/install DESTDIR=
INSTALL=install
INSTALL_FLAGS= INSTALL_FLAGS=
MKDIR=mkdir MKDIR=mkdir
@ -13,16 +18,16 @@ all:
@(cd src; make all) @(cd src; make all)
install: all install: all
$(MKDIR) $(MKDIR_FLAGS) $(PREFIX)/sbin $(MKDIR) $(MKDIR_FLAGS) $(DESTDIR)$(sbindir)
$(INSTALL) $(INSTALL_FLAGS) bin/iodine $(PREFIX)/sbin/iodine $(INSTALL) $(INSTALL_FLAGS) bin/iodine $(DESTDIR)$(prefix)/iodine
$(INSTALL) $(INSTALL_FLAGS) bin/iodined $(PREFIX)/sbin/iodined $(INSTALL) $(INSTALL_FLAGS) bin/iodined $(DESTDIR)$(prefix)/iodined
$(MKDIR) $(MKDIR_FLAGS) $(PREFIX)/man/man8 $(MKDIR) $(MKDIR_FLAGS) $(DESTDIR)$(mandir)/man8
$(INSTALL) $(INSTALL_FLAGS) man/iodine.8 $(PREFIX)/man/man8/iodine.8 $(INSTALL) $(INSTALL_FLAGS) man/iodine.8 $(DESTDIR)$(mandir)/man8/iodine.8
uninstall: uninstall:
$(RM) $(RM_FLAGS) $(PREFIX)/sbin/iodine $(RM) $(RM_FLAGS) $(sbindir)/iodine
$(RM) $(RM_FLAGS) $(PREFIX)/sbin/iodined $(RM) $(RM_FLAGS) $(sbindir)/iodined
$(RM) $(RM_FLAGS) $(PREFIX)/man/man8/iodine.8 $(RM) $(RM_FLAGS) $(mandir)/man8/iodine.8
test: all test: all
@(cd tests; make all) @(cd tests; make all)