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
/
PGM
/
Makefile.dice
< prev
next >
Wrap
Makefile
|
1996-11-18
|
7KB
|
186 lines
# Makefile for pgm 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)
LDFLAGS = $(MPOOL) /amiga/dice_stack.o
BINDIR = bin
MERGE= pgmmerge
# where to install the binaries, libraries and important header files
INSTALLBIN = bin:pbmplus
INSTALLLIB = dlib:local
INSTALLINCL= dinclude:local
# install which headers
HEADERS= pgm.h /pbmplus.h
PBMDIR = /pbm
INCLUDEPBM = -I$(PBMDIR)
RLIBPBM = $(PBMDIR)/pbmsr.lib
RLLIBPBM = $(PBMDIR)/pbmrl.lib
SLIBPBM = $(PBMDIR)/pbms.lib
SLLIBPBM = $(PBMDIR)/pbml.lib
DEFPBM = $(PBMDIR)/pbm.h /pbmplus.h
DEFLIBPBM = $(PBMDIR)/libpbm.h
INCLUDE = -I/ $(INCLUDEPBM)
RALLCFLAGS = $(CFLAGS) $(INCLUDE) -proto -mRR
SALLCFLAGS = $(CFLAGS) $(INCLUDE) -proto
MALLCFLAGS = $(CFLAGS) $(INCLUDE) -mD -mC
RLIBPGM = pgmsr.lib
RLLIBPGM = pgmrl.lib
SLIBPGM = pgms.lib
SLLIBPGM = pgml.lib
DEFPGM = pgm.h
DEFLIBPGM = libpgm.h
LIBRARIES = $(RLIBPGM) $(RLLIBPGM) $(SLIBPGM) $(SLLIBPGM)
BINS = hipstopgm lispmtopgm pgmbentley pgmedge pgmenhance \
pgmnoise pgmoil pgmramp pgmtofs pgmtolispm \
psidtopgm rawtopgm asciitopgm bioradtopgm spottopgm \
pbmtopgm
MATHBINS = fstopgm pgmcrater pgmhist pgmnorm pgmtexture \
pgmtopbm pgmkernel
BINARIES = $(BINS) $(MATHBINS)
OBJECTS = fstopgm.om hipstopgm.om lispmtopgm.om pgmbentley.om \
pgmenhance.om pgmhist.om pgmnoise.om pgmnorm.om pgmoil.om \
pgmramp.om pgmtofs.om pgmtolispm.om pgmtopbm.om \
psidtopgm.om rawtopgm.om pgmcrater.om pgmedge.om pgmtexture.om \
asciitopgm.om bioradtopgm.om spottopgm.om pbmtopgm.om pgmkernel.om
all: lib binaries
bindir:
-makedir $(BINDIR)
binaries: lib bindir $(BINARIES)
lib: $(LIBRARIES)
merge: lib bindir $(MERGE)
# Rules for merged binary
.c.om: $(DEFPGM) $(DEFPBM) $<
$(CC) -proto $(MALLCFLAGS) "-Dmain=$*_main" -c $*.c -o $*.om
$(MERGE): pgmmerge.c $(OBJECTS) $(SLLIBPGM) $(SLLIBPBM)
$(CC) $(MALLCFLAGS) $(LDFLAGS) -o $(BINDIR)/$@ $@.c $(OBJECTS) -l $(SLLIBPGM) -l $(SLLIBPBM) -lm
#$(OBJECTS): $(DEFPGM) $(DEFPBM)
# $(CC) -mD -mC $(SALLCFLAGS) "-Dmain=$*_main" -c $*.c
# Rule for plain programs.
$(BINS): $(DEFPGM) $(DEFPBM) $(RLIBPGM) $(RLIBPBM)
$(CC) -r $(RALLCFLAGS) $(LDFLAGS) -o $(BINDIR)/$@ $@.c -l $(RLIBPGM) -l $(RLIBPBM)
# Rule for math-dependent programs.
$(MATHBINS): $(DEFPGM) $(DEFPBM) $(RLIBPGM) $(RLIBPBM)
$(CC) -r $(RALLCFLAGS) $(LDFLAGS) -o $(BINDIR)/$@ $@.c -l $(RLIBPGM) -l $(RLIBPBM) -lm
# And libraries.
#$(LIBPBM):
# cd $(PBMDIR) ; make lib
# small data version of libpgm
$(RLIBPGM): libpgm1.or libpgm2.or
-delete $(RLIBPGM)
join libpgm1.or libpgm2.or to $(RLIBPGM)
libpgm1.or: $(DEFPGM) $(DEFPBM) $(DEFLIBPGM) libpgm1.c
$(CC) -r $(RALLCFLAGS) -S -o $@ -c libpgm1.c
libpgm2.or: $(DEFPGM) $(DEFPBM) $(DEFLIBPGM) libpgm2.c $(DEFLIBPBM)
$(CC) -r $(RALLCFLAGS) -S -o $@ -c libpgm2.c
# small data version of libpgm, not registerized (arguments on stack)
$(SLIBPGM): libpgm1.os libpgm2.os
-delete $(SLIBPGM)
join libpgm1.os libpgm2.os to $(SLIBPGM)
libpgm1.os: $(DEFPGM) $(DEFPBM) $(DEFLIBPGM) libpgm1.c
$(CC) -r $(SALLCFLAGS) -S -o $@ -c libpgm1.c
libpgm2.os: $(DEFPGM) $(DEFPBM) $(DEFLIBPGM) libpgm2.c $(DEFLIBPBM)
$(CC) -r $(SALLCFLAGS) -S -o $@ -c libpgm2.c
# large data version of libpgm
$(RLLIBPGM): libpgm1.olr libpgm2.olr
-delete $(RLLIBPGM)
join libpgm1.olr libpgm2.olr to $(RLLIBPGM)
libpgm1.olr: $(DEFPGM) $(DEFPBM) $(DEFLIBPGM) libpgm1.c
$(CC) -mD $(RALLCFLAGS) -S -c libpgm1.c -o $@
libpgm2.olr: $(DEFPGM) $(DEFPBM) $(DEFLIBPGM) libpgm2.c $(DEFLIBPBM)
$(CC) -mD $(RALLCFLAGS) -S -c libpgm2.c -o $@
# large data version of libpgm, not registerized (arguments on stack)
$(SLLIBPGM): libpgm1.ols libpgm2.ols
-delete $(SLLIBPGM)
join libpgm1.ols libpgm2.ols to $(SLLIBPGM)
libpgm1.ols: $(DEFPGM) $(DEFPBM) $(DEFLIBPGM) libpgm1.c
$(CC) -mD $(SALLCFLAGS) -S -c libpgm1.c -o $@
libpgm2.ols: $(DEFPGM) $(DEFPBM) $(DEFLIBPGM) libpgm2.c $(DEFLIBPBM)
$(CC) -mD $(SALLCFLAGS) -S -c libpgm2.c -o $@
# Other dependencies.
fstopgm fstopgm.om: fstopgm.c
hipstopgm hipstopgm.om: hipstopgm.c
lispmtopgm lispmtopgm.om: lispmtopgm.c
pgmbentley pgmbentley.om: pgmbentley.c
pgmcrater pgmcrater.om: pgmcrater.c
pgmedge pgmedge.om: pgmedge.c
pgmenhance pgmenhance.om: pgmenhance.c
pgmhist pgmhist.om: pgmhist.c
pgmnoise pgmnoise.om: pgmnoise.c
pgmnorm pgmnorm.om: pgmnorm.c
pgmoil pgmoil.om: pgmoil.c
pgmramp pgmramp.om: pgmramp.c
pgmtexture pgmtexture.om: pgmtexture.c
pgmtopbm pgmtopbm.om: pgmtopbm.c dithers.h $(DEFPBM)
pgmtofs pgmtofs.om: pgmtofs.c
pgmtolispm pgmtolispm.om: pgmtolispm.c
psidtopgm psidtopgm.om: psidtopgm.c
rawtopgm rawtopgm.om: rawtopgm.c
asciitopgm asciitopgm.om: asciitopgm.c
bioradtopgm bioradtopgm.om: bioradtopgm.c
spottopgm spottopgm.om: spottopgm.c
pbmtopgm pbmtopgm.om: pbmtopgm.c
pgmkernel pgmkernel.om: pgmkernel.c
clean:
-delete \#?.om \#?.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"