#sample Makefile for using OpenGL 
include ../../opengl-dir.mk

PROG	= boxes
XLIBS	= -lX11 -lXext -lXmu -lXext -lXmu -lXt -lXi -lSM -lICE
LIBS	= -lglut -lGLU -lGL
INCLS	= -I/usr/X11R/include -I$(TOP)/include
LIBDIR	= -L/usr/X11/lib -L/usr/X11R6/lib -L$(TOP)/lib

#source codes
SRCS   = $(PROG).cpp point2.cpp turtle.cpp

#substitute .cpp by .o to obtain object filenames
OBJS   = $(SRCS:.cpp=.o)

#$< evaluates to the target's dependencies, 
#$@ evaluates to the target

$(PROG): $(OBJS)
	g++ -o $@ $(OBJS)  $(LIBDIR) $(LIBS) $(XLIBS)

$(OBJS): 
	g++ -c  $*.cpp $(INCLS) 

clean:
	rm $(OBJS); rm $(PROG) 

