#
#  Makefile for WAFT
#

#which memory model and processor to use by default
PROCESSOR = 386 # for the 32-bit compilers

# name the compiler
CC = wcc$(PROCESSOR)

!ifeq PROCESSOR 386
MODEL = f       # flat
!else
MODEL = l       # large
!endif

# options to use
CFLAGS = -m$(MODEL) -zq
LNKOPT = option quiet

.EXTENSIONS:
.EXTENSIONS: .exe .obj .c

.BEFORE
        @set INCLUDE=.;$(%watcom)\h
        @set DOS4G=QUIET

# explicit rules

exes = waft.exe

all :   $(exes) .SYMBOLIC
        @%null

waft.exe : waft.obj &
           word.obj &
           mode.obj &
           help.obj &
           serve.obj &
           test.obj &
           process.obj &
           symbol.obj &
           let.obj &
           define.obj &
           language.obj .PRECIOUS
      wlink $(LNKOPT) system dos4g name waft @waft.lnk

clean : .SYMBOLIC
        del *.obj
        del *.exe

# implicit rules

.c.obj :
        $(CC) $^& $(CFLAGS)

