#Makefile for ppc

#What compiler to be used. Make sure it understands ANSI C.
CC = gcc

#Compile in Debugging information? As well, any other options to pass to the
#  compiler? Due to the use of port commands, optimization is nessecary here.
FLAGS = -O2

#What libraries are need to compile this? You are going to need 
#  at least ncurses.
LIBS = -lncurses -lm

#Where are the libraries that we need?
LIBPATH = 

#----------------------------------------------------------------------------#
# Nothing below this point should need to be modified.                       #
#----------------------------------------------------------------------------#

OBJECTS = ppc.o interface.o util.o

all: ppc

ppc: $(OBJECTS)
	$(CC) $(FLAGS) -o ppc $(OBJECTS) $(LIBS) $(LIBPATH)

ppc.o: ppc.h ppc.c interface.h util.h
	$(CC) $(FLAGS) -c ppc.c

interface.o: interface.c interface.h util.h ppc.h
	$(CC) $(FLAGS) -c interface.c

util.o: util.h util.c
	$(CC) $(FLAGS) -c util.c

.PHONY: clean

clean:
	-rm -f $(OBJECTS) ppc

#EOF
