# File: Makefile (unix version)
# Simple Makefile to test a 
# hello world style program
# test each component of GCC
# Runs the pre-processor, the C compiler, the assembler, then the linker.

CC = gcc

OBJECTS =	fib.o

CFLAGS = -v -O
LDFLAGS =

fib.x: $(OBJECTS) fib.i fib.s fib.o
	$(CC) -o fib $(OBJECTS) $(LDFLAGS)

$(OBJECTS):


fib.o: fib.s
	$(CC) $(CFLAGS) -c fib.s -o $@
fib.s: fib.i
	$(CC) $(CFLAGS) -S fib.i -o fib.s
fib.i:
	$(CC) $(CFLAGS) -E fib.c -o fib.i


clean:	
	@del /q fib.x fib.i fib.s fib.o
