# This makefile is set up for Borland make 3.0/3.6
# With gnuish make 3.58 you have to uncomment the following line
#.SUFFIXES: .exe .c .S .o

CC     = gcc
CFLAGS = -O -Wall
LIB    = ../LIB/libbcc.a
INC    = ../INCLUDE
LGRX   = -lgrx

.c.o:
	$(CC) $(CFLAGS) -I$(INC) -c $*.c

.o.exe:
	$(CC) $(CFLAGS) $*.o $(LIB) $(LGRX) -lm -o $*
	strip $*
	aout2exe $*
	del $*

all: bccbgi.exe tfill.exe tpoly.exe ttext.exe tmodes.exe

bccbgi.: bccbgi.o $(LIB)
bccbgi.o: bccbgi.c htmext.inc
tmodes.: tmodes.o
ttext.:  ttext.o
tpoly.:  tpoly.o
tfill.:  tfill.o

clean:
	del *.o
	del tpoly
	del tpoly.exe
	del tmodes
	del tmodes.exe
	del tfill
	del tfill.exe
	del ttext
	del ttext.exe
	del bccbgi

cleanall: clean
	del bccbgi.exe
