#
#  Makefile for 32-Bit Demo Programs
#

# name the compilers
CC = wcc386
ASM = tasm

# options to use
#CFLAGS = -mf -oneat -5r -d2
#CFLAGS = -zq -s -omailnet -zp4 -5r -w4
#CFLAGS = -zq -s -omailnet -zp4 -5r -w4 -d3
#CFLAGS = -w4 -d2
#CFLAGS = -zq -s -omaxnet -zp4 -5s -w4
CFLAGS = -zq -s -omaxnet -zp4 -5s -w4 -d2
AFLAGS = /mx /zi /os
LNKOPT = system pmodew option quiet
#LNKOPT = system pmodew option quiet debug all
#LNKOPT = system dos4gw option quiet debug all
#LNKOPT = system dos4gw option quiet
#LNKOPT = option quiet

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

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

# explicit rules

test.exe : test.obj m3d_math.obj m3damath.obj m3d_geom.obj m3dageom.obj m3d_poly.obj m3dapoly.obj m3d_cam.obj &
	m3d_3dsl.obj m3d_lite.obj m3d_mat.obj
	wlink $(LNKOPT) @m3d.mk1

globe.exe : globe.obj
	wlink $(LNKOPT) name globe file globe

clean : .SYMBOLIC
	del *.obj

# implicit rules

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

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