
#	Proggies
CC = gcc -c -mthrowback -Wall -mpoke-function-name -mlibscl -O2 -o
LINK = gcc -mlibscl -o
LIB = ar -c
ASM = gcc -c -mthrowback -o

WOUMI = <WoumInclude$$Path>

#	Object files

main.o: main.c
	$(CC) main.o main.c

car.o: car.c
	$(CC) car.o car.c

game.o: game.c
	$(CC) game.o game.c

level.o: level.c
	$(CC) level.o level.c

message.o: message.c
	$(CC) message.o message.c

#	C files

main.c: $(WOUMI)lib.h.screen $(WOUMI)lib.h.keyboard car.h game.h level.h message.h
	touch main.c

car.c: car.h
	touch car.c

game.c: $(WOUMI)lib.h.keyboard game.h car.h
	touch game.c

level.c: level.h
	touch level.c

message.c: message.h
	touch message.c
 
#	Header files

car.h: level.h
	touch car.h

game.h: level.h
	touch game.h

level.h: $(WOUMI)lib.gp.h.spr
	touch level.h

message.h: $(WOUMI)lib.gp.h.font
	touch message.h

#	Other files

$(WOUMI)lib.gp.o.%:
	dir $(WOUMI)lib.gp
	make $*.o
	dir <Matter$$Dir>.source

$(WOUMI)lib.o.%:
	dir $(WOUMI)lib
	make $*.o
	dir <Matter$$Dir>.source

#	Proggies!

^.!RunImage: $(WOUMI)lib.gp.o.col $(WOUMI)lib.gp.o.screen $(WOUMI)lib.gp.o.scrplot $(WOUMI)lib.gp.o.spr $(WOUMI)lib.gp.o.simpspr $(WOUMI)lib.gp.o.paintspr $(WOUMI)lib.gp.o.sprplotgen $(WOUMI)lib.gp.o.font $(WOUMI)lib.o.screen $(WOUMI)lib.o.armscreen $(WOUMI)lib.o.fp_math $(WOUMI)lib.o.fixmath $(WOUMI)lib.o.keyboard $(WOUMI)lib.o.error $(WOUMI)lib.o.sasm main.o car.o game.o level.o message.o
	gcc -o ^.!RunImage Woum:lib/gp/col.o Woum:lib/gp/screen.o Woum:lib/gp/scrplot.o Woum:lib/gp/spr.o Woum:lib/gp/simpspr.o Woum:lib/gp/paintspr.o Woum:lib/gp/sprplotgen.o Woum:lib/gp/font.o Woum:lib/screen.o Woum:lib/armscreen.o Woum:lib/fp_math.o Woum:lib/fixmath.o Woum:lib/keyboard.o Woum:lib/error.o Woum:lib/sasm.o main.o car.o game.o level.o message.o -mlibscl
