PNMBINS = $(PNMPLAINBINS) $(PNMTIFFBINS) PNMOBJS = $(PNMPLAINOBJS) $(PNMTIFFOBJS) 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) pbmplus binaries: $(BINS) install.bin: binaries -mkdir $(INSTBINS) cd $(INSTBINS) ; rm -f $(BINS) cp $(BINS) $(INSTBINS) merge: pbmplus pbmplus: pbmplus.c $(OBJS) $(DEPPNMLIB) $(DEPTIFFLIB) $(CC) $(ALLCFLAGS) $(ALLLDFLAGS) -o $@ $@.c $(OBJS) $(PNMLIB) $(TIFFLIB) -lm install.merge: merge -mkdir $(INSTBINS) cd $(INSTBINS) ; rm -f $(BINS) cp pbmplus $(INSTBINS) cd $(INSTBINS) ; for i in $(BINS) ; do ln pbmplus $$i ; done rm -f $(INSTBINS)/pbmplus 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) pbmplus # 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 $(PNMPLAINBINS) NULL4: ../inc/pbmplus.h ../inc/pbm.h ../inc/pgm.h ../inc/ppm.h ../inc/pnm.h $(DEPPNMLIB) $(CC) $(ALLCFLAGS) $(ALLLDFLAGS) -o $@ $@.c $(PNMLIB) -lm $(PNMTIFFBINS) NULL5: ../inc/pbmplus.h ../inc/pbm.h ../inc/pgm.h ../inc/ppm.h ../inc/pnm.h $(DEPPNMLIB) $(DEPTIFFLIB) $(CC) $(ALLCFLAGS) $(ALLLDFLAGS) -o $@ $@.c $(PNMLIB) $(TIFFLIB) -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. cmuwmtopbm cmuwmtopbm.o pbmtocmuwm pbmtocmuwm.o: cmuwm.h g3topbm g3topbm.o pbmtog3 pbmtog3.o: g3.h macptopbm macptopbm.o pbmtomacp pbmtomacp.o: macp.h mgrtopbm mgrtopbm.o pbmtomgr pbmtomgr.o: mgr.h pbmtext pbmtext.o ppmtomitsu ppmtomitsu.o \ picttoppm picttoppm.o: ../inc/pbmfont.h ilbmtoppm ilbmtoppm.o ppmtoilbm ppmtoilbm.o: ilbm.h ppmpat ppmpat.o sldtoppm sldtoppm.o: ../inc/ppmdraw.h pgmtopbm pgmtopbm.o: ../inc/dithers.h sldtoppm sldtoppm.o ppmtoacad ppmtoacad.o: autocad.h ppmtotga ppmtotga.o tgatoppm tgatoppm.o: tga.h ximtoppm ximtoppm.o: xim.h pnmtorast pnmtorast.o rasttopnm rasttopnm.o: ../inc/rast.h pnmtoxwd pnmtoxwd.o xwdtopnm xwdtopnm.o: x11wd.h xwdtopnm xwdtopnm.o: x10wd.h pnmtogif pnmtogif.o pnmtorast pnmtorast.o \ pnmtosir pnmtosir.o pnmtotiff pnmtotiff.o \ pnmtoxwd pnmtoxwd.o ppmdist ppmdist.o \ ppmhist ppmhist.o ppmquant ppmquant.o \ ppmtoacad ppmtoacad.o ppmtobmp ppmtobmp.o \ ppmtoicr ppmtoicr.o ppmtoilbm ppmtoilbm.o \ ppmtomitsu ppmtomitsu.o ppmtopcx ppmtopcx.o \ ppmtopi1 ppmtopi1.o ppmtopict ppmtopict.o \ ppmtopjxl ppmtopjxl.o ppmtopuzz ppmtopuzz.o \ ppmtosixel ppmtosixel.o ppmtotga ppmtotga.o \ ppmtouil ppmtouil.o ppmtoxpm ppmtoxpm.o: ../inc/ppmcmap.h ppmtopgm ppmtopgm.o ppmnorm ppmnorm.o \ ppmtoilbm ppmtoilbm.o: ../inc/lum.h bmptoppm bmptoppm.o ppmtobmp ppmtobmp.o: bmp.h ppmtomitsu ppmtomitsu.o: mitsu.h sgitopnm sgitopnm.o pnmtosgi pnmtosgi.o: sgi.h