home *** CD-ROM | disk | FTP | other *** search
Makefile | 1994-02-21 | 3.4 KB | 97 lines |
- # Makefile for pgm tools.
- #
- # Copyright (C) 1989, 1991 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.
-
- # Horrible hack again
- EQ = =
-
- CC = gcc
- CFLAGS = -O2 -IUnix:
- LDFLAGS =
-
- PBMDIR = ^.pbm
- INCLUDEPBM = -I$(PBMDIR)
- INCLUDE = -I.. $(INCLUDEPBM)
- LIBPBM = $(PBMDIR).libpbm
- DEFPBM = $(PBMDIR).h.pbm ^.h.pbmplus
- DEFLIBPBM = $(PBMDIR).h.libpbm
-
- ALLCFLAGS = $(CFLAGS) $(INCLUDE)
- LIBPGM = libpgm
-
- OBJECTS = o.biorad2pgm o.fitstopgm o.fstopgm o.hipstopgm o.lispmtopgm \
- o.pbmtopgm o.pgmbentley o.pgmenhance o.pgmhist o.pgmnoise \
- o.pgmnorm o.pgmoil o.pgmramp o.pgmtofits o.pgmtofs o.pgmtolispm \
- o.pgmtopbm o.psidtopgm o.spottopgm \
- o.rawtopgm o.pgmcrater o.pgmedge o.pgmtexture
-
- all: merge
-
- merge: pgmmerge
- pgmmerge: c.pgmmerge $(OBJECTS) $(LIBPGM) $(LIBPBM)
- $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c o.* $(LIBPBM)
-
- $(LIBPGM): o.libpgm1 o.libpgm2
- libfile -co $@ $^
-
- o.libpgm1: h.pgm $(DEFPBM) h.libpgm c.libpgm1
- $(CC) $(ALLCFLAGS) -c libpgm1.c
- o.libpgm2: h.pgm $(DEFPBM) h.libpgm c.libpgm2 $(DEFLIBPBM)
- $(CC) $(ALLCFLAGS) -c libpgm2.c
-
- # Other dependencies.
- o.biorad2pgm: c.biorad2pgm
- $(CC) $(ALLCFLAGS) -c biorad2pgm.c -Dmain$(EQ)bioradtopgm_main
- o.fitstopgm: c.fitstopgm
- $(CC) $(ALLCFLAGS) -c fitstopgm.c -Dmain$(EQ)fitstopgm_main
- o.fstopgm: c.fstopgm
- $(CC) $(ALLCFLAGS) -c fstopgm.c -Dmain$(EQ)fstopgm_main
- o.hipstopgm: c.hipstopgm
- $(CC) $(ALLCFLAGS) -c hipstopgm.c -Dmain$(EQ)hipstopgm_main
- o.lispmtopgm: c.lispmtopgm
- $(CC) $(ALLCFLAGS) -c lispmtopgm.c -Dmain$(EQ)lispmtopgm_main
- o.pbmtopgm: c.pbmtopgm
- $(CC) $(ALLCFLAGS) -c pbmtopgm.c -Dmain$(EQ)pbmtopgm_main
- o.pgmbentley: c.pgmbentley
- $(CC) $(ALLCFLAGS) -c pgmbentley.c -Dmain$(EQ)pgmbentley_main
- o.pgmcrater: c.pgmcrater
- $(CC) $(ALLCFLAGS) -c pgmcrater.c -Dmain$(EQ)pgmcrater_main
- o.pgmedge: c.pgmedge
- $(CC) $(ALLCFLAGS) -c pgmedge.c -Dmain$(EQ)pgmedge_main
- o.pgmenhance: c.pgmenhance
- $(CC) $(ALLCFLAGS) -c pgmenhance.c -Dmain$(EQ)pgmenhance_main
- o.pgmhist: c.pgmhist
- $(CC) $(ALLCFLAGS) -c pgmhist.c -Dmain$(EQ)pgmhist_main
- o.pgmnoise: c.pgmnoise
- $(CC) $(ALLCFLAGS) -c pgmnoise.c -Dmain$(EQ)pgmnoise_main
- o.pgmnorm: c.pgmnorm
- $(CC) $(ALLCFLAGS) -c pgmnorm.c -Dmain$(EQ)pgmnorm_main
- o.pgmoil: c.pgmoil
- $(CC) $(ALLCFLAGS) -c pgmoil.c -Dmain$(EQ)pgmoil_main
- o.pgmramp: c.pgmramp
- $(CC) $(ALLCFLAGS) -c pgmramp.c -Dmain$(EQ)pgmramp_main
- o.pgmtexture: c.pgmtexture
- $(CC) $(ALLCFLAGS) -c bugrept.c -o $@ -Dmain$(EQ)pgmtexture_main
- #$(CC) $(ALLCFLAGS) -c pgmtexture.c -Dmain$(EQ)pgmtexture_main
- o.pgmtopbm: c.pgmtopbm h.dithers $(DEFPBM)
- $(CC) $(ALLCFLAGS) -c pgmtopbm.c -Dmain$(EQ)pgmtopbm_main
- o.pgmtofits: c.pgmtofits
- $(CC) $(ALLCFLAGS) -c pgmtofits.c -Dmain$(EQ)pgmtofits_main
- o.pgmtofs: c.pgmtofs
- $(CC) $(ALLCFLAGS) -c pgmtofs.c -Dmain$(EQ)pgmtofs_main
- o.pgmtolispm: c.pgmtolispm
- $(CC) $(ALLCFLAGS) -c pgmtolispm.c -Dmain$(EQ)pgmtolispm_main
- o.psidtopgm: c.psidtopgm
- $(CC) $(ALLCFLAGS) -c psidtopgm.c -Dmain$(EQ)psidtopgm_main
- o.rawtopgm: c.rawtopgm
- $(CC) $(ALLCFLAGS) -c rawtopgm.c -Dmain$(EQ)rawtopgm_main
- o.spottopgm: c.spottopgm
- $(CC) $(ALLCFLAGS) -c spottopgm.c -Dmain$(EQ)spottopgm_main
-