
#
# Makefile for EEcad program. Turbo C++ tcc (and up) is assumed available.
#


# Works only on TC++ 1.0 make and up - swap out make before invoking command.
.SWAP

# Your C compiler and linker
CC = tcc
LNK = tlink

# Include directories other than default ones.
INC = -Ic:\usr\tc\include -I\usr\include
LIB = c:\usr\tc\lib
LIB2 = c:\usr\lib

# Non debug flags:
#
# BC 2.0 or previous
# CFLAGS = -ml -c -a- -ff -G -O -r -d -w -v- -y- -k- -N-
#
# BC++ 3.0 (with optimizer).
CFLAGS = -ml -c -a- -ff -G -O1 -r -d -w -v- -y- -k- -N-
LFLAGS = /x/c

# Debug flags:
# CFLAGS = -ml -c -a- -ff -d -w -N -v -y
# LFLAGS = /v

#
# Libs to link with
#
LIBS =  $(LIB2)\intr_lib.lib $(LIB2)\misc_lib.lib \
	$(LIB)\graphics.lib $(LIB)\emu.lib \
	$(LIB)\mathl.lib $(LIB)\cl.lib

# The {$< } is also new to TC++ 1.0 make - remove the { } pair if your make
# choke on them (the { } signals batch mode that combines few operation at the
# same time - very nice feature!).
.c.obj:
	$(CC) $(INC) $(CFLAGS) {$< }

OBJS =	ctrl-brk.obj director.obj eecreate.obj eecad.obj \
 	eelibs1.obj eelibs2.obj eeload.obj eemodify.obj eeredraw.obj \
	eestatus.obj eestring.obj eelayer.obj

EEDraw:	$(OBJS)
	$(LNK) @&&!
c:\usr\tc\lib\c0l.obj+
$(OBJS)
eecad.exe
eecad.map
$(LIBS)
!$(LFLAGS)

ctrl-brk.obj:	ctrl-brk.h
director.obj:	program.h director.h ctrl-brk.h eeredraw.h
eecreate.obj:	program.h eemodify.h eecreate.h eeredraw.h
eecad.obj:	program.h eelibs.h eecreate.h eeredraw.h eestatus.h eemodify.h eeload.h director.h ctrl-brk.h
eelibs1.obj:	program.h director.h eelibs.h eelibsl.h eemodify.h eeredraw.h eestring.h
eelibs2.obj:	program.h director.h eelibs.h eelibsl.h eeload.h eemodify.h eeredraw.h eestring.h
eeload.obj:	program.h director.h eelibs.h eemodify.h eeredraw.h eeload.h
eemodify.obj:	program.h eelibs.h eemodify.h eeredraw.h eestring.h
eeredraw.obj:	program.h eeredraw.h eemodify.h eestring.h
eestatus.obj:	program.h eestatus.h
eestring.obj:	program.h eestring.h
eelayer.obj:	program.h eelayer.h
