# http://neil.franklin.ch/Projects/Parport/Makefile # author Neil Franklin, last modification 2007.10.30 # --- various site dependant user config variables # for creating an [-].tar.gz archive DIR = Parport # --- no user configurable stuff below here PREFIX = $(DESTDIR)/usr/local BINDIR = $(PREFIX)/bin MAN1DIR = $(PREFIX)/share/man/man1 # --- code for acting out the various make targets all: @# actual programs need compiling @cc -o parport parport.c @# man pages need making and deleting of compressed versions @gzip -9 -c parport.1 > parport.1.gz clean: @rm -f parport @rm -f parport.1.gz distclean: clean install: @# programs and man pages need installing to and deleting from system @mkdir -p $(BINDIR) @cp -p parport $(BINDIR) @# this program need to be SIUD root to access IO hardware @chown root:root $(BINDIR)/parport @chmod 4755 $(BINDIR)/parport @# alternatively for only group pport users use something like this: @# echo "pport::666:" >> /etc/group @# cp -p parport $(BINDIR) @# chown root:pport $(BINDIR)/parport @# chmod 4750 $(BINDIR)/parport @mkdir -p $(MAN1DIR) @cp -p parport.1.gz $(MAN1DIR) uninstall: @rm -f $(BINDIR)/parport @rm -f $(MAN1DIR)/parport.1.gz # --- project management stuff 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)/Atari_Joystick $(DIR)/FAQ $(DIR)/Extension_Cable \ $(DIR)/INSTALL $(DIR)/LED_Tester $(DIR)/Logfile $(DIR)/Makefile \ $(DIR)/README $(DIR)/index.html.de $(DIR)/index.html.en \ $(DIR)/parport.1 $(DIR)/parport.c )