# Makefile for pnm tools. # # Copyright (C) 1989 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. INSTALLBINARIES = PBMPLUS_INSTALL INSTALLMANUALS1 = /usr/man/mann INSTALLMANUALS3 = /usr/man/mann INSTALLMANUALS5 = /usr/man/mann # CONFIGURE: You can compile PNM without PPM. If you don't want PPM, # comment out the next five lines. This will make the PNM programs use # less memory. SEE ALSO, the .first directive PPMOPT = /define=PPM PPMDIR = [-.ppm] LIBPPM = $(PPMDIR)libppm.olb LIBPPMUNRAW = $(PPMDIR)libppmunraw.olb DEFPPM = $(PPMDIR)ppm.h [-]pbmplus.h DEFLIBPPM = $(PPMDIR)libppm.h # CONFIGURE: Likewise here: if you don't have PGM, comment these lines out. PGMOPT = /define=PGM PGMDIR = [-.pgm] LIBPGM = $(PGMDIR)libpgm.olb LIBPGMUNRAW = $(PGMDIR)libpgmunraw.olb DEFPGM = $(PGMDIR)pgm.h DEFLIBPGM = $(PGMDIR)libpgm.h # PBM is required, don't comment these lines out. PBMOPT = /define=PBM PBMDIR = [-.pbm] LIBPBM = $(PBMDIR)libpbm.olb LIBPBMUNRAW = $(PBMDIR)libpbmunraw.olb DEFPBM = $(PBMDIR)pbm.h DEFLIBPBM = $(PBMDIR)libpbm.h UNRAWFLAGS = $(CFLAGS)/DEFINE=(PPM,PGM,PBM) CFLAGS = $(CFLAGS)/DEFINE=(PPM,PGM,PBM,PBMPLUS_RAWBITS) LIBPNM = libpnm.olb LIBPNMUNRAW = libpnmunraw.olb OPT = $(PBMDIR)opt/opt CCUNRAW = $(CC) $(UNRAWFLAGS) BINARIES = pnmcat.exe pnmcrop.exe pnmcut.exe pnmenlarge.exe pnmflip.exe \ pnminvert.exe pnmpaste.exe pnmtile.exe pnmunraw.exe MANUALS1 = pnmcat.1 pnmcrop.1 pnmcut.1 pnmenlarge.1 pnmflip.1 \ pnminvert.1 pnmpaste.1 pnmtile.1 MANUALS3 = libpnm.3 MANUALS5 = pnm.5 .first define sys sys$library define c$include [-.ppm],[-.pgm],[-.pbm],[-] all : binaries @ continue install : installbinaries installmanuals @ continue # install : installbinaries binaries : $(BINARIES) @ continue installbinaries : binaries copy/log *.exe $(INSTALLBINARIES) installmanuals : @ !cp $(MANUALS1) $(INSTALLMANUALS1) @ !cp $(MANUALS3) $(INSTALLMANUALS3) @ !cp $(MANUALS5) $(INSTALLMANUALS5) # Rule for plain programs. .obj.exe : $(link) $(linkflags) $*.obj,$(LIBPNM)/lib,$(LIBPPM)/lib,$(LIBPGM)/LIB, \ $(LIBPBM)/lib,$(OPT) # And libraries. $(LIBPNM) : libpnm1.obj libpnm2.obj libpnm3.obj lib/cre $(LIBPNM) libpnm%.obj libpnm1.obj : libpnm1.c pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm2.obj : libpnm2.c pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) $(DEFLIBPPM) \ $(DEFLIBPGM) $(DEFLIBPBM) libpnm3.obj : libpnm3.c pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) $(DEFLIBPPM) \ $(DEFLIBPGM) $(DEFLIBPBM) $(LIBPNMUNRAW) : libpnmunraw1.obj libpnmunraw2.obj libpnmunraw3.obj lib/cre $(LIBPNMUNRAW) libpnmunraw%.obj libpnmunraw1.obj : libpnm1.c pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) $(CCUNRAW) $< libpnmunraw2.obj : libpnm2.c pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) $(DEFLIBPPM) \ $(DEFLIBPGM) $(DEFLIBPBM) $(CCUNRAW) $< libpnmunraw3.obj : libpnm3.c pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) $(DEFLIBPPM) \ $(DEFLIBPGM) $(DEFLIBPBM) $(CCUNRAW) $< # Other dependencies. pnmcat.exe : pnmcat.obj $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) pnmcat.obj : pnmcat.c pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) pnmcrop.exe : pnmcrop.obj $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) pnmcrop.obj : pnmcrop.c pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) pnmcut.exe : pnmcut.obj $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) pnmcut.obj : pnmcut.c pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) pnmenlarge.exe : pnmenlarge.obj $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) pnmenlarge.obj : pnmenlarge.c pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) pnmflip.exe : pnmflip.obj $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) pnmflip.obj : pnmflip.c pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) pnminvert.exe : pnminvert.obj $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) pnminvert.obj : pnminvert.c pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) pnmpaste.exe : pnmpaste.obj $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) pnmpaste.obj : pnmpaste.c pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) pnmtile.exe : pnmtile.obj $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) pnmtile.obj : pnmtile.c pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) pnmunraw.exe : pnmunraw.obj $(LIBPNMUNRAW) $(LIBPPMUNRAW) $(LIBPGMUNRAW) \ $(LIBPBMUNRAW) $(link) $(linkflags) $*.obj,$(LIBPNMUNRAW)/lib,$(LIBPPMUNRAW)/lib,\ $(LIBPGMUNRAW)/LIB,$(LIBPBMUNRAW)/lib,$(OPT) pnmunraw.obj : pnmflip.c pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) $(CCUNRAW) $< clean : - delete/log *.obj;* - delete/log *.olb;* - delete/log *.exe;*