#
#  Makefile for Rise of the Triad
#
#  To profile:
#       Uncomment PROFILE in PROFILE.H
#       Recompile and run engine:
#               wsamprsi engine .. .. ..
#
#       This will generate engine.smp
#
#       Use:
#               wprof engine
#
#       To view the results
#
PROCESSOR = 386

# name the compiler
CC = wcc$(PROCESSOR)
FC = wfc$(PROCESSOR)
ASM = tasm

MODEL = f       # flat

# options to use
#CFLAGS = -m$(MODEL) /d1 /zp4 /5r /zq /wx /d2
#CFLAGS = -m$(MODEL) /d1 /oneatx /zp4 /5r /zq /wx /d2
#CFLAGS = -m$(MODEL) /d1 /oneatx /zp4 /5r /zq /wx
CFLAGS = -m$(MODEL) /oneatx /zp4 /5r /zq /wx
AFLAGS = /p /zi /mx
LNKOPT = option quiet debug all

.EXTENSIONS:
.EXTENSIONS: .exe .lib .obj .asm .c

test.obj   : test.c keyboard.h comm.h types.h

keyboard.obj : keyboard.c keyboard.h types.h

comm.obj   : comm.c comm.h gamecom.h types.h

error.obj : error.c error.h types.h

crc.obj :   crc.c crc.h types.h

test.exe   : test.obj keyboard.obj comm.obj error.obj crc.obj
             wlink @test.lnk

all : test.exe .symbolic
      @echo Building All
      @%null

# implicit rules

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

.asm.obj :
        $(ASM) $(AFLAGS) $^&;









