# Makefile fr Demoprogramme. (nur fr Turbo-C)
# Aufruf: Make -fmakec -Df=source -Dmodel
# source ist dabei DEMO01,DEMO02,DEMO03 oder DEMO04.
# model ist small, medium, compact oder large
copt = -v -c -K
lopt = /s /c /v
aopt = /w2 /l /ml /zi /M5
!if !$d(f)
f = demo01
!endif

!if $d(small)
mod = small
model = s
!elif $d(medium)
mod = medium
model = m
!elif $d(compact)
mod = compact
model = c
!elif $d(large)
mod = large
model = l
!else
mod = small
model = s
!endif

$(f).exe:	unimos$(model).lib $(f)$(model).obj win$(model).obj init_c.obj makec
		tlink $(lopt) c0$(model) $(f)$(model) win$(model) init_c,$(f).exe,\
		$(f).map,c$(model) unimos$(model)

$(f)$(model).obj: $(f).c unimos.h makec
		bcc $(copt) -m$(model) -o$(f)$(model) $(f).c

win$(model).obj: win.c win.h unimos.h makec
		bcc $(copt) -m$(model) -owin$(model) win.c

init_c.obj:	init_c.asm unimos.inc unimosif.inc misc.mac makec
		tasm $(aopt) /dmodel=$(mod) init_c
