home *** CD-ROM | disk | FTP | other *** search
Makefile | 1994-02-22 | 5.2 KB | 145 lines |
- # Makefile for pnm 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.
-
- EQ= =
-
- CC = gcc
- CFLAGS = -O2 -DARCH
- TIFFDEF = -DLIBTIFF
- TIFFINC = -I^.libtiff
- TIFFLIB = ^.libtiff.libtiff
- TIFFBINARIES = tifftopnm pnmtotiff
- TIFFOBJECTS = o.tifftopnm o.pnmtotiff
- LDFLAGS =
-
- PPMDIR = ^.ppm
- INCLUDEPPM = -I$(PPMDIR)
- LIBPPM = $(PPMDIR).libppm
- DEFPPM = $(PPMDIR).h.ppm
- DEFLIBPPM = $(PPMDIR).h.libppm
-
- PGMDIR = ^.pgm
- INCLUDEPGM = -I$(PGMDIR)
- LIBPGM = $(PGMDIR).libpgm
- DEFPGM = $(PGMDIR).h.pgm
- DEFLIBPGM = $(PGMDIR).h.libpgm
-
- PBMDIR = ^.pbm
- INCLUDEPBM = -I$(PBMDIR)
- LIBPBM = $(PBMDIR).libpbm
- DEFPBM = $(PBMDIR).h.pbm ^.h.pbmplus
- DEFLIBPBM = $(PBMDIR).h.libpbm
-
- INCLUDE = -I^ $(INCLUDEPPM) $(INCLUDEPGM) $(INCLUDEPBM)
- ALLCFLAGS = $(CFLAGS) $(INCLUDE) $(TIFFDEF) $(TIFFINC)
- LIBPNM = libpnm
-
- PORTOBJECTS = o.giftopnm \
- o.pnmarith o.pnmcat o.pnmcomp o.pnmconvol o.pnmcrop o.pnmcut \
- o.pnmdepth o.pnmenlarge o.pnmfile o.pnmflip o.pnmhistmap \
- o.pnminvert o.pnmnoraw o.pnmpad o.pnmpaste \
- o.pnmtile o.pnmtoddif o.pnmtops o.pnmtorast \
- o.pnmtosir o.pnmtoxwd \
- o.rasttopnm o.sirtopnm o.xwdtopnm o.zeisstopnm \
- o.pnmgamma o.pnmnlfilt o.pnmrotate o.pnmscale o.pnmshear
- OBJECTS = $(PORTOBJECTS) $(TIFFOBJECTS)
-
- all: merge
-
- merge: pnmmerge
- pnmmerge: c.pnmmerge $(OBJECTS) $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM)
- $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c o.* $(LIBPPM) $(LIBPGM) $(LIBPBM) $(TIFFLIB)
-
- lib: $(LIBPNM)
- $(LIBPNM): o.libpnm1 o.libpnm2 o.libpnm3 o.libpnm4
- libfile -co libpnm $^
-
- o.libpnm1: h.pnm $(DEFPPM) $(DEFPGM) $(DEFPBM) c.libpnm1
- $(CC) $(ALLCFLAGS) -c libpnm1.c
- o.libpnm2: h.pnm $(DEFPPM) $(DEFPGM) $(DEFPBM) c.libpnm2 $(DEFLIBPPM) \
- $(DEFLIBPGM) $(DEFLIBPBM)
- $(CC) $(ALLCFLAGS) -c libpnm2.c
- o.libpnm3: h.pnm $(DEFPPM) $(DEFPGM) $(DEFPBM) c.libpnm3 $(DEFLIBPPM) \
- $(DEFLIBPGM) $(DEFLIBPBM)
- $(CC) $(ALLCFLAGS) -c libpnm3.c
- o.libpnm4: h.pnm $(DEFPPM) $(DEFPGM) $(DEFPBM) h.rast c.libpnm4
- $(CC) $(ALLCFLAGS) -c libpnm4.c
-
- # Other dependencies.
- o.pnmnlfilt: c.pnmnlfilt
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)$(basename $@)_main bughuge.c -o $@
- #$(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmnlfilt_main pnmnlfilt.c
- o.giftopnm: c.giftopnm
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)giftopnm_main giftopnm.c
- o.pnmarith: c.pnmarith
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmarith_main pnmarith.c
- o.pnmcat: c.pnmcat
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmcat_main pnmcat.c
- o.pnmcomp: c.pnmcomp
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmcomp_main pnmcomp.c
- o.pnmconvol: c.pnmconvol
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmconvol_main pnmconvol.c
- o.pnmcrop: c.pnmcrop
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmcrop_main pnmcrop.c
- o.pnmcut: c.pnmcut
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmcut_main pnmcut.c
- o.pnmdepth: c.pnmdepth
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmdepth_main pnmdepth.c
- o.pnmenlarge: c.pnmenlarge
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmenlarge_main pnmenlarge.c
- o.pnmfile: c.pnmfile
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmfile_main pnmfile.c
- o.pnmflip: c.pnmflip
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmflip_main pnmflip.c
- o.pnmgamma: c.pnmgamma
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmgamma_main pnmgamma.c
- o.pnmhistmap: c.pnmhistmap
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmhistmap_main pnmhistmap.c
- o.pnminvert: c.pnminvert
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnminvert_main pnminvert.c
- o.pnmnoraw: c.pnmnoraw
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmnoraw_main pnmnoraw.c
- o.pnmpad: c.pnmpad
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmpad_main pnmpad.c
- o.pnmpaste: c.pnmpaste
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmpaste_main pnmpaste.c
- o.pnmrotate: c.pnmrotate
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmrotate_main pnmrotate.c
- o.pnmscale: c.pnmscale
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmscale_main pnmscale.c
- o.pnmshear: c.pnmshear
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmshear_main pnmshear.c
- o.pnmtile: c.pnmtile
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmtile_main pnmtile.c
- o.pnmtoddif: c.pnmtoddif
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmtoddif_main pnmtoddif.c
- o.pnmtops: c.pnmtops
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)$(basename $@)_main bugrept.c -o $@
- #$(CC) $(ALLCFLAGS) -c -Dmain$(EQ)$(basename $@)_main pnmtops.c
- o.pnmtosir: c.pnmtosir
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmtosir_main pnmtosir.c
- o.pnmtorast: c.pnmtorast h.rast
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmtorast_main pnmtorast.c
- o.pnmtotiff: c.pnmtotiff
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmtotiff_main pnmtotiff.c
- o.pnmtoxwd: c.pnmtoxwd h.x11wd
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmtoxwd_main pnmtoxwd.c
- o.rasttopnm: c.rasttopnm h.rast
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)rasttopnm_main rasttopnm.c
- o.sirtopnm: c.sirtopnm
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)sirtopnm_main sirtopnm.c
- o.tifftopnm: c.tifftopnm
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)tifftopnm_main tifftopnm.c
- o.xwdtopnm: c.xwdtopnm h.x10wd h.x11wd
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)xwdtopnm_main xwdtopnm.c
- o.zeisstopnm: c.zeisstopnm
- $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)zeisstopnm_main zeisstopnm.c
-