#
# CSG Raytracer
#
# OS/2, 32 bit
# IBM C-Set++
#
# The last time /O+ was tried, it caused floating point exceptions.
# This is still true of C-Set++ GA.
#

COMMON =	e:\ak\common
GBM =		e:\ak\gbm\gbm

CFLAGS =	/C+ /I$(COMMON) /I$(GBM) /W3 /G4 /Gd-e+m+ /Q+ /DOS2 /Gf+
#CFLAGS =	/C+ /I$(COMMON) /I$(GBM) /W3 /G4 /Gd-e+m+ /Q+ /DOS2 /Gf+ /Ti+
LFLAGS =	/NOI /ALIGN:4 /BASE:0x10000 /STACK:0x30000 /PMTYPE:VIO /BATCH /NOLOGO
#LFLAGS =	/NOI /ALIGN:4 /BASE:0x10000 /STACK:0x30000 /PMTYPE:VIO /BATCH /NOLOGO /DEBUG

.SUFFIXES:	.c .obj

.c.obj:
		icc $(CFLAGS) $*.c

#

rt.exe:		fio.obj tex.obj vector.obj rgbvec.obj col.obj surf.obj sil.obj plane.obj biplane.obj sphere.obj quad.obj shape.obj rt.obj $(GBM)\gbm.lib
		link386 $(LFLAGS) fio tex vector rgbvec col surf sil plane biplane sphere quad shape rt,rt.exe,nul,$(GBM)\gbm;
		copy $(GBM)\gbm.dll

fio.obj:	fio.c $(GBM)\gbm.h

tex.obj:	tex.c

vector.obj:	vector.c vector.h

rgbvec.obj:	rgbvec.c rgbvec.h

col.obj:	col.c rt.h fio.h tex.h vector.h rgbvec.h

surf.obj:	surf.c rt.h fio.h tex.h vector.h rgbvec.h col.h surf.h

sil.obj:	sil.c rt.h vector.h sil.h

plane.obj:	plane.c rt.h vector.h sil.h plane.h

biplane.obj:	biplane.c rt.h vector.h sil.h biplane.h

sphere.obj:	sphere.c rt.h vector.h sil.h sphere.h

quad.obj:	quad.c rt.h vector.h sil.h quad.h

shape.obj:	shape.c rt.h fio.h tex.h vector.h rgbvec.h col.h surf.h sil.h plane.h biplane.h sphere.h quad.h shape.h

rt.obj:		rt.c rt.h fio.h tex.h vector.h rgbvec.h col.h surf.h sil.h plane.h biplane.h sphere.h quad.h shape.h

#

clean:
		-del *.obj 2> nul
