1# Makefile - makefile for nomarch 2 3CC=gcc 4CFLAGS=-O2 -Wall 5 6# Set BINDIR to directory for binary, 7# MANDIR to directory for man page. 8# Usually it will be simpler to just set PREFIX. 9# 10PREFIX=/usr/local 11BINDIR=$(PREFIX)/bin 12MANDIR=$(PREFIX)/man/man1 13 14# You shouldn't need to edit below this line. 15#-------------------------------------------------------- 16 17OBJ=main.o readrle.o readhuff.o readlzw.o 18 19all: nomarch 20 21nomarch: $(OBJ) 22 $(CC) $(CFLAGS) -o nomarch $(OBJ) 23 24installdirs: 25 /bin/sh ./mkinstalldirs $(BINDIR) $(MANDIR) 26 27install: nomarch installdirs 28 install -m 755 nomarch $(BINDIR) 29 install -m 644 nomarch.1 $(MANDIR) 30 31uninstall: 32 $(RM) $(BINDIR)/nomarch $(MANDIR)/nomarch.1 33 34clean: 35 $(RM) *.o *~ nomarch 36 37 38# stuff to make distribution tgz 39 40VERS=1.4 41 42tgz: ../nomarch-$(VERS).tar.gz 43 44../nomarch-$(VERS).tar.gz: clean 45 @cd ..;ln -s nomarch nomarch-$(VERS) 46 cd ..;tar zchvf nomarch-$(VERS).tar.gz nomarch-$(VERS) 47 @cd ..;$(RM) nomarch-$(VERS) 48