# Makefile Template

FLAGS  = -O2
CC = gcc 

# Hardware GL
LIBS = -L/usr/lib -L/opt/gup/mp/glut-3.7/lib/glut -lglut -lGL -lGLU -lXmu -lXext -lX11 -lm

# Mesa
#LIBS = -L/system/apps/ogl/lib -lglut -lMesaGL -lMesaGLU -lXmu -lXext -lX11 -lm

INCLUDES = -I/usr/include

.c.o:
	$(CC) $(FLAGS) -c $(INCLUDES) $<

OBJS = framework.o 

# to generate more object files, 
# just add them.
# add a backslash "\" at end of line
# 
# OBJS = framework.o \
#	 file01.o \
#	 file02.o \
#	 file03.o 

all: myProgram

myProgram: $(OBJS)
	$(CC) $(FLAGS) $(OBJS) $(INCLUDES) $(LIBS) -o $@

dep: depend

depend:
	$(CC) $(FLAGS) -M $(OBJS:.o=.c)  > .depend

clean:
	rm -f $(OBJS) ; rm -f myProgram ; rm -f core

run:
	./myProgram

include .depend
