# http://www.phys.ethz.ch/~franklin/Projects/dphys3/Makefile # author Neil Franklin, last modification 2006.11.03 # copyright ETH Zuerich Physics Departement, # use under either BSD or GPL license # --- various site dependant user config variables # for creating an [-].tar.gz archive DIR = dphys3 # --- no user configurable stuff below here PATH=/sbin:/bin:/usr/sbin:/usr/bin PREFIX = $(DESTDIR)/usr BINDIR = $(PREFIX)/bin LIBDIR = $(PREFIX)/lib/dphys3 UDEBDIR = $(LIBDIR)/udeb SBINDIR = $(PREFIX)/sbin MAN1DIR = $(PREFIX)/share/man/man1 MAN7DIR = $(PREFIX)/share/man/man7 MAN8DIR = $(PREFIX)/share/man/man8 DOCDIR = $(PREFIX)/share/doc/dphys3 EXADIR = $(DOCDIR)/examples # --- code for acting out the various make targets all: @gzip -9 -c dphys3.7 > dphys3.7.gz @gzip -9 -c dphys3kernel.1 > dphys3kernel.1.gz @gzip -9 -c dphys3preseed.1 > dphys3preseed.1.gz @gzip -9 -c dphys3boot.1 > dphys3boot.1.gz @gzip -9 -c dphys3root.1 > dphys3root.1.gz @gzip -9 -c dphys3cd.1 > dphys3cd.1.gz @gzip -9 -c dphys3pxe.1 > dphys3pxe.1.gz clean: @rm -f dphys3pxe.1.gz @rm -f dphys3cd.1.gz @rm -f dphys3root.1.gz @rm -f dphys3boot.1.gz @rm -f dphys3preseed.1.gz @rm -f dphys3kernel.1.gz @rm -f dphys3.7.gz distclean: clean install: @mkdir -p $(BINDIR) @cp -p dphys3kernel $(BINDIR) @cp -p dphys3preseed $(BINDIR) @cp -p dphys3boot $(BINDIR) @cp -p dphys3root $(BINDIR) @cp -p dphys3cd $(BINDIR) @cp -p dphys3pxe $(BINDIR) @mkdir -p $(UDEBDIR) @cp -p preseed-common_1.10_all.udeb $(UDEBDIR) @cp -p initrd-preseed_1.10_all.udeb $(UDEBDIR) @mkdir -p $(MAN1DIR) @cp -p dphys3kernel.1.gz $(MAN1DIR) @cp -p dphys3preseed.1.gz $(MAN1DIR) @cp -p dphys3boot.1.gz $(MAN1DIR) @cp -p dphys3root.1.gz $(MAN1DIR) @cp -p dphys3cd.1.gz $(MAN1DIR) @cp -p dphys3pxe.1.gz $(MAN1DIR) @mkdir -p $(MAN7DIR) @cp -p dphys3.7.gz $(MAN7DIR) @mkdir -p $(DOCDIR) @cp -p index.html.en $(DOCDIR) @cp -p QUICK_GUIDE $(DOCDIR) @cp -p sarge-install-process.html $(DOCDIR) @mkdir -p $(EXADIR) @cp -p dphys3.example $(EXADIR) @cp -p end0stage.dphys $(EXADIR) @cp -p end1stage.dphys $(EXADIR) @cp -p end2stage.simple $(EXADIR) @cp -p end2stage.dphys $(EXADIR) uninstall: @rm -f $(EXADIR)/end2stage.dphys @rm -f $(EXADIR)/end2stage.simple @rm -f $(EXADIR)/end1stage.dphys @rm -f $(EXADIR)/end0stage.dphys @rm -f $(EXADIR)/dphys3.example @rmdir $(EXADIR) @rm -f $(DOCDIR)/sarge-install-process.html @rm -f $(DOCDIR)/QUICK_GUIDE @rm -f $(DOCDIR)/index.html.en @rmdir $(DOCDIR) @rm -f $(MAN7DIR)/dphys3.7.gz @rm -f $(MAN1DIR)/dphys3pxe.1.gz @rm -f $(MAN1DIR)/dphys3cd.1.gz @rm -f $(MAN1DIR)/dphys3root.1.gz @rm -f $(MAN1DIR)/dphys3boot.1.gz @rm -f $(MAN1DIR)/dphys3preseed.1.gz @rm -f $(MAN1DIR)/dphys3kernel.1.gz @rm -f $(UDEBDIR)/initrd-preseed_1.10_all.udeb @rm -f $(UDEBDIR)/preseed-common_1.10_all.udeb @rmdir $(UDEBDIR) @rm -f $(BINDIR)/dphys3pxe @rm -f $(BINDIR)/dphys3cd @rm -f $(BINDIR)/dphys3root @rm -f $(BINDIR)/dphys3boot @rm -f $(BINDIR)/dphys3preseed @rm -f $(BINDIR)/dphys3kernel # --- project management stuff .PHONY: tar tar: @# package this project into an .tar.gz for one nice download @echo packaging source and doc files into an .tar.gz ... @(cd ..; tar zcf $(DIR).tar.gz \ $(DIR)/FAQ $(DIR)/INSTALL $(DIR)/Logfile $(DIR)/Makefile \ $(DIR)/QUICK_GUIDE $(DIR)/README $(DIR)/dphys3.example \ $(DIR)/dphys3.7 $(DIR)/dphys3boot $(DIR)/dphys3boot.1 \ $(DIR)/dphys3cd $(DIR)/dphys3cd.1 $(DIR)/dphys3kernel \ $(DIR)/dphys3kernel.1 $(DIR)/dphys3preseed $(DIR)/dphys3preseed.1 \ $(DIR)/dphys3pxe $(DIR)/dphys3pxe.1 $(DIR)/dphys3root \ $(DIR)/dphys3root.1 $(DIR)/end0stage.dphys $(DIR)/end1stage.dphys \ $(DIR)/end2stage.simple $(DIR)/end2stage.dphys $(DIR)/index.html.de \ $(DIR)/index.html.en $(DIR)/initrd-preseed_1.10_all.udeb \ $(DIR)/planning $(DIR)/preseed-common_1.10_all.udeb \ $(DIR)/sarge-install-process.html )