INTERPRETER=../bin/opencomal.exe
RUNTIME=../bin/opencomalrun.exe

OBJ=	pdcpars.tab.obj	pdcmain.obj	pdcmisc.obj	pdccmd.obj 	\
	pdclexs.obj 	pdcid.obj 	pdcscan.obj	pdcparss.obj	\
	pdcenv.obj	pdcsym.obj	pdcexec.obj	pdclist.obj	\
	pdcfree.obj	pdccloop.obj	pdcexp.obj	pdcmem.obj	\
	pdcsqash.obj	pdcstr.obj	pdcprog.obj	pdcext.obj	\
	pdcseg.obj	lex.yy.obj	pdcval.obj	pdcwin32.obj	\
	pdcrun.obj	pdcmod.obj

COPTS=-c -DOS_WIN32 -WC -w-pro
CC=bcc32

.c.obj:
	$(CC) $(COPTS) $*.c
	

target:		$(INTERPRETER) $(RUNTIME)
		rm ../bin/*.map ../bin/*.MAP
		@echo $(INTERPRETER) and $(RUNTIME) have been built
		@ls -l $(INTERPRETER) $(RUNTIME)

pdcpars.tab.c:	pdcpars.y
		bison -vd pdcpars.y

lex.yy.c:	pdclex.l
		flex pdclex.l

$(INTERPRETER):	 $(OBJ) 
		tlink32 @tlink1.in

$(RUNTIME):	 $(OBJ) 
		tlink32 @tlink2.in

