# Makefile for pgm 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 PBMDIR = [-.pbm] LIBPBM = $(PBMDIR)libpbm.olb DEFPBM = $(PBMDIR)pbm.h [-]pbmplus.h DEFLIBPBM = $(PBMDIR)libpbm.h LIBPGM = libpgm.olb LIBPGMUNRAW = libpgmunraw.olb OPT = $(PBMDIR)opt/opt CCUNRAW = $(CC) $(CFLAGS) CFLAGS = $(CFLAGS)/DEFINE=PBMPLUS_RAWBITS BINARIES = fitstopgm.exe fstopgm.exe hipstopgm.exe pgmenhance.exe \ pgmhist.exe pgmnorm.exe pgmtopbm.exe pgmtofits.exe pgmtops.exe \ psidtopgm.exe rawtopgm.exe tifftopgm.exe MANUALS1 = fitstopgm.1 fstopgm.1 hipstopgm.1 pgmenhance.1 pgmhist.1 \ pgmnorm.1 pgmtofits.1 pgmtopbm.1 pgmtops.1 psidtopgm.1 \ rawtopgm.1 tifftopgm.1 MANUALS3 = libpgm.3 MANUALS5 = pgm.5 .first define sys sys$library define c$include [-.pbm],[-] all : binaries $(LIBPGMUNRAW) @ 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,$(LIBPGM)/lib,$(LIBPBM)/lib,$(OPT) # And libraries. $(LIBPGM) : libpgm1.obj libpgm2.obj lib/create $(LIBPGM) libpgm%.obj libpgm1.obj : libpgm1.c pgm.h $(DEFPBM) libpgm.h libpgm2.obj : libpgm2.c pgm.h $(DEFPBM) libpgm.h $(DEFLIBPBM) $(LIBPGMUNRAW) : libpgmunraw1.obj libpgmunraw2.obj lib/create $(LIBPGMUNRAW) libpgmunraw%.obj libpgmunraw1.obj : libpgm1.c pgm.h $(DEFPBM) libpgm.h $(CCUNRAW) $< libpgmunraw2.obj : libpgm2.c pgm.h $(DEFPBM) libpgm.h $(DEFLIBPBM) $(CCUNRAW) $< # Other dependencies. fitstopgm.exe : fitstopgm.obj $(LIBPGM) $(LIBPBM) fitstopgm.obj : fitstopgm.c pgm.h $(DEFPBM) fstopgm.exe : fstopgm.obj $(LIBPGM) $(LIBPBM) fstopgm.obj : fstopgm.c pgm.h $(DEFPBM) hipstopgm.exe : hipstopgm.obj $(LIBPGM) $(LIBPBM) hipstopgm.obj : hipstopgm.c pgm.h $(DEFPBM) pgmenhance.exe : pgmenhance.obj $(LIBPGM) $(LIBPBM) pgmenhance.obj : pgmenhance.c pgm.h $(DEFPBM) pgmhist.exe : pgmhist.obj $(LIBPGM) $(LIBPBM) pgmhist.obj : pgmhist.c pgm.h $(DEFPBM) pgmnorm.exe : pgmnorm.obj $(LIBPGM) $(LIBPBM) pgmnorm.obj : pgmnorm.c pgm.h $(DEFPBM) pgmtofits.exe : pgmtofits.obj $(LIBPGM) $(LIBPBM) pgmtofits.obj : pgmtofits.c pgm.h $(DEFPBM) pgmtopbm.exe : pgmtopbm.obj $(LIBPGM) $(LIBPBM) pgmtopbm.obj : pgmtopbm.c dithers.h $(DEFPBM) pgm.h $(DEFPBM) pgmtops.exe : pgmtops.obj $(LIBPGM) $(LIBPBM) pgmtops.obj : pgmtops.c pgm.h $(DEFPBM) psidtopgm.exe : psidtopgm.obj $(LIBPGM) $(LIBPBM) psidtopgm.obj : psidtopgm.c pgm.h $(DEFPBM) rawtopgm.exe : rawtopgm.obj $(LIBPGM) $(LIBPBM) rawtopgm.obj : rawtopgm.c pgm.h $(DEFPBM) tifftopgm.exe : tifftopgm.obj $(LIBPGM) $(LIBPBM) tifftopgm.obj : tifftopgm.c tiff.h pgm.h $(DEFPBM) clean : - delete/log *.obj;* - delete/log *.olb;* - delete/log *.exe;*