.AUTODEPEND
# SUIT makefile
#
# syntax is
#
#      make -fmakefile.win [<program>]
#

PROG = poly

VERSION = V2.3
SUIT = C:\SUIT\$(VERSION)

ARCH = WIN3.1

#		*Translator Definitions*
CC = bcc +SUIT.CFG
TASM = TASM
TLIB = tlib
TLINK = tlink
BORLANDLIB = C:\BIN\BORLANDC\LIB
SUITLIB = $(SUIT)\$(ARCH)\LIB
INCLUDES = -IC:\BIN\BORLANDC\INCLUDE -I$(SUIT)\INCLUDE


#		*Implicit Rules*
.c.obj:
  $(CC) -c {$< }

.cpp.obj:
  $(CC) -c {$< }

#		*List Macros*
Link_Exclude =  \
 $(SUIT)\src\suit\suit.res

Link_Include =  \
 $(SUIT)\$(ARCH)\LIB\winsrgp.lib \
 $(SUIT)\$(ARCH)\LIB\winsuit.lib \
 $(SUIT)\src\suit\suit.def

SUIT_OBJECTS =\
arrow.obj 		ball.obj 		bounded.obj 	bulletin.obj \
button.obj		chips.obj		clock.obj 		deftypes.obj \
dialog.obj 		dyncreat.obj	dyndebug.obj 	dyndel.obj \
dynfind.obj 	dynput.obj 		dynsize.obj 	dynsort.obj \
editprop.obj 	elevator.obj 	font.obj 		gp.obj \
hash.obj 		help.obj 		hints.obj 		initial.obj \
input.obj		interest.obj	menu.obj 		motif.obj \
output.obj 		placemat.obj 	polygon.obj		property.obj \
radio.obj 		scrolbox.obj 	spring.obj 		stacker.obj \
suithash.obj	suitmem.obj 	switch.obj 		textbox.obj \
textedit.obj 	tools.obj 		trashcan.obj	tree.obj \
utility.obj 	uvalogo.obj

#		*Explicit Rules*

$(PROG): $(PROG).obj suit.cfg $(Link_Include) $(Link_Exclude)
  $(TLINK) /v/x/c/P-/Twe/L$(BORLANDLIB);$(SUITLIB) @&&|
c0wl.obj+
$(PROG).obj
$(PROG)
		# no map file
$(SUIT)\$(ARCH)\LIB\winsrgp.lib+
$(SUIT)\$(ARCH)\LIB\winsuit.lib+
mathwl.lib+
import.lib+
cwl.lib
$(SUIT)\src\suit\suit.def
|
  RC  $(SUIT)\src\suit\suit.res $(PROG).exe

winsuit.lib: $(SUIT_OBJECTS)
  $(TLIB) $(SUIT)\$(ARCH)\LIB\winsuit.lib @&&|
-+arrow		-+ball		-+bounded	-+bulletin	-+button  &
-+chips 	-+clock 	-+deftypes 	-+dialog 	-+dyncreat &
-+dyndebug 	-+dyndel 	-+dynfind 	-+dynput 	-+dynsize &
-+dynsort 	-+editprop 	-+elevator 	-+font 		-+gp &
-+hash 		-+help 		-+hints 	-+initial 	-+input &
-+interest 	-+menu 		-+motif 	-+output 	-+placemat &
-+polygon 	-+property 	-+radio 	-+scrolbox 	-+spring &
-+stacker 	-+suithash 	-+suitmem 	-+switch 	-+textbox &
-+textedit 	-+tools 	-+trashcan 	-+tree 		-+utility &
-+uvalogo 
|

$(SUIT)\$(ARCH)\LIB\winsuit.lib: $(SUIT_OBJECTS)
  $(TLIB) $(SUIT)\$(ARCH)\LIB\winsuit.lib @&&|
