# THIS IS A GENERATED FILE. DO NOT EDIT IT HERE. # Makefile for pbmextras programs. # # Copyright (C) 1989, 1991, 1994, 1999 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 LDFLAGS = -s RGBDEF = -DRGB_DB=\"/usr/lib/X11/rgb\" INSTBINS = /usr/local/bin/pbmextras INSTSCRIPTS = $(INSTBINS) INSTMANS1 = /usr/local/man/man1 SUFFMANS1 = 1 MANCP = cp all: merge install: all install.merge install.scripts install.man INCLUDE = -I../inc ALLCFLAGS = $(CFLAGS) $(RGBDEF) $(INCLUDE) ALLLDFLAGS = -L. $(LDFLAGS) PBMBINS = pbmpscale \ pktopbm \ pbmtopk PBMOBJS = pbmpscale.o \ pktopbm.o \ pbmtopk.o PGMBINS = pgmkernel \ pbmtopgm \ asciitopgm PGMOBJS = pgmkernel.o \ pbmtopgm.o \ asciitopgm.o PPMBINS = PPMOBJS = PNMBINS = pnmhistmap \ pnmpad PNMOBJS = pnmhistmap.o \ pnmpad.o PBMSCRIPTS = PGMSCRIPTS = PPMSCRIPTS = PNMSCRIPTS = pnmtoraw PNMLIB = -L../libpnm -lpnm DEPPNMLIB = ../libpnm/libpnm.a BINS = $(PBMBINS) $(PGMBINS) $(PPMBINS) $(PNMBINS) OBJS = $(PBMOBJS) $(PGMOBJS) $(PPMOBJS) $(PNMOBJS) SCRIPTS = $(PBMSCRIPTS) $(PGMSCRIPTS) $(PPMSCRIPTS) $(PNMSCRIPTS) MANS1 = $(BINS) $(SCRIPTS) pbmextras binaries: $(BINS) install.bin: binaries -mkdir $(INSTBINS) cd $(INSTBINS) ; rm -f $(BINS) cp $(BINS) $(INSTBINS) merge: pbmextras pbmextras: pbmextras.c $(OBJS) $(DEPPNMLIB) $(CC) $(ALLCFLAGS) $(ALLLDFLAGS) -o $@ $@.c $(OBJS) $(PNMLIB) -lm install.merge: merge -mkdir $(INSTBINS) cd $(INSTBINS) ; rm -f $(BINS) cp pbmextras $(INSTBINS) cd $(INSTBINS) ; for i in $(BINS) ; do ln pbmextras $$i ; done rm -f $(INSTBINS)/pbmextras install.scripts: -mkdir $(INSTSCRIPTS) cd $(INSTSCRIPTS) ; rm -f $(SCRIPTS) cp $(SCRIPTS) $(INSTSCRIPTS) cd $(INSTSCRIPTS) ; chmod +x $(SCRIPTS) install.man: for i in $(MANS1) ; do \ rm -f $(INSTMANS1)/$$i.$(SUFFMANS1) ; \ $(MANCP) $$i.1 $(INSTMANS1)/$$i.$(SUFFMANS1) ; \ done clean: rm -f *.o core $(BINS) pbmextras # Rules for binaries. $(PBMBINS) NULL1: ../inc/pbmplus.h ../inc/pbm.h $(DEPPNMLIB) $(CC) $(ALLCFLAGS) $(ALLLDFLAGS) -o $@ $@.c $(PNMLIB) -lm $(PGMBINS) NULL2: ../inc/pbmplus.h ../inc/pbm.h ../inc/pgm.h $(DEPPNMLIB) $(CC) $(ALLCFLAGS) $(ALLLDFLAGS) -o $@ $@.c $(PNMLIB) -lm $(PPMBINS) NULL3: ../inc/pbmplus.h ../inc/pbm.h ../inc/pgm.h ../inc/ppm.h $(DEPPNMLIB) $(CC) $(ALLCFLAGS) $(ALLLDFLAGS) -o $@ $@.c $(PNMLIB) -lm $(PNMBINS) NULL4: ../inc/pbmplus.h ../inc/pbm.h ../inc/pgm.h ../inc/ppm.h ../inc/pnm.h $(DEPPNMLIB) $(CC) $(ALLCFLAGS) $(ALLLDFLAGS) -o $@ $@.c $(PNMLIB) -lm # Rules for objects. $(PBMOBJS) NULL6: ../inc/pbmplus.h ../inc/pbm.h $(CC) $(ALLCFLAGS) "-Dmain=$*_main" -c $*.c $(PGMOBJS) NULL7: ../inc/pbmplus.h ../inc/pbm.h ../inc/pgm.h $(CC) $(ALLCFLAGS) "-Dmain=$*_main" -c $*.c $(PPMOBJS) NULL8: ../inc/pbmplus.h ../inc/pbm.h ../inc/pgm.h ../inc/ppm.h $(CC) $(ALLCFLAGS) "-Dmain=$*_main" -c $*.c $(PNMOBJS) NULL9: ../inc/pbmplus.h ../inc/pbm.h ../inc/pgm.h ../inc/ppm.h ../inc/pnm.h $(CC) $(ALLCFLAGS) "-Dmain=$*_main" -c $*.c all: merge install: all install.merge install.man # Other dependencies. pbmpscale pbmpscale.o: pbmpscale.c pktopbm pktopbm.o: pktopbm.c pbmtopk pbmtopk.o: pbmtopk.c pgmkernel pgmkernel.o: pgmkernel.c pbmtopgm pbmtopgm.o: pbmtopgm.c asciitopgm asciitopgm.o: asciitopgm.c pnmhistmap pnmhistmap.o: pnmhistmap.c pnmpad pnmpad.o: pnmpad.c