home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
NETWORK
/
netpbm_src.lzh
/
NETPBM
/
PPM
/
Makefile
< prev
next >
Wrap
Makefile
|
1998-03-19
|
6KB
|
154 lines
# Makefile for ppm 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.
# Default values, usually overridden by top-level Makefile.
CC = gcc2
CFLAGS = -ansi -O -m68000 -ucc -T/r0 -D_OSK -DOSK -I.. -mremote
RGBDEF = -DRGB_DB="""/dd/sys/rgb.txt"""
ODIR = .
LDFLAGS = -L/dd/lib -nocol -m68000 -los9lib.l -ctrap -l/dd/blarslib/blarslib.l
PGMDIR = ../pgm
INCLUDEPGM = -I$(PGMDIR)
LIBPGM = $(PGMDIR)/libpgm.l
DEFPGM = $(PGMDIR)/pgm.h
DEFLIBPGM = $(PGMDIR)/libpgm.h
PBMDIR = ../pbm
INCLUDEPBM = -I$(PBMDIR)
LIBPBM = $(PBMDIR)/libpbm.l
DEFPBM = $(PBMDIR)/pbm.h ../pbmplus.h
DEFLIBPBM = $(PBMDIR)/libpbm.h
SHELL = ksh
INCLUDE = -I.. $(INCLUDEPGM) $(INCLUDEPBM)
ALLCFLAGS = $(CFLAGS) $(RGBDEF) $(INCLUDE)
LIBPPM = libppm.l
BINARIES = bmptoppm gouldtoppm hpcdtoppm ilbmtoppm imgtoppm mtvtoppm \
pcxtoppm pgmtoppm pi1toppm picttoppm \
pjtoppm ppm3d ppmbrighten ppmchange ppmdim ppmdist ppmdither ppmflash ppmhist ppmmake \
ppmmix ppmnorm ppmntsc ppmquant ppmrelief ppmshift ppmspread ppmtoacad \
ppmtobmp ppmtogif ppmtoicr \
ppmtoilbm ppmtomitsu ppmtopcx ppmtopgm ppmtopi1 ppmtopict \
ppmtopj ppmtopjxl ppmtopuzz ppmtorgb3 ppmtosixel \
ppmtotga ppmtouil ppmtoxpm ppmtoyuv ppmtoyuvsplit qrttoppm \
rawtoppm rgb3toppm sldtoppm spctoppm sputoppm \
tgatoppm ximtoppm xpmtoppm xvminitoppm yuvtoppm yuvsplittoppm \
ppmforge ppmpat ppmqvga ppmtomap
SCRIPTS = ppmquantall
OBJECTS = bmptoppm.r gouldtoppm.r hpcdtoppm.r ilbmtoppm.r imgtoppm.r mtvtoppm.r \
pcxtoppm.r pgmtoppm.r pi1toppm.r picttoppm.r \
pjtoppm.r ppm3d.r ppmbrighten.r ppmchange.r ppmdim.r ppmdist.r ppmdither.r ppmflash.r ppmhist.r ppmmake.r \
ppmmix.r ppmnorm.r ppmntsc.r ppmquant.r ppmrelief.r ppmshift.r ppmspread.r ppmtoacad.r \
ppmtobmp.r ppmtogif.r ppmtoicr.r \
ppmtoilbm.r ppmtomitsu.r ppmtopcx.r ppmtopgm.r ppmtopi1.r ppmtopict.r \
ppmtopj.r ppmtopjxl.r ppmtopuzz.r ppmtorgb3.r ppmtosixel.r \
ppmtotga.r ppmtouil.r ppmtoxpm.r ppmtoyuv.r ppmtoyuvsplit.r qrttoppm.r \
rawtoppm.r rgb3toppm.r sldtoppm.r spctoppm.r sputoppm.r \
tgatoppm.r ximtoppm.r xpmtoppm.r xvminitoppm.r yuvtoppm.r yuvsplittoppm.r \
ppmforge.r ppmpat.r ppmqvga.r ppmtomap.r
.c.r:
$(CC) $(CFLAGS) -c -o $*.r $*.c
all.done: $(BINARIES)
echo all done
merge: ppmmerge
ppmmerge: ppmmerge.c $(OBJECTS) $(LIBPPM) $(LIBPGM) $(LIBPBM)
$(CC) $(ALLCFLAGS) $(LDFLAGS) -o ../cmds/$@ $@.c $(OBJECTS) -l$(LIBPPM)\
-l$(LIBPGM) -l$(LIBPBM)
# Rule for plain programs.
$(BINARIES): ppm.h $(DEFPGM) $(DEFPBM) $(LIBPPM) $(LIBPGM) $(LIBPBM)
$(CC) $(ALLCFLAGS) $(LDFLAGS) -o ../cmds/$@ $@.c -l$(LIBPPM) -l$(LIBPGM) -l$(LIBPBM)
# Rule for objects.
$(OBJECTS): ppm.h $(DEFPGM) $(DEFPBM)
$(CC) $(ALLCFLAGS) "-Dmain=$*_main" -c $*.c
# And libraries.
$(LIBPBM):
cd $(PBMDIR) ; make lib
$(LIBPGM):
cd $(PGMDIR) ; make lib
lib: $(LIBPPM)
$(LIBPPM): libppm1.r libppm2.r libppm3.r libppm4.r libppm5.r bitio.r
merge libppm1.r libppm2.r libppm3.r libppm4.r libppm5.r bitio.r >-$(LIBPPM)
libppm1.r: ppm.h $(DEFPGM) $(DEFPBM) libppm.h libppm1.c
$(CC) $(ALLCFLAGS) -c libppm1.c
libppm2.r: ppm.h $(DEFPGM) $(DEFPBM) libppm.h libppm2.c $(DEFLIBPGM) \
$(DEFLIBPBM)
$(CC) $(ALLCFLAGS) -c libppm2.c
libppm3.r: ppm.h $(DEFPGM) $(DEFPBM) ppmcmap.h libppm.h libppm3.c
$(CC) $(ALLCFLAGS) -c libppm3.c
libppm4.r: ppm.h $(DEFPGM) $(DEFPBM) libppm4.c
$(CC) $(ALLCFLAGS) -c libppm4.c
libppm5.r: ppm.h $(DEFPGM) $(DEFPBM) ppmdraw.h libppm5.c
$(CC) $(ALLCFLAGS) -c libppm5.c
# Other dependencies.
bmptoppm bmptoppm.r: bmptoppm.c
gouldtoppm gouldtoppm.r: gouldtoppm.c
ilbmtoppm ilbmtoppm.r: ilbmtoppm.c ilbm.h
imgtoppm imgtoppm.r: imgtoppm.c
mtvtoppm mtvtoppm.r: mtvtoppm.c
pcxtoppm pcxtoppm.r: pcxtoppm.c
pgmtoppm pgmtoppm.r: pgmtoppm.c
pi1toppm pi1toppm.r: pi1toppm.c
picttoppm picttoppm.r: picttoppm.c
pjtoppm pjtoppm.r: pjtoppm.c
ppmdither ppmdither.r: ppmdither.c
ppmforge ppmforge.r: ppmforge.c
ppmhist ppmhist.r: ppmhist.c ppmcmap.h
ppmmake ppmmake.r: ppmmake.c
ppmpat ppmpat.r: ppmpat.c ppmdraw.h
ppmquant ppmquant.r: ppmquant.c $(PGMDIR)/dithers.h ppmcmap.h
ppmrelief ppmrelief.r: ppmrelief.c
ppmtoacad ppmtoacad.r: ppmtoacad.c ppmcmap.h autocad.h
ppmtogif ppmtogif.r: ppmtogif.c ppmcmap.h
ppmtoicr ppmtoicr.r: ppmtoicr.c ppmcmap.h
ppmtoilbm ppmtoilbm.r: ppmtoilbm.c ilbm.h ppmcmap.h
ppmtopcx ppmtopcx.r: ppmtopcx.c ppmcmap.h
ppmtopgm ppmtopgm.r: ppmtopgm.c
ppmtopi1 ppmtopi1.r: ppmtopi1.c ppmcmap.h
ppmtopict ppmtopict.r: ppmtopict.c ppmcmap.h
ppmtopj ppmtopj.r: ppmtopj.c
ppmtopjxl ppmtopjxl.r: ppmtopjxl.c
ppmtopuzz ppmtopuzz.r: ppmtopuzz.c ppmcmap.h
ppmtorgb3 ppmtorgb3.r: ppmtorgb3.c
ppmtosixel ppmtosixel.r: ppmtosixel.c ppmcmap.h
ppmtotga ppmtotga.r: ppmtotga.c ppmcmap.h
ppmtouil ppmtouil.r: ppmtouil.c ppmcmap.h
ppmtoxpm ppmtoxpm.r: ppmtoxpm.c ppmcmap.h
ppmtoyuv ppmtoyuv.r: ppmtoyuv.c
qrttoppm qrttoppm.r: qrttoppm.c
rawtoppm rawtoppm.r: rawtoppm.c
rgb3toppm rgb3toppm.r: rgb3toppm.c
sldtoppm sldtoppm.r: sldtoppm.c ppmdraw.h autocad.h
spctoppm spctoppm.r: spctoppm.c
sputoppm sputoppm.r: sputoppm.c
tgatoppm tgatoppm.r: tgatoppm.c tga.h
ximtoppm ximtoppm.r: ximtoppm.c xim.h
xpmtoppm xpmtoppm.r: xpmtoppm.c
yuvtoppm yuvtoppm.r: yuvtoppm.c
bmptoppm bmptoppm.r: bmptoppm.c
ppmtobmp ppmtobmp.r: ppmtobmp.c