# Lucifer V1.0
# By Peter Todd (c) 1999
#
# Note that the dos edit command doesn't work. When your press tab it 
# inserts spaces instead of a tab. :(

CC = gcc
CFLAGS = -g -Wall 

all: main.o memory.o storage.o cpu.o fpu.o mathfunc.o
	$(CC) $(CFLAGS) -lm -o lucifer main.o memory.o storage.o cpu.o fpu.o mathfunc.o testpat.o version.o

main.o: main.c main.h version.o
	$(CC) $(CFLAGS) -c main.c

memory.o: memory.c memory.h testpat.o
	$(CC) $(CFLAGS) -c memory.c

storage.o: storage.c storage.h testpat.o
	$(CC) $(CFLAGS) -c storage.c

cpu.o: cpu.c cpu.h
	$(CC) $(CFLAGS) -c cpu.c

fpu.o: fpu.c fpu.h
	$(CC) $(CFLAGS) -c fpu.c

mathfunc.o: mathfunc.c mathfunc.h
	$(CC) $(CFLAGS) -c mathfunc.c

testpat.o: testpat.c
	$(CC) $(CFLAGS) -c testpat.c

version.o: version.c
	$(CC) $(CFLAGS) -c version.c

clean:
	rm *.o
	rm lucifer

realclean: clean
	rm *~


