
PROJ   = FLCTEST
LINK_S = 386
DEBUG  = no

.ERASE

!ifeq DEBUG yes
C_OPT   = -i=$(%WATCOM)\h -zq -d2 -ot -oi -os -ol -om /Fo=$^@
CPP_OPT = -i=$(%WATCOM)\h -zq -d2 -ot -oi -os -ol -om /Fo=$^@
ASM_OPT = /nologo /c /Zi /Fo $^@
DEBUG_APPEND = @%append $(LNK) debug all
!else
C_OPT   = -i=$(%WATCOM)\h -zq -ot -oi -ol -om -ox /Fo=$^@
CPP_OPT = -i=$(%WATCOM)\h -zq -ot -oi -ol -om -ox /Fo=$^@
ASM_OPT = /nologo /c /Fo $^@
DEBUG_APPEND = @rem
!endif

LNK_OPT = op{q} system $(LINK_S)
LNK     = $(PROJ).lnk

OBJS    = video.obj flctest.obj 
LIBS    = 

all : $(PROJ).exe

video.obj     : video.cpp video.h realdos.h 

flctest.obj   : flctest.cpp video.h 

$(LNK) : makefile
	@%create $(LNK)
	$(DEBUG_APPEND)
	@%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 :
	tasm $(ASM_OPT) $[@

$(PROJ).exe : $(OBJS) $(LNK) $(LIBS) makefile
	wlink $(LNK_OPT) @$^* > result.lst

# Ene Of MakeFile..
