PROJ   = Exam
LINK_S = dos4g

.ERASE

C_OPT   = -i=$(%WATCOM)\h -zq /Fo=$^@
CPP_OPT = -i=$(%WATCOM)\h -zq /Fo=$^@
ASM_OPT = /nologo /c /Zi /Fo $^@
DEBUG_APPEND = @rem

LNK_OPT =  system $(LINK_S)
LNK     = $(PROJ).lnk

OBJS    = dgMain.obj 
LIBS  =  \dgPIXADK\dgSys.lib \dgPIXADK\dgdraw.lib \dgPIXADK\dgImage.lib

all : $(PROJ).exe

dgMain.obj      : dgMain.c

$(LNK) : makefile
	@echo  Create Linker Project File
	@echo 
	@%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 :
	ml $(ASM_OPT) $[@

$(PROJ).exe : $(OBJS) $(LNK) $(LIBS) makefile
	@echo  Linking With Debug Option = $(DEBUG)
	@echo ?
	wlink $(LNK_OPT) @$^*

# End Of MakeFile..
