# COOL Tests MS-DOS Borland C++ 3.1 Makefile

# See cool/makefile for the reasons for using these options
OPTIONS=-O-i -vi- -w-sig -w-amp -w-amb -w-cln $(OPTIONS)

COOLLIB=..\cool.lib

ALL= \
   test_as1.obj test_ass.obj test_avl.obj test_big.obj test_bit.obj \
   test_bt.obj test_cha.obj test_dt.obj test_gs.obj test_han.obj \
   test_has.obj test_ite.obj test_lis.obj test_m_v.obj test_mat.obj \
   test_nod.obj test_nt.obj test_pai.obj test_pro.obj test_rat.obj \
   test_reg.obj test_rng.obj test_sta.obj test_str.obj test_tim.obj \
   test_val.obj test_vec.obj test_que.obj test_set.obj \
#   test_ran.obj \   # these crash under BC++ 3.1, see 'todo'
#   test_com.obj \
#   test_qua.obj \

# Directory to put .obj files
OBJDIR=.
#.path.obj=$(OBJDIR)
.path.exe=.

CC=bcc
LINK=tlink
TLIB=tlib
INCDIR=c:\borlandc\include;..\..;..
LIBDIR=c:\borlandc\lib

MODEL=l
!if $(DEBUGGING)
OPTIONS=-v $(OPTIONS)
!else
OPTIONS=-O2 $(OPTIONS)
!endif

all: turboc.cfg $(ALL:.obj=.exe)

runall.out: turboc.cfg $(ALL:.obj=.exe)
   command /c for %f in (*.exe) do %f > runall.out

.obj.exe:
   $(CC) $(OPTIONS) $< $(COOLLIB)

.C.obj:
   $(CC) -c -P $(OPTIONS) { $< }

turboc.cfg: makefile
   echo -m$(MODEL) -w -d -n$(OBJDIR) -I$(INCDIR) > turboc.cfg
