LIBS = -L../WWitch/lib -llibww
INCS = -I../WWitch/include

all: tscreen.il keyb.il pcurs.obj testcurs.fx

tscreen.il: tscreen.bin tscreen.cf
	mkfent16 tscreen.cf

tscreen.bin:  hdr_tscr.obj tscreen.obj
	lcc86 -noconf -ac0ilib.obj -k"-Fc -M -T 00000" -o tscreen.bin hdr_tscr.obj tscreen.obj $(LIBS)
hdr_tscr.obj: hdr_tscr.c tscreen.h
	tcc -c -zR_TEXT -zSCGROUP -zTCODE $(INCS) -1 -ms hdr_tscr.c
tscreen.obj: tscreen.c tscreen.h
#	lcc86 -c tscreen.c
	tcc -c -zPCGROUP -zSDGROUP $(INCS) -1 -ms tscreen.c

keyb.il: keyb.bin keyb.cf
	mkfent16 keyb.cf

keyb.bin:  hdr_keyb.obj keyb.obj
	lcc86 -noconf -ac0ilib.obj -k"-Fc -M -T 00000" -o keyb.bin hdr_keyb.obj keyb.obj $(LIBS)
hdr_keyb.obj: hdr_keyb.c keyb.h
	tcc -c -zR_TEXT -zSCGROUP -zTCODE $(INCS) -1 -ms hdr_keyb.c
keyb.obj: keyb.c keyb.h
#	lcc86 -c keyb.c
	tcc -c -zPCGROUP -zSDGROUP $(INCS) -1 -ms keyb.c


pcurs.obj: pcurs.c pcurs.h
	lcc86 -c pcurs.c

testcurs.fx: testcurs.bin testcurs.cf
	mkfent16 testcurs.cf
testcurs.bin: testcurs.c pcurs.obj
	lcc86 -o testcurs.bin testcurs.c pcurs.obj
