# 8086 Linkage for misc. MS-DOS Ray Tracing Programs by Aaron A. Collins
# Uses Turbo-C 2.0 and Turbo-Link.  Uses system environment variable
# LIB for the .LIB file path.  This file is released to the public domain.

#
# MAKE Macros and Such...
#

CC	=tcc
CMODEL	=c

# Uncomment for 8086/8088 instruction set usage
#
#CFLAGS	=-m$(CMODEL) -r -K -G -O -Z -d -c -v- -k- -N-


# Uncomment for 80186/80268 (V20!) instruction set usage
#
CFLAGS	=-m$(CMODEL) -1 -a -r -K -G -O -Z -d -c -v- -k- -N-


TLINK	=tlink
LINKFLAGS=$(LIB)\fp87+$(LIB)\math$(CMODEL)+$(LIB)\c$(CMODEL);

QRTOBJS = qrt.obj bbox.obj error.obj inout.obj instance.obj intersec.obj lexer.obj mth.obj norm.obj offset.obj pattern.obj patterni.obj precomp.obj ray.obj relpos.obj resize.obj stack.obj


# Uncomment These for No NPE Support ...from here...
#
#.c.obj :
# $(CC) $(CFLAGS) -f $<
#
#qrt.exe : $(QRTOBJS)
# $(TLINK) @qrt.lnk
#
# ...to here... OR...

# Uncomment These for NDP Extension (80x87) Support ...from here...
#
.c.obj :
 $(CC) $(CFLAGS) -f87 $<
#
qrt.exe : $(QRTOBJS)
 $(TLINK) @qrt87.lnk
#
# ...to here.

#
# These are DKB/QRT "RAW" file format translation postprocessors...
#

qrtpost.exe : qrtpost.obj
 $(TLINK) $(LIB)\c0c+qrtpost,qrtpost,qrtpost/m,$(LINKFLAGS)

qrtraw.exe : qrtraw.obj
 $(TLINK) $(LIB)\c0c+qrtraw,qrtraw,qrtraw/m,$(LINKFLAGS)

qrttarga.exe : qrttarga.obj
 $(TLINK) $(LIB)\c0c+qrttarga,qrttarga,qrttarga/m,$(LINKFLAGS)

qrtsumm.exe : qrtsumm.obj
 $(TLINK) $(LIB)\c0c+qrtsumm,qrtsumm,qrtsumm/m,$(LINKFLAGS)

