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


tpf_lib:	ang.o draw.o f1616.o map.o screen.o vec.o arm_tpf.o fp_math.o tex.o obj.o
	$(LIB) tpf_lib o.*


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

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

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

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

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

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

arm_tpf.o:	arm_tpf.s
	$(ASM) arm_tpf.o arm_tpf.s

fp_math.o:	fp_math.s
	$(ASM) fp_math.o fp_math.s

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

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


ang.c:	ang.h f1616.h
	touch $@

draw.c:	draw.h screen.h f1616.h vec.h map.h ang.h tex.h obj.h
	touch $@

f1616.c:	f1616.h
	touch $@

map.c:	map.h tex.h vec.h ang.h
	touch $@

screen.c:	screen.h ang.h vec.h f1616.h
	touch $@

vec.c:	vec.h f1616.h ang.h
	touch $@

tex.c:	tex.h
	touch $@

obj.c:	obj.h ang.h vec.h tex.h
	touch $@


draw.h:	screen.h f1616.h map.h tex.h obj.h
	touch $@

screen.h:	f1616.h vec.h ang.h
	touch $@

vec.h:	f1616.h ang.h
	touch $@

map.h:	tex.h vec.h ang.h
	touch $@

obj.h:	ang.h vec.h tex.h
	touch $@

ang.h:	f1616.h
	touch $@
