COPT=-mf -oaeilmnrtx -s -zp4 -3r
LOPT=-mf -oaeilmnrtx -s -zp4 -3r

EXE=mixtest.exe
OBJ=smix.obj detect.obj mixtest.obj lowmem.obj

# Do a complete rebuild if the makefile has changed
MAK=makefile

$(EXE) : $(OBJ) $(MAK)
  wcl386 $(OBJ) /fe=$(EXE) $(LOPT)

detect.obj : detect.c $(MAK)
  wcc386 detect.c $(COPT)

lowmem.obj : lowmem.c $(MAK)
  wcc386 lowmem.c $(COPT)

# smix.c MUST be compiled with the -zu compiler switch
smix.obj : smix.c lowmem.h $(MAK)
  wcc386 smix.c $(COPT) -zu

mixtest.obj : mixtest.c smix.h detect.h $(MAK)
  wcc386 mixtest.c $(COPT)

