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
/
PBM
/
Makefile.dice
< prev
next >
Wrap
Makefile
|
1996-11-18
|
10KB
|
252 lines
# Makefile for pbm tools, for use with Amiga DICE
#
# Copyright (C) 1989, 1991 by Jef Poskanzer.
# Modified for Amiga DICE by Ingo Wilken (Ingo.Wilken@informatik.uni-oldenburg.de)
#
# 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.
# CONFIG: generate executable with debugging information
#DEBUG = -s -d1
# CONFIG: use memory pools
#MPOOL = -L/amiga -l mpool
CC = dcc
CFLAGS = -E DCC_ERRORS -ms -mu -gs $(DEBUG)
#RGBDEF = -DRGB_DB="RGBDEF" # moved to pbmplus.h
TIFFDEF = -DLIBTIFF
LDFLAGS = $(MPOOL) /amiga/dice_stack.o
BINDIR = bin
MERGE= pbmmerge
# where to install the binaries, libraries and important header files
INSTALLBIN = bin:pbmplus
INSTALLLIB = dlib:local
INSTALLINCL= dinclude:local
# install which headers
HEADERS= pbm.h pbmfont.h /pbmplus.h
INCLUDE = -I/
RALLCFLAGS = $(CFLAGS) $(RGBDEF) $(TIFFDEF) $(INCLUDE) -proto -mRR
SALLCFLAGS = $(CFLAGS) $(RGBDEF) $(TIFFDEF) $(INCLUDE) -proto
MALLCFLAGS = $(CFLAGS) $(RGBDEF) $(TIFFDEF) $(INCLUDE) -mD -mC
DEFPBM = pbm.h /pbmplus.h
DEFLIBPBM = libpbm.h
RLIBPBM = pbmsr.lib
RLLIBPBM = pbmrl.lib
SLIBPBM = pbms.lib
SLLIBPBM = pbml.lib
DEFPBM2 = /version.h /compile.h # special dep for libpbm1.c
LIBRARIES = $(RLIBPBM) $(RLLIBPBM) $(SLIBPBM) $(SLLIBPBM)
BINS = atktopbm brushtopbm cmuwmtopbm \
icontopbm gemtopbm macptopbm mgrtopbm \
pbmlife pbmmake pbmmask \
pbmtext pbmto10x pbmto4425 pbmtoascii pbmtoatk \
pbmtobbnbg pbmtocmuwm pbmtoepson pbmtog3 \
pbmtogem pbmtogo pbmtoicon pbmtolj pbmtomacp \
pbmtomgr pbmtopi3 pbmtoplot pbmtoptx \
pbmtox10bm pbmtoxbm pbmtoybm pbmtozinc \
pbmupc pi3topbm xbmtopbm ybmtopbm \
pbmtoepsi pbmclean pbmpscale pbmtoln03
LBINS = g3topbm
MATHBINS = pbmreduce pbmtolps
# Compile these programs without proto checking, with stackargs & large data.
# The source is quite messy and would require too much work to clean up.
UGLYFLAGS = -E DCC_ERRORS -ms -mu -gs -mD -mC $(RGBDEF) $(TIFFDEF) $(INCLUDE)
UGLYBINS = pktopbm
MUGLYBINS = pbmtopk
BINARIES = $(BINS) $(LBINS) $(MATHBINS) $(UGLYBINS) $(MUGLYBINS)
OBJECTS = atktopbm.om brushtopbm.om cmuwmtopbm.om g3topbm.om \
icontopbm.om gemtopbm.om macptopbm.om mgrtopbm.om \
pbmlife.om pbmmake.om pbmmask.om pbmreduce.om \
pbmtext.om pbmto10x.om pbmto4425.om pbmtoascii.om pbmtoatk.om \
pbmtobbnbg.om pbmtocmuwm.om pbmtoepson.om pbmtog3.om \
pbmtogem.om pbmtogo.om pbmtoicon.om pbmtolj.om pbmtomacp.om \
pbmtomgr.om pbmtopi3.om pbmtoplot.om pbmtoptx.om \
pbmtox10bm.om pbmtoxbm.om pbmtoybm.om pbmtozinc.om \
pbmupc.om pi3topbm.om xbmtopbm.om ybmtopbm.om \
pbmtoepsi.om pbmclean.om pbmpscale.om \
pbmtolps.om pbmtoln03.om
UGLYOBJS = pktopbm.ou pbmtopk.ou
all: lib binaries
bindir:
-makedir $(BINDIR)
binaries: lib bindir $(BINARIES)
lib: $(LIBRARIES)
merge: lib bindir $(MERGE)
# Rules for merged binary
.c.ou: $(DEFPBM) $<
$(CC) $(MALLCFLAGS) "-Dmain=$*_main" -c $*.c -o $*.ou
.c.om: $(DEFPBM) $<
$(CC) -proto $(MALLCFLAGS) "-Dmain=$*_main" -c $*.c -o $*.om
$(MERGE): pbmmerge.c $(OBJECTS) $(UGLYOBJS) $(SLLIBPBM)
$(CC) $(MALLCFLAGS) $(LDFLAGS) -o $(BINDIR)/$@ $@.c $(OBJECTS) $(UGLYOBJS) -l $(SLLIBPBM) -lm
#$(OBJECTS): $(DEFPBM)
# $(CC) -mD -mC $(SALLCFLAGS) "-Dmain=$*_main" -c $*.c
# Rules for plain programs.
$(BINS): $(DEFPBM) $(RLIBPBM)
$(CC) -r $(RALLCFLAGS) $(LDFLAGS) -o $(BINDIR)/$@ $@.c -l $(RLIBPBM)
$(LBINS): $(DEFPBM) $(RLLIBPBM)
$(CC) -mD -mC $(RALLCFLAGS) $(LDFLAGS) -o $(BINDIR)/$@ $@.c -l $(RLLIBPBM)
$(MATHBINS): $(DEFPBM) $(RLIBPBM)
$(CC) -r $(RALLCFLAGS) $(LDFLAGS) -o $(BINDIR)/$@ $@.c -l $(RLIBPBM) -lm
$(UGLYBINS): $(DEFPBM) $(SLLIBPBM)
$(CC) $(UGLYFLAGS) $(LDFLAGS) -o $(BINDIR)/$@ $@.c -l $(SLLIBPBM)
$(MUGLYBINS): $(DEFPBM) $(SLLIBPBM)
$(CC) $(UGLYFLAGS) $(LDFLAGS) -o $(BINDIR)/$@ $@.c -l $(SLLIBPBM) -lm
# And libraries.
# small data version of libpbm, registerized (arguments in registers)
$(RLIBPBM): libpbm1.or libpbm2.or libpbm3.or libpbm4.or libpbm5.or
-delete $(RLIBPBM)
join libpbm1.or libpbm2.or libpbm3.or libpbm4.or libpbm5.or to $(RLIBPBM)
libpbm1.or: $(DEFPBM) $(DEFPBM2) $(DEFLIBPBM) libpbm1.c
$(CC) -r $(RALLCFLAGS) -S -o $@ -c libpbm1.c
libpbm2.or: $(DEFPBM) $(DEFLIBPBM) libpbm2.c
$(CC) -r $(RALLCFLAGS) -S -o $@ -c libpbm2.c
libpbm3.or: $(DEFPBM) $(DEFLIBPBM) libpbm3.c
$(CC) -r $(RALLCFLAGS) -S -o $@ -c libpbm3.c
libpbm4.or: $(DEFPBM) $(DEFLIBPBM) libpbm4.c
$(CC) -r $(RALLCFLAGS) -S -o $@ -c libpbm4.c
libpbm5.or: $(DEFPBM) pbmfont.h libpbm5.c
$(CC) -r $(RALLCFLAGS) -S -o $@ -c libpbm5.c
# small data version, not registerized (arguments on stack)
$(SLIBPBM): libpbm1.os libpbm2.os libpbm3.os libpbm4.os libpbm5.os
-delete $(SLIBPBM)
join libpbm1.os libpbm2.os libpbm3.os libpbm4.os libpbm5.os to $(SLIBPBM)
libpbm1.os: $(DEFPBM) $(DEFPBM2) $(DEFLIBPBM) libpbm1.c
$(CC) -r $(SALLCFLAGS) -S -o $@ -c libpbm1.c
libpbm2.os: $(DEFPBM) $(DEFLIBPBM) libpbm2.c
$(CC) -r $(SALLCFLAGS) -S -o $@ -c libpbm2.c
libpbm3.os: $(DEFPBM) $(DEFLIBPBM) libpbm3.c
$(CC) -r $(SALLCFLAGS) -S -o $@ -c libpbm3.c
libpbm4.os: $(DEFPBM) $(DEFLIBPBM) libpbm4.c
$(CC) -r $(SALLCFLAGS) -S -o $@ -c libpbm4.c
libpbm5.os: $(DEFPBM) pbmfont.h libpbm5.c
$(CC) -r $(SALLCFLAGS) -S -o $@ -c libpbm5.c
# large data version of libpbm, registerized (arguments in registers)
$(RLLIBPBM): libpbm1.olr libpbm2.olr libpbm3.olr libpbm4.olr libpbm5.olr
-delete $(RLLIBPBM)
join libpbm1.olr libpbm2.olr libpbm3.olr libpbm4.olr libpbm5.olr to $(RLLIBPBM)
libpbm1.olr: $(DEFPBM) $(DEFPBM2) $(DEFLIBPBM) libpbm1.c
$(CC) -mD $(RALLCFLAGS) -S -o $@ -c libpbm1.c
libpbm2.olr: $(DEFPBM) $(DEFLIBPBM) libpbm2.c
$(CC) -mD $(RALLCFLAGS) -S -o $@ -c libpbm2.c
libpbm3.olr: $(DEFPBM) $(DEFLIBPBM) libpbm3.c
$(CC) -mD $(RALLCFLAGS) -S -o $@ -c libpbm3.c
libpbm4.olr: $(DEFPBM) $(DEFLIBPBM) libpbm4.c
$(CC) -mD $(RALLCFLAGS) -S -o $@ -c libpbm4.c
libpbm5.olr: $(DEFPBM) pbmfont.h libpbm5.c
$(CC) -mD $(RALLCFLAGS) -S -o $@ -c libpbm5.c
# large data version of libpbm, not registerized (arguments on stack)
$(SLLIBPBM): libpbm1.ols libpbm2.ols libpbm3.ols libpbm4.ols libpbm5.ols
-delete $(SLLIBPBM)
join libpbm1.ols libpbm2.ols libpbm3.ols libpbm4.ols libpbm5.ols to $(SLLIBPBM)
libpbm1.ols: $(DEFPBM) $(DEFPBM2) $(DEFLIBPBM) libpbm1.c
$(CC) -mD $(SALLCFLAGS) -S -o $@ -c libpbm1.c
libpbm2.ols: $(DEFPBM) $(DEFLIBPBM) libpbm2.c
$(CC) -mD $(SALLCFLAGS) -S -o $@ -c libpbm2.c
libpbm3.ols: $(DEFPBM) $(DEFLIBPBM) libpbm3.c
$(CC) -mD $(SALLCFLAGS) -S -o $@ -c libpbm3.c
libpbm4.ols: $(DEFPBM) $(DEFLIBPBM) libpbm4.c
$(CC) -mD $(SALLCFLAGS) -S -o $@ -c libpbm4.c
libpbm5.ols: $(DEFPBM) pbmfont.h libpbm5.c
$(CC) -mD $(SALLCFLAGS) -S -o $@ -c libpbm5.c
# Other dependencies.
atktopbm atktopbm.om: atktopbm.c
brushtopbm brushtopbm.om: brushtopbm.c
cmuwmtopbm cmuwmtopbm.om: cmuwmtopbm.c cmuwm.h
g3topbm g3topbm.om: g3topbm.c g3.h
icontopbm icontopbm.om: icontopbm.c
gemtopbm gemtopbm.om: gemtopbm.c
macptopbm macptopbm.om: macptopbm.c macp.h
mgrtopbm mgrtopbm.om: mgrtopbm.c mgr.h
pbmlife pbmlife.om: pbmlife.c
pbmmake pbmmake.om: pbmmake.c
pbmmask pbmmask.om: pbmmask.c
pbmreduce pbmreduce.om: pbmreduce.c
pbmtext pbmtext.om: pbmtext.c pbmfont.h
pbmto10x pbmto10x.om: pbmto10x.c
pbmto4425 pbmto4425.om: pbmto4425.c
pbmtoascii pbmtoascii.om: pbmtoascii.c
pbmtoatk pbmtoatk.om: pbmtoatk.c
pbmtobbnbg pbmtobbnbg.om: pbmtobbnbg.c
pbmtocmuwm pbmtocmuwm.om: pbmtocmuwm.c cmuwm.h
pbmtoepson pbmtoepson.om: pbmtoepson.c
pbmtog3 pbmtog3.om: pbmtog3.c g3.h
pbmtogem pbmtogem.om: pbmtogem.c
pbmtogo pbmtogo.om: pbmtogo.c
pbmtoicon pbmtoicon.om: pbmtoicon.c
pbmtolj pbmtolj.om: pbmtolj.c
pbmtomacp pbmtomacp.om: pbmtomacp.c macp.h
pbmtomgr pbmtomgr.om: pbmtomgr.c mgr.h
pbmtopi3 pbmtopi3.om: pbmtopi3.c
pbmtoplot pbmtoplot.om: pbmtoplot.c
pbmtoptx pbmtoptx.om: pbmtoptx.c
pbmtox10bm pbmtox10bm.om: pbmtox10bm.c
pbmtoxbm pbmtoxbm.om: pbmtoxbm.c
pbmtoybm pbmtoybm.om: pbmtoybm.c
pbmtozinc pbmtozinc.om: pbmtozinc.c
pbmupc pbmupc.om: pbmupc.c
pi3topbm pi3topbm.om: pi3topbm.c
xbmtopbm xbmtopbm.om: xbmtopbm.c
ybmtopbm ybmtopbm.om: ybmtopbm.c
pbmtoepsi pbmtoepsi.om: pbmtoepsi.c
pbmtopk pbmtopk.om: pbmtopk.c
pktopbm pktopbm.om: pktopbm.c
pbmclean pbmclean.om: pbmclean.c
pbmpscale pbmpscale.om: pbmpscale.c
pbmtolps pbmtolps.om: pbmtolps.c
pbmtoln03 pbmtoln03.om: pbmtoln03.c
clean:
-delete \#.om \#?.ou \#?.os \#?.or \#?.ols \#?.olr DCC_ERRORS
cleanall: clean
-delete \#?.lib
-delete $(BINDIR) all
installlib: lib
copy $(LIBRARIES) to $(INSTALLLIB)
copy $(HEADERS) to $(INSTALLINCL)
installbin: binaries
copy $(BINDIR) all to $(INSTALLBIN)
installall: installlib installbin
install:
@echo "Please select: installlib, installbin, installall"