
# this makefile is for the PD make on fish 69, using Aztec C 5.0


PRECOMP = -hi w:II16
## aztec 3.6 version: PRECOMP = -iw:II

LIB = -lc16
## aztec 3.6 version: LIB = -lc

V = -dSTUPID_DASHES
#### to add the feature where it says "Tuesday" or "Yesterday", use
#### V = -dWEEEEK -dSTUPID_DASHES
#### to put directories on a black background, replace -dSTUPID_DASHES with
#### -dBLACKGROUND.  To make directories boldface, use -dBOLDDIRS instead.

PRECOMP = -hi w:II16
# Substitute whatever pathname you want to use for the file w:II16.  If you
# don't want to make precompiled header files just use "PRECOMP =".  II16
# can be precompiled from exec/exec.h, libraries/dosextens.h, and Paul.h,
# and maybe stdio.h and strings.h, with 16 bit ints (-ps option in 5.0).

SDBCMD = -bs -s0f0n
## aztec 3.6 version: SDBCMD = -n

CCOPTS = -pe -wl -sabfmpu0n -wp
CFLAGS = $(CCOPTS) -ps $(PRECOMP)
## aztec 3.6 version: CFLAGS = $(PRECOMP)
#  (actually I normally set the CCOPTS environment var to "-pe -wl -sabfmpu0n".)
#### we have to turn off -sn because of a compiler bug!
C = $(CFLAGS)
L = +q -m
LYD = $(CCOPTS) -ps
## special flags for compiling somebody else's old code


# this produces a version of Dr that SDB or DB can be used on:

ram\:dd : ddr.o dfastex.o pureio.o dpatmatch.o
	ln $L -w -g -o ram:dd ddr.o dfastex.o dpatmatch.o pureio.o $(LIB)
	@protect ram:dd +p
	-@resident ram:dd
	-@dr -l ram:dd\#?

# the last line above assumes you already have a working dr on line!  And it
# also responds to the fact that this pd make considers # in the MIDDLE of a
# line to be a start of comment unless preceded by a backslash.

ddr.o : dr.c
	cc $C $(SDBCMD) -dDEBUG_IO -dprivate $V -o ddr.o dr

dfastex.o : fastex.c
	cc $C $(SDBCMD) -o dfastex.o -dQUEST -dDEBUG_IO -dprivate fastex

# we do not use the usual CFLAGS (with PRECOMP in it) here:

dpatmatch.o : patmatch.c
	cc $(LYD) $(SDBCMD) -o dpatmatch.o patmatch


############## This is the final version without debugging information:

d : ram:dr

ram\:dr : dr.o fastex.o patmatch.o pureio.o
	ln $L -o ram:Dr dr.o fastex.o patmatch.o pureio.o $(LIB)
	@protect ram:dr +p
	-@c:dr ram:dr

dr.o : dr.c
	cc $C $V dr

fastex.o : fastex.c
	cc $C -dQUEST fastex

# we do not use the usual CFLAGS (with PRECOMP in it) here:

patmatch.o : patmatch.c
	cc $(LYD) patmatch

# leak.o goes by the .c.o rule



##############  This is for small Dr without fastexnext:

s : ram:dr-s

ram\:dr-s : sdr.o patmatch.o pureio.o
	ln $L -o ram:Dr-S sdr.o patmatch.o pureio.o $(LIB)
	@protect ram:dr-s +p
	-@dr ram:dr-s

sdr.o : dr.c
	cc $C $V -dSMALLSLOW -o sdr.o dr
