# Roddy and Dennis take on the SUIT/DOS monster
# Compiler options:
# -c    compile, do not link.
# -N    stack checking ON
# -v    source debugging on
# -w-use  disable warning that an identifier is declared but never used
# -w-par  disable warning that a parameter is never used
# -Y and -Yo  the overlay options!
# -P-  only compile as C code

VERSION = v2.3
SUIT = c:\suit\$(VERSION)
ARCH = dos

BORLAND = \bin\borlandc
#CC = $(BORLAND)\BIN\bcc.exe
CC = BCC
LINK = tlink
#CC = BCCX
LIB = TLIB
TOUCH = \unix\touch
MODEL = h
#INCLUDEDIRS = -I$(BORLAND)\include -I.
INCLUDEDIRS = -I$(BORLAND)\include -I$(SUIT)\include
LDFLAGS = -L$(SUIT)\$(ARCH)\lib;$(BORLAND)\lib
#LDFLAGS = -L.;$(BORLAND)\lib
CFLAGS = -w-par -m$(MODEL) -N $(INCLUDEDIRS) -v -P-C -DIBM_PC

.c.obj :
	$(CC) $(CFLAGS) -c -Y  {$< }

#  application below here -------------------

tutorial: demo.exe poly.exe 3cell.exe $(SUIT)\$(ARCH)\lib\suit_res.lib $(SUIT)\$(ARCH)\lib\suit_ovl.lib

empty: empty.obj $(SUIT)\$(ARCH)\lib\suit_ovl.lib $(SUIT)\$(ARCH)\lib\suit_res.lib
		$(LINK) /v $(LDFLAGS) c0h empty,empty, ,graphics suit_res /o suit_ovl /o- srgp OVERLAY emu mathh ch

demo.exe: demo.obj $(SUIT)\$(ARCH)\lib\suit_ovl.lib $(SUIT)\$(ARCH)\lib\suit_res.lib
		$(LINK) /v $(LDFLAGS) c0h demo,demo, ,graphics suit_res /o suit_ovl /o- srgp OVERLAY emu mathh ch

poly.exe: poly.obj $(SUIT)\$(ARCH)\lib\suit_ovl.lib $(SUIT)\$(ARCH)\lib\suit_res.lib
		$(LINK) /v $(LDFLAGS) c0h poly,poly, ,graphics suit_res /o suit_ovl /o- srgp OVERLAY emu mathh ch

3cell.exe: 3cell.obj $(SUIT)\$(ARCH)\lib\suit_ovl.lib $(SUIT)\$(ARCH)\lib\suit_res.lib
		$(LINK) /v $(LDFLAGS) c0h 3cell,3cell, ,graphics suit_res /o suit_ovl /o- srgp OVERLAY emu mathh ch

############################################################

clean:
	del $(DEST)
	del *.obj˙
