
CC = gcc

INCLUDE = -I../include
LIBS = -L..
CFLAGS  = -Wall
CFLAGS += -m486 -O3 -ffast-math -fomit-frame-pointer $(INCLUDE)

TARGETS = blaah timertest mousetest paltest primtest

all: $(TARGETS)

primtest: primtest.o
	gcc $(CFLAGS) $(LIBS) primtest.o -o primtest -lmy -lvga -lm
	strip primtest

paltest: paltest.o
	gcc $(CFLAGS) $(LIBS) paltest.o -o paltest -lmy -lvga -lm
	strip paltest

mousetest: mousetest.o
	gcc $(CFLAGS) $(LIBS) mousetest.o -o mousetest -lmy -lvga -lm
	strip mousetest

timertest: timertest.o
	gcc $(CFLAGS) $(LIBS) timertest.o -o timertest -lmy -lvga -lm
	strip timertest

blaah:
	@cd Blaah;make

clean:
	rm -f *.o
	@cd Blaah;make clean

distclean: clean
	rm -rf $(TARGETS)
	@cd Blaah;make distclean

dep:
	gcc $(INCLUDE) -MM *.c > depend
	@cd Blaah;make dep

$(OBJS):
include depend
