# This makefile is set up for Linux / GNU make

.SUFFIXES: .c .S .o

CC     = gcc
CFLAGS = -O -Wall -fomit-frame-pointer
INC    = # ../include
LGRX   = -lbcc -lgrx -lvga
LIB_DEP= $(LIB)

.c.o:
	$(CC) $(CFLAGS) -I$(INC) -c $*.c

.o:
	$(CC) $(CFLAGS) $*.o $(LIB) $(LGRX) -lm -o $*
	strip $*
	chmod a+rs,go-w $*

all: bccbgi tfill tpoly ttext tmodes

vgatime:	vgatime.o
bccbgi:		bccbgi.o $(LIB_DEP)
bccbgi.o:	bccbgi.c htmext.inc
tmodes:		tmodes.o $(LIB_DEP)
ttext:		ttext.o  $(LIB_DEP)
tpoly:		tpoly.o  $(LIB_DEP)
tfill:		tfill.o  $(LIB_DEP)

clean:
	rm -f vgatime bccbgi tmodes ttext tpoly tfill *.o vgatimes core* *~


cleanprogs:
	rm -f bccbgi tpoly tmodes tfill ttext

cleanall: clean cleanprogs


