#
# EXAMPLE MAKEFILE FOR XMSTEST TESTER/EXAMPLE PROGRAM FOR XMSIF
# BORLAND C++ 2.0
# 12/08/91
#
#   This is an example makefile for Borland C++, to make the XMSTEST
# tester/example program in any of the six supported memory models. It is
# compatible with the MAKE utility provided with the compiler. As supplied,
# it is set up to compile the in-line assembly versions of the functions in
# TESTUTIL.C. If you wish to use the in-line assembly code (it improves
# execution speed significantly), you do not need to make any changes.
# If you do not wish to use the in-line assembly code, simply remove
# "-DINLINE_ASM" from the line that begins "CFLAGS".
#
#   Before using this makefile, make sure that the Borland MAKE utility and
# the appropriate command-line compiler and linker are in your path. The
# four source files (XMSTEST.C, XMSTEST2.C, XMSTEST3.C, and TESTUTIL.C), the
# header files (XMSTEST.H, TESTUTIL.H, and XMSIF.H), the appropriate library
# or libraries (XMSIF*.LIB), and STACK.OBJ (if making the tiny-model example)
# should all be in the current directory. TLINK is assumed to know where the
# standard objects and libraries are (this should be set up in a file
# TLINK.CFG which should be in the same directory as TLINK.EXE; see the
# manuals for more information).
#
#   To use the makefile, type "make -fexmakebc target", where 'target' is
# one or more of tiny, small, medium, compact, large, or huge, separated by
# spaces. For example, "make -fexmakebc tiny" would make the tiny-model
# example and "make -fexmakebc small large" would make the small- and large-
# model examples. "make -fexmakebc" will make the test programs for all
# memory models.
#

CC	= bcc
CFLAGS	= -c -d -DINLINE_ASM

LINK	= tlink
LF	= /c /x


all:		tiny small medium compact large huge

tiny:		txmstest

small:		sxmstest

medium:		mxmstest

compact:	cxmstest

large:		lxmstest

huge:		hxmstest


txmstest.obj:	xmstest.c xmstest.h testutil.h
	$(CC) $(CFLAGS) $(CFLAGS2) -mt -o$< xmstest.c

sxmstest.obj:	xmstest.c xmstest.h testutil.h
	$(CC) $(CFLAGS) $(CFLAGS2) -ms -o$< xmstest.c

mxmstest.obj:	xmstest.c xmstest.h testutil.h
	$(CC) $(CFLAGS) $(CFLAGS2) -mm -o$< xmstest.c

cxmstest.obj:	xmstest.c xmstest.h testutil.h
	$(CC) $(CFLAGS) $(CFLAGS2) -mc -o$< xmstest.c

lxmstest.obj:	xmstest.c xmstest.h testutil.h
	$(CC) $(CFLAGS) $(CFLAGS2) -ml -o$< xmstest.c

hxmstest.obj:	xmstest.c xmstest.h testutil.h
	$(CC) $(CFLAGS) $(CFLAGS2) -mh -o$< xmstest.c

txmstst2.obj:	xmstest2.c xmstest.h testutil.h
	$(CC) $(CFLAGS) -mt -o$< xmstest2.c

sxmstst2.obj:	xmstest2.c xmstest.h testutil.h
	$(CC) $(CFLAGS) -ms -o$< xmstest2.c

mxmstst2.obj:	xmstest2.c xmstest.h testutil.h
	$(CC) $(CFLAGS) -mm -o$< xmstest2.c

cxmstst2.obj:	xmstest2.c xmstest.h testutil.h
	$(CC) $(CFLAGS) -mc -o$< xmstest2.c

lxmstst2.obj:	xmstest2.c xmstest.h testutil.h
	$(CC) $(CFLAGS) -ml -o$< xmstest2.c

hxmstst2.obj:	xmstest2.c xmstest.h testutil.h
	$(CC) $(CFLAGS) -mh -o$< xmstest2.c

txmstst3.obj:	xmstest3.c xmstest.h testutil.h
	$(CC) $(CFLAGS) -mt -o$< xmstest3.c

sxmstst3.obj:	xmstest3.c xmstest.h testutil.h
	$(CC) $(CFLAGS) -ms -o$< xmstest3.c

mxmstst3.obj:	xmstest3.c xmstest.h testutil.h
	$(CC) $(CFLAGS) -mm -o$< xmstest3.c

cxmstst3.obj:	xmstest3.c xmstest.h testutil.h
	$(CC) $(CFLAGS) -mc -o$< xmstest3.c

lxmstst3.obj:	xmstest3.c xmstest.h testutil.h
	$(CC) $(CFLAGS) -ml -o$< xmstest3.c

hxmstst3.obj:	xmstest3.c xmstest.h testutil.h
	$(CC) $(CFLAGS) -mh -o$< xmstest3.c

ttstutil.obj:	testutil.c testutil.h
	$(CC) $(CFLAGS) -mt -o$< testutil.c

ststutil.obj:	testutil.c testutil.h
	$(CC) $(CFLAGS) -ms -o$< testutil.c

mtstutil.obj:	testutil.c testutil.h
	$(CC) $(CFLAGS) -mm -o$< testutil.c

ctstutil.obj:	testutil.c testutil.h
	$(CC) $(CFLAGS) -mc -o$< testutil.c

ltstutil.obj:	testutil.c testutil.h
	$(CC) $(CFLAGS) -ml -o$< testutil.c

htstutil.obj:	testutil.c testutil.h
	$(CC) $(CFLAGS) -mh -o$< testutil.c


txmstest:	txmstest.obj txmstst2.obj txmstst3.obj ttstutil.obj stack.obj \
		xmsifs.lib
	$(LINK) $(LF) c0t txmstest txmstst2 txmstst3 ttstutil stack, \
			txmstest, , cs xmsifs

sxmstest:	sxmstest.obj sxmstst2.obj sxmstst3.obj ststutil.obj xmsifs.lib
	$(LINK) $(LF) c0s sxmstest sxmstst2 sxmstst3 ststutil, \
			sxmstest, , cs xmsifs

mxmstest:	mxmstest.obj mxmstst2.obj mxmstst3.obj mtstutil.obj xmsifm.lib
	$(LINK) $(LF) c0m mxmstest mxmstst2 mxmstst3 mtstutil, \
			mxmstest, , cm xmsifm

cxmstest:	cxmstest.obj cxmstst2.obj cxmstst3.obj ctstutil.obj xmsifc.lib
	$(LINK) $(LF) c0c cxmstest cxmstst2 cxmstst3 ctstutil, \
			cxmstest, , cc xmsifc

lxmstest:	lxmstest.obj lxmstst2.obj lxmstst3.obj ltstutil.obj xmsifl.lib
	$(LINK) $(LF) c0l lxmstest lxmstst2 lxmstst3 ltstutil, \
			lxmstest, , cl xmsifl

hxmstest:	hxmstest.obj hxmstst2.obj hxmstst3.obj htstutil.obj xmsifh.lib
	$(LINK) $(LF) c0h hxmstest hxmstst2 hxmstst3 htstutil, \
			hxmstest, , ch xmsifh

