PREPARGS=
ASMBARGS=
COMPARGS=
LINKARGS=

build: myExec

test.i: test.c test.h
	gcc -E -o test.i $(PREPARGS) test.c

fred.i: fred.c
	gcc -E -o fred.i $(PREPARGS) fred.c

test.s: test.i
	gcc -S $(ASMBARGS) test.i

fred.s: fred.i
	gcc -S $(ASMBARGS) fred.i

test.o: test.s
	gcc -c $(COMPARGS) test.s

fred.o: fred.s
	gcc -c $(COMPARGS) fred.s

myExec: test.o fred.o
	gcc -o myExec $(LINKARGS) test.o fred.o

clean:
	rm -f a.out *~ myExec

realclean: clean
	rm -f *.i *.s *.o
