# TAPER - Copyright (C) 1997-1999 ThunderWare Research Center

PROJ   = taper
LINK_S = dos4g

.ERASE

C_OPT   = -oo -mf -fp3 -fpi -3r -oxnt -zp1 -j -ei -wx -we /Fo=$^@  -fh=$^&.pch
CPP_OPT = -zq /Fo=$^@
#ASM_OPT = /nologo /c /Fo $^@
ASM_OPT = /c $^@

LNK_OPT = op{q} system $(LINK_S) option stack=48k
LNK     = $(PROJ).lnk

OBJS    = tpconfig.obj tpscreen.obj tpdisass.obj tpfile.obj   tpserpar.obj &
          tpaudio.obj  tpsnap.obj   tptape.obj   tpmenu.obj   tpedit.obj   &
          tpcust.obj   tpbasic.obj  tpmain.obj
LIBS    = wbench32\wbench32.lib

all : $(PROJ).exe

tpconfig.obj : tpconfig.c tpconfig.h wbench32\wbench32.h
tpscreen.obj : tpscreen.c tpscreen.h wbench32\wbench32.h tpconfig.h tpdisass.h
tpdisass.obj : tpdisass.c tpdisass.h wbench32\wbench32.h tpscreen.h tpconfig.h
tpfile.obj   : tpfile.c tpfile.h wbench32\wbench32.h tpconfig.h
tpserpar.obj : tpserpar.c tpserpar.h wbench32\wbench32.h tpconfig.h
tpaudio.obj  : tpaudio.c tpaudio.h wbench32\wbench32.h tpconfig.h
tpsnap.obj   : tpsnap.c tpsnap.h wbench32\wbench32.h tpconfig.h
tptape.obj   : tptape.c tptape.h wbench32\wbench32.h tpconfig.h tpdisass.h
tpmenu.obj   : tpmenu.c tpmenu.h wbench32\wbench32.h tpconfig.h tpdisass.h
tpedit.obj   : tpedit.c tpedit.h wbench32\wbench32.h tpconfig.h
tpcust.obj   : tpcust.c tpcust.h wbench32\wbench32.h tpconfig.h
tpbasic.obj  : tpbasic.c tpbasic.h wbench32\wbench32.h tpconfig.h
tpmain.obj   : tpmain.c tpmain.h wbench32\wbench32.h tpconfig.h

$(LNK) : makefile
	@echo -- Create Linker Project File
	@echo ----------------------------------
	@%create $(LNK)
	@%append $(LNK) name $(PROJ)
	@for %i in ($(OBJS)) do @%append $(LNK) file %i
	@for %i in ($(LIBS)) do @%append $(LNK) file %i

.c.obj :
	wcc386 $(C_OPT) $[@

.cpp.obj :
	wpp386 $(CPP_OPT) $[@

.asm.obj :
	d:\program\masm\masm $(ASM_OPT) $[@

$(PROJ).exe : $(OBJS) $(LNK) $(LIBS) makefile
	@echo -- Linking TAPER Executable
	@echo -----------------------------------
	@rem > result.lst
	wlink $(LNK_OPT) @$^* > result.lst

# End Of MakeFile..
