# Makefile for pbmplus library. # # Copyright (C) 1994 by Jef Poskanzer. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, provided # that the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation. This software is provided "as is" without express or # implied warranty. # Default values for inherited defines. CC = cc CFLAGS = -O -ansi -pedantic -U__STRICT_ANSI__ -Wall -Wpointer-arith -Wshadow -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wno-long-long RGBDEF = -DRGB_DB=\"/usr/lib/X11/rgb\" INSTMANS3 = /usr/local/man/man3 SUFFMANS3 = 3 INSTMANS5 = /usr/local/man/man5 SUFFMANS5 = 5 MANCP = cp all: libpnm.a install: all install.man INCLUDE = -I../inc ALLCFLAGS = $(CFLAGS) $(RGBDEF) $(INCLUDE) PNMLIBOBJS = libpbm1.o libpbm2.o libpbm3.o libpbm4.o libpbm5.o libpbm6.o \ libpbm7.o \ libpgm1.o libpgm2.o \ libppm1.o libppm2.o libppm3.o libppm4.o libppm5.o \ libpnm1.o libpnm2.o libpnm3.o libpnm4.o libpnm5.o MANS3 = libpbm libpgm libppm libpnm MANS5 = pbm pgm ppm pnm binaries: all merge: all install.bin: install.merge: install.scripts: clean: rm -f *.o *.a core # Rules for library. libpnm.a: $(PNMLIBOBJS) rm -f libpnm.a ar rc libpnm.a $(PNMLIBOBJS) -ranlib libpnm.a install.man: for i in $(MANS3) ; do \ rm -f $(INSTMANS3)/$$i.$(SUFFMANS3) ; \ $(MANCP) $$i.3 $(INSTMANS3)/$$i.$(SUFFMANS3) ; \ done for i in $(MANS5) ; do \ rm -f $(INSTMANS5)/$$i.$(SUFFMANS5) ; \ $(MANCP) $$i.5 $(INSTMANS5)/$$i.$(SUFFMANS5) ; \ done # Library dependencies. libpbm1.o: ../inc/pbmplus.h ../inc/pbm.h ../inc/libpbm.h ../inc/version.h libpbm1.c $(CC) $(ALLCFLAGS) -c libpbm1.c libpbm2.o: ../inc/pbmplus.h ../inc/pbm.h ../inc/libpbm.h libpbm2.c $(CC) $(ALLCFLAGS) -c libpbm2.c libpbm3.o: ../inc/pbmplus.h ../inc/pbm.h ../inc/libpbm.h libpbm3.c $(CC) $(ALLCFLAGS) -c libpbm3.c libpbm4.o: ../inc/pbmplus.h ../inc/pbm.h ../inc/libpbm.h libpbm4.c $(CC) $(ALLCFLAGS) -c libpbm4.c libpbm5.o: ../inc/pbmplus.h ../inc/pbm.h ../inc/libpbm.h ../inc/pbmfont.h libpbm5.c $(CC) $(ALLCFLAGS) -c libpbm5.c libpbm6.o: ../inc/pbmplus.h ../inc/pbm.h ../inc/libpbm.h libpbm6.c $(CC) $(ALLCFLAGS) -c libpbm6.c libpbm7.o: ../inc/pbmplus.h ../inc/pbm.h ../inc/libpbm.h libpbm7.c $(CC) $(ALLCFLAGS) -c libpbm7.c libpgm1.o: ../inc/pbmplus.h ../inc/pbm.h ../inc/libpbm.h ../inc/pgm.h ../inc/libpgm.h libpgm1.c $(CC) $(ALLCFLAGS) -c libpgm1.c libpgm2.o: ../inc/pbmplus.h ../inc/pbm.h ../inc/libpbm.h ../inc/pgm.h ../inc/libpgm.h libpgm2.c $(CC) $(ALLCFLAGS) -c libpgm2.c libppm1.o: ../inc/pbmplus.h ../inc/pbm.h ../inc/libpbm.h ../inc/pgm.h ../inc/libpgm.h ../inc/ppm.h ../inc/libppm.h libppm1.c $(CC) $(ALLCFLAGS) -c libppm1.c libppm2.o: ../inc/pbmplus.h ../inc/pbm.h ../inc/libpbm.h ../inc/pgm.h ../inc/libpgm.h ../inc/ppm.h ../inc/libppm.h libppm2.c $(CC) $(ALLCFLAGS) -c libppm2.c libppm3.o: ../inc/pbmplus.h ../inc/pbm.h ../inc/libpbm.h ../inc/pgm.h ../inc/libpgm.h ../inc/ppm.h ../inc/libppm.h ../inc/ppmcmap.h libppm3.c $(CC) $(ALLCFLAGS) -c libppm3.c libppm4.o: ../inc/pbmplus.h ../inc/pbm.h ../inc/libpbm.h ../inc/pgm.h ../inc/libpgm.h ../inc/ppm.h ../inc/libppm.h libppm4.c $(CC) $(ALLCFLAGS) -c libppm4.c libppm5.o: ../inc/pbmplus.h ../inc/pbm.h ../inc/libpbm.h ../inc/pgm.h ../inc/libpgm.h ../inc/ppm.h ../inc/libppm.h ../inc/ppmdraw.h libppm5.c $(CC) $(ALLCFLAGS) -c libppm5.c libpnm1.o: ../inc/pbmplus.h ../inc/pbm.h ../inc/libpbm.h ../inc/pgm.h ../inc/libpgm.h ../inc/ppm.h ../inc/libppm.h ../inc/pnm.h libpnm1.c $(CC) $(ALLCFLAGS) -c libpnm1.c libpnm2.o: ../inc/pbmplus.h ../inc/pbm.h ../inc/libpbm.h ../inc/pgm.h ../inc/libpgm.h ../inc/ppm.h ../inc/libppm.h ../inc/pnm.h libpnm2.c $(CC) $(ALLCFLAGS) -c libpnm2.c libpnm3.o: ../inc/pbmplus.h ../inc/pbm.h ../inc/libpbm.h ../inc/pgm.h ../inc/libpgm.h ../inc/ppm.h ../inc/libppm.h ../inc/pnm.h libpnm3.c $(CC) $(ALLCFLAGS) -c libpnm3.c libpnm4.o: ../inc/pbmplus.h ../inc/pbm.h ../inc/libpbm.h ../inc/pgm.h ../inc/libpgm.h ../inc/ppm.h ../inc/libppm.h ../inc/pnm.h ../inc/rast.h libpnm4.c $(CC) $(ALLCFLAGS) -c libpnm4.c libpnm5.o: ../inc/pbmplus.h ../inc/pbm.h ../inc/libpbm.h ../inc/pgm.h ../inc/libpgm.h ../inc/ppm.h ../inc/libppm.h ../inc/pnm.h ../inc/rast.h libpnm5.c $(CC) $(ALLCFLAGS) -c libpnm5.c