# "makefile" for CML
#
# Set up for use with Zortech C for plain DOS use.

# NB - compiling "interp.c" with optimisation enabled seems to take
#      several hours using Zortech C 3.4.  I gave up the first couple of times
#      I tried, suspecting things had got stuck.  Have patience!

LFLAGS =
CFLAGS = -mx -bx -o+time -DDOS386=1 -D__STDC__=1

default:	cml.exe

#############################################################################

cml.exp:
	wx cml smlcore.exp

cml.exe:	fam.obj interp.obj io.obj store.obj system.obj bignum.obj plot.obj
	ztc -mx -a -o cml.exe \
	fam.obj interp.obj io.obj store.obj system.obj bignum.obj plot.obj \
	x32v.lib

fam.obj:	fam.c globdefs.h structs.h globvars.h debug.h io.h system.h
	ztc -c $(CFLAGS) fam.c

interp.obj:	interp.c globdefs.h structs.h globvals.h io.h \
		bcodes.h debug.h system.h
	ztc -c $(CFLAGS) interp.c

io.obj:	io.c globdefs.h structs.h globvars.h io.h system.h
	ztc -c $(CFLAGS) io.c

store.obj:	store.c globdefs.h structs.h globvars.h bcodes.h \
		debug.h system.h
	ztc -c $(CFLAGS) store.c

store.obj:	store.c globdefs.h structs.h globvars.h bcodes.h \
		debug.h system.h
	ztc -c $(CFLAGS) store.c

system.obj:	system.c globdefs.h structs.h globvars.h system.h
	ztc -c $(CFLAGS) system.c

bignum.obj:	bignum.c globdefs.h structs.h globvars.h system.h
	ztc -c $(CFLAGS) bignum.c

plot.obj:	plot.c globdefs.h structs.h globvars.h system.h
	ztc -c $(CFLAGS) plot.c

# end of makefile

