# http://www.phys.ethz.ch/~franklin/Projects/dphys2/Makefile # copyright ETH Zuerich Physics Departement, # use under either BSD or GPL license # author Neil Franklin, last modification 2004.02.13 # this Makefile is intended to be run as root, it will fail if run as user! # --- read in setup # needed to set SYS_[RESC|ROOT]WORK, so that we can even test what to do # this is shared by Makefile, makerescue, makeroot, dbootstrap -include ./setup-dphys2 # --- various site dependant user config variables # for creating an [-].tar.gz archive DIR = dphys2 # --- no user configurable stuff below here # make root as the default action .PHONY: all all: root # keep the old make install and make installorig .PHONY: install install: installroot .PHONY: installorig installorig: installorigroot # --- code for acting out the various make targets # --- make an rescue floppy .PHONY: rescue rescue: $(SYS_RESCWORK)/rescue-dphys.bin $(SYS_RESCWORK)/rescue-dphys.bin: Makefile makerescue setup-dphys2 @# --- download Debian image, compile/insert own kernel, make drivers @# if own kernel, also make own drivers archive as side effekt @/bin/echo making custom rescue disk image and drivers archive ... @./makerescue .PHONY: installrescue installrescue: $(SYS_RESCWORK)/rescue-dphys.bin @# --- install is just copy to floppy @/bin/echo installing custom rescue image on floppy ... @/bin/dd if=$(SYS_RESCWORK)/rescue-dphys.bin of=$(CONF_INST_FLOPPY) \ bs=1024 $(SYS_RESCWORK)/rescue.bin: $(SYS_RESCWORK)/rescue-dphys.bin .PHONY: installorigrescue installorigrescue: $(SYS_RESCWORK)/rescue.bin @# --- install is just copy to floppy @/bin/echo installing original rescue image on floppy ... @/bin/dd if=$(SYS_RESCWORK)/rescue.bin of=$(CONF_INST_FLOPPY) bs=1024 # --- make an root floppy .PHONY: root root: $(SYS_ROOTWORK)/root-dphys.bin $(SYS_ROOTWORK)/root-dphys.bin: Makefile makeroot setup-dphys2 \ dbootstrap sfdisk lilo.conf debconf-preload endfirstrun @# --- download Debian image, insert changes (incl drivers subset) @/bin/echo making custom root disk image ... @./makeroot .PHONY: installroot installroot: $(SYS_ROOTWORK)/root-dphys.bin @# --- install is just copy to floppy @/bin/echo installing custom root image on floppy ... @/bin/dd if=$(SYS_ROOTWORK)/root-dphys.bin of=$(CONF_INST_FLOPPY) \ bs=1024 $(SYS_ROOTWORK)/root.bin: $(SYS_ROOTWORK)/root-dphys.bin .PHONY: installorigroot installorigroot: $(SYS_ROOTWORK)/root.bin @# --- install is just copy to floppy @/bin/echo installing original root image on floppy ... @/bin/dd if=$(SYS_ROOTWORK)/root.bin of=$(CONF_INST_FLOPPY) bs=1024 # --- tidy up .PHONY: clean clean: @# --- delete work directory @/bin/echo cleaning up work directory contents ... @if [ -d $(SYS_RESCWORK) -o -d $(SYS_ROOTWORK) ] ; then \ /bin/rm -rf $(SYS_RESCWORK)/* $(SYS_ROOTWORK)/* ; \ else \ /bin/echo nothing to clean up ; \ fi # --- project managment stuff .PHONY: ci ci: @# the -r?.? has to fixed before each make ci @# best on the first Makefile edit after last make ci @/bin/echo checking source files into RCS archive ... @/usr/bin/ci -l -r3.3 FAQ INSTALL Makefile Makefile.debian-local \ README dbootstrap debconf-preload dphys-setup.pl endfirstrun \ index.html.en makepackage makerescue makeroot makesourcepackage \ potato_today setup-dphys2 woody_new .PHONY: tar tar: @# package this project into an .tar.gz for one nice download @/bin/echo packaging source and doc files into an .tar.gz ... @(cd ..; /bin/tar zcf $(DIR).tar.gz \ $(DIR)/FAQ $(DIR)/INSTALL $(DIR)/Logfile $(DIR)/Makefile \ $(DIR)/Makefile.debian-local $(DIR)/RCS $(DIR)/README \ $(DIR)/dbootstrap $(DIR)/debconf-preload $(DIR)/dphys-setup.pl \ $(DIR)/dphys2-swapfile_* \ $(DIR)/endfirstrun $(DIR)/index.html.de $(DIR)/index.html.en \ $(DIR)/lilo.conf $(DIR)/makepackage $(DIR)/makerescue \ $(DIR)/makeroot $(DIR)/makesourcepackage $(DIR)/potato_today \ $(DIR)/setup-dphys2 $(DIR)/sfdisk $(DIR)/woody_new )