--- OLD/Makefile Thu Jan 1 00:00:00 1970 +++ NEW/Makefile Thu Jan 1 00:00:00 1970 @@ -1,3 +1,5 @@ +VERSION := $(.CURDIR:T) + # Makefile for pbmplus tools. # # Copyright (C) 1989, 1991 by Jef Poskanzer. @@ -21,14 +23,14 @@ CC = gcc -ansi -pedantic -fpcc-struct-return # CONFIGURE: cc flags go here. -CFLAGS = -O +CFLAGS != case `uname -m` in vax) echo .O2;; *) echo .O;; esac | tr x. x- #CFLAGS = -g #CFLAGS = -g -O # CONFIGURE: ld flags go here. Eunice users may want to use -noshare so that # the binaries can run standalone. -LDFLAGS = -s -#LDFLAGS = +#LDFLAGS = -s +LDFLAGS = #LDFLAGS = -noshare # CONFIGURE: PBMPLUS's support for TIFF files depends on the library from @@ -56,16 +58,20 @@ # CONFIGURE: Define the directory that you want the binaries copied to. # If you need scripts and binaries to be in different directories, you # can set that up too. -INSTALLBINARIES = /usr/local/netpbm +#INSTALLBINARIES = /usr/local/netpbm +INSTALLBINARIES = /local/.bin/$(VERSION) INSTALLSCRIPTS = $(INSTALLBINARIES) # CONFIGURE: Define the directories that you want the manual sources copied to, # plus the suffix you want them to have. -INSTALLMANUALS1 = /usr/local/man/man1 +#INSTALLMANUALS1 = /usr/local/man/man1 +INSTALLMANUALS1 = /local/.man/$(VERSION)/man1 SUFFIXMANUALS1 = 1 -INSTALLMANUALS3 = /usr/local/man/man3 +#INSTALLMANUALS3 = /usr/local/man/man3 +INSTALLMANUALS3 = /local/.man/$(VERSION)/man3 SUFFIXMANUALS3 = 3 -INSTALLMANUALS5 = /usr/local/man/man5 +#INSTALLMANUALS5 = /usr/local/man/man5 +INSTALLMANUALS5 = /local/.man/$(VERSION)/man5 SUFFIXMANUALS5 = 5 # CONFIGURE: Normally the man pages are installed using "cp". By changing @@ -87,10 +93,10 @@ # # Note that if you make a "merge", the executables don't get created # until you do the install. -#all: binaries -#install: install.bin install.man -all: merge -install: install.merge install.man +all: binaries +install: install.bin install.man +#all: merge +#install: install.merge install.man # End of configurable definitions. @@ -98,8 +104,12 @@ MAKE = make SUBDIRS = pbm pgm ppm pnm -binaries: +binaries: do-stamp-date remake + +do-stamp-date: ./stamp-date + +remake: ( echo "libtiff" ; cd libtiff ; make ) for i in $(SUBDIRS) ; do \ ( echo $$i ; cd $$i ; $(MAKE) $(MFLAGS) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'TIFFDEF=$(TIFFDEF)' 'TIFFINC=$(TIFFINC)' 'TIFFLIB=$(TIFFLIB)' 'TIFFBINARIES=$(TIFFBINARIES)' 'TIFFOBJECTS=$(TIFFOBJECTS)' 'LDFLAGS=$(LDFLAGS)' binaries ); \ @@ -125,6 +135,7 @@ done install.man: + -mkdir -p $(INSTALLMANUALS1) $(INSTALLMANUALS3) $(INSTALLMANUALS5) for i in $(SUBDIRS) ; do \ ( echo $$i ; cd $$i ; $(MAKE) $(MFLAGS) 'TIFFBINARIES=$(TIFFBINARIES)' 'INSTALLMANUALS1=$(INSTALLMANUALS1)' 'SUFFIXMANUALS1=$(SUFFIXMANUALS1)' 'INSTALLMANUALS3=$(INSTALLMANUALS3)' 'SUFFIXMANUALS3=$(SUFFIXMANUALS3)' 'INSTALLMANUALS5=$(INSTALLMANUALS5)' 'SUFFIXMANUALS5=$(SUFFIXMANUALS5)' 'MANCP=$(MANCP)' install.man ); \ done