-+arrow		-+ball		-+bounded	-+bulletin	-+button  &
-+chips 	-+clock 	-+deftypes 	-+dialog 	-+dyncreat &
-+dyndebug 	-+dyndel 	-+dynfind 	-+dynput 	-+dynsize &
-+dynsort 	-+editprop 	-+elevator 	-+font 		-+gp &
-+hash 		-+help 		-+hints 	-+initial 	-+input &
-+interest 	-+menu 		-+motif 	-+output 	-+placemat &
-+polygon 	-+property 	-+radio 	-+scrolbox 	-+spring &
-+stacker 	-+suithash 	-+suitmem 	-+switch 	-+textbox &
-+textedit 	-+tools 	-+trashcan 	-+tree 		-+utility &
-+uvalogo 
|

clean:
	del *.obj

# demo
demo: demo.obj suit.cfg $(Link_Include) $(Link_Exclude)
  $(TLINK) /v/x/c/P-/Twe/L$(BORLANDLIB);$(SUITLIB) @&&|
c0wl.obj+
demo.obj
demo
		# no map file
$(SUIT)\$(ARCH)\LIB\winsrgp.lib+
$(SUIT)\$(ARCH)\LIB\winsuit.lib+
mathwl.lib+
import.lib+
cwl.lib
$(SUIT)\src\suit\suit.def
|
  RC  $(SUIT)\src\suit\suit.res demo.exe

# example
example: example.obj suit.cfg $(Link_Include) $(Link_Exclude)
  $(TLINK) /v/x/c/P-/Twe/L$(BORLANDLIB);$(SUITLIB) @&&|
c0wl.obj+
example.obj
example
		# no map file
$(SUIT)\$(ARCH)\LIB\winsrgp.lib+
$(SUIT)\$(ARCH)\LIB\winsuit.lib+
mathwl.lib+
import.lib+
cwl.lib
$(SUIT)\src\suit\suit.def
|
  RC  $(SUIT)\src\suit\suit.res example.exe

# bug
bug: bug.obj suit.cfg $(Link_Include) $(Link_Exclude)
  $(TLINK) /v/x/c/P-/Twe/L$(BORLANDLIB);$(SUITLIB) @&&|
c0wl.obj+
bug.obj
bug
		# no map file
$(SUIT)\$(ARCH)\LIB\winsrgp.lib+
$(SUIT)\$(ARCH)\LIB\winsuit.lib+
mathwl.lib+
import.lib+
cwl.lib
$(SUIT)\src\suit\suit.def
|
  RC  $(SUIT)\src\suit\suit.res bug.exe

# my3d
my3d: my3d.obj spin.obj suit.cfg $(Link_Include) $(Link_Exclude)
  $(TLINK) /v/x/c/P-/Twe/L$(BORLANDLIB);$(SUITLIB) @&&|
c0wl.obj+
my3d.obj
my3d
		# no map file
$(SUIT)\$(ARCH)\LIB\winsrgp.lib+
$(SUIT)\$(ARCH)\LIB\winsuit.lib+
mathwl.lib+
import.lib+
cwl.lib
$(SUIT)\src\suit\suit.def
|
  RC  $(SUIT)\src\suit\suit.res my3d.exe

# kim
kim: kim.obj suit.cfg $(Link_Include) $(Link_Exclude)
  $(TLINK) /v/x/c/P-/Twe/L$(BORLANDLIB);$(SUITLIB) @&&|
c0wl.obj+
kim.obj
kim
		# no map file
$(SUIT)\$(ARCH)\LIB\winsrgp.lib+
$(SUIT)\$(ARCH)\LIB\winsuit.lib+
mathwl.lib+
import.lib+
cwl.lib
$(SUIT)\src\suit\suit.def
|
  RC  $(SUIT)\src\suit\suit.res kim.exe

# mytest
mytest: mytest.obj suit.cfg $(Link_Include) $(Link_Exclude)
  $(TLINK) /v/x/c/P-/Twe/L$(BORLANDLIB);$(SUITLIB) @&&|
