hopefully more packaging-friendly makefile

This commit is contained in:
Erik Ekman 2007-06-17 12:32:16 +00:00 committed by Erik Ekman
parent df926094a5
commit 56f0a0c6a0
1 changed files with 15 additions and 10 deletions

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=
MKDIR=mkdir
@ -13,16 +18,16 @@ all:
@(cd src; make all)
install: all
$(MKDIR) $(MKDIR_FLAGS) $(PREFIX)/sbin
$(INSTALL) $(INSTALL_FLAGS) bin/iodine $(PREFIX)/sbin/iodine
$(INSTALL) $(INSTALL_FLAGS) bin/iodined $(PREFIX)/sbin/iodined
$(MKDIR) $(MKDIR_FLAGS) $(PREFIX)/man/man8
$(INSTALL) $(INSTALL_FLAGS) man/iodine.8 $(PREFIX)/man/man8/iodine.8
$(MKDIR) $(MKDIR_FLAGS) $(DESTDIR)$(sbindir)
$(INSTALL) $(INSTALL_FLAGS) bin/iodine $(DESTDIR)$(prefix)/iodine
$(INSTALL) $(INSTALL_FLAGS) bin/iodined $(DESTDIR)$(prefix)/iodined
$(MKDIR) $(MKDIR_FLAGS) $(DESTDIR)$(mandir)/man8
$(INSTALL) $(INSTALL_FLAGS) man/iodine.8 $(DESTDIR)$(mandir)/man8/iodine.8
uninstall:
$(RM) $(RM_FLAGS) $(PREFIX)/sbin/iodine
$(RM) $(RM_FLAGS) $(PREFIX)/sbin/iodined
$(RM) $(RM_FLAGS) $(PREFIX)/man/man8/iodine.8
$(RM) $(RM_FLAGS) $(sbindir)/iodine
$(RM) $(RM_FLAGS) $(sbindir)/iodined
$(RM) $(RM_FLAGS) $(mandir)/man8/iodine.8
test: all
@(cd tests; make all)