c0wl.obj+
mytest.obj
mytest
		# no map file
$(SUIT)\$(ARCH)\LIB\winsrgp.lib+
$(SUIT)\$(ARCH)\LIB\winsuit.lib+
mathwl.lib+
import.lib+
cwl.lib
$(SUIT)\src\suit\suit.def
|
  RC  $(SUIT)\src\suit\suit.res mytest.exe

# randy
randy: randy.obj suit.cfg $(Link_Include) $(Link_Exclude)
  $(TLINK) /v/x/c/P-/Twe/L$(BORLANDLIB);$(SUITLIB) @&&|
c0wl.obj+
randy.obj
randy
		# no map file
$(SUIT)\$(ARCH)\LIB\winsrgp.lib+
$(SUIT)\$(ARCH)\LIB\winsuit.lib+
mathwl.lib+
import.lib+
cwl.lib
$(SUIT)\src\suit\suit.def
|
  RC  $(SUIT)\src\suit\suit.res randy.exe


#		*Individual File Dependencies*
#$(SUIT)\src\suit\suit.res: suit.cfg suit.rc
#	RC -R $(INCLUDES) -FO $(SUIT)\src\suit\suit.res SUIT.RC

arrow.obj:  suit.cfg arrow.c

ball.obj:  suit.cfg ball.c

bounded.obj:  suit.cfg bounded.c

bulletin.obj:  suit.cfg bulletin.c

button.obj:  suit.cfg button.c

chips.obj:  suit.cfg chips.c

clock.obj:  suit.cfg clock.c

deftypes.obj:  suit.cfg deftypes.c

dialog.obj:  suit.cfg dialog.c

dyncreat.obj:  suit.cfg dyncreat.c

dyndebug.obj:  suit.cfg dyndebug.c

dyndel.obj:  suit.cfg dyndel.c

dynfind.obj:  suit.cfg dynfind.c

dynput.obj:  suit.cfg dynput.c

dynsize.obj:  suit.cfg dynsize.c

dynsort.obj:  suit.cfg dynsort.c

editprop.obj:  suit.cfg editprop.c

elevator.obj:  suit.cfg elevator.c

font.obj:  suit.cfg font.c

gp.obj:  suit.cfg gp.c

hash.obj:  suit.cfg hash.c

help.obj:  suit.cfg help.c

hints.obj:  suit.cfg hints.c

initial.obj:  suit.cfg initial.c

input.obj:  suit.cfg input.c

interest.obj:  suit.cfg interest.c

menu.obj:  suit.cfg menu.c

motif.obj:  suit.cfg motif.c

output.obj:  suit.cfg output.c

placemat.obj:  suit.cfg placemat.c

polygon.obj:  suit.cfg polygon.c

property.obj:  suit.cfg property.c

radio.obj:  suit.cfg radio.c

scrolbox.obj:  suit.cfg scrolbox.c

spring.obj:  suit.cfg spring.c

stacker.obj:  suit.cfg stacker.c

suithash.obj:  suit.cfg suithash.c

suitmem.obj:  suit.cfg suitmem.c

switch.obj:  suit.cfg switch.c

textbox.obj:  suit.cfg textbox.c

textedit.obj:  suit.cfg textedit.c

tools.obj:  suit.cfg tools.c

trashcan.obj:  suit.cfg trashcan.c

tree.obj:  suit.cfg tree.c

utility.obj:  suit.cfg utility.c

uvalogo.obj:  suit.cfg uvalogo.c

#		*Compiler Configuration File*
suit.cfg:
  copy &&|
-R
-ml!
-2
-v
-d
-W
-vi-
-w-par
-wpro
-w-aus
-weas
-wpre
$(INCLUDES)
-L$(BORLANDLIB);$(SUITLIB)
-DIBM_PC
| suit.cfg

