CC = g++
CCFLAGS = -Wall -O3 -finline

# ----- Example programs --------------------------------------------------------

PROG_SRC = BallRenderer.cpp FunctionSphereRenderer.cpp GaussianRenderer.cpp GlobalCGContext.cpp HelixRenderer.cpp HollowCylinderRenderer.cpp ImposterRenderer.cpp PlainSphereRenderer.cpp sphereDrawing.cpp StickRenderer.cpp Texture.cpp
PROG_OBJ = BallRenderer.o FunctionSphereRenderer.o GaussianRenderer.o GlobalCGContext.o HelixRenderer.o HollowCylinderRenderer.o ImposterRenderer.o PlainSphereRenderer.o sphereDrawing.o StickRenderer.o Texture.o
TARGET = libImposterRenderer.a

# -------------------------------------------------------------------------------

all:    Makefile $(TARGET)

$(TARGET): $(PROG_OBJ)
	rm -f $(TARGET)
	ar cqs $(TARGET) $(PROG_OBJ)

BallRenderer.o: BallRenderer.cpp
	$(CC) $(CCFLAGS) -c BallRenderer.cpp -o BallRenderer.o -I. -I../OpenGL_Viewer -I../UsefulMath

FunctionSphereRenderer.o: FunctionSphereRenderer.cpp
	$(CC) $(CCFLAGS) -c FunctionSphereRenderer.cpp -o FunctionSphereRenderer.o -I. -I../OpenGL_Viewer -I../UsefulMath

GaussianRenderer.o: GaussianRenderer.cpp
	$(CC) $(CCFLAGS) -c GaussianRenderer.cpp -o GaussianRenderer.o -I. -I../OpenGL_Viewer -I../UsefulMath

GlobalCGContext.o: GlobalCGContext.cpp
	$(CC) $(CCFLAGS) -c GlobalCGContext.cpp -o GlobalCGContext.o -I. -I../OpenGL_Viewer -I../UsefulMath

HelixRenderer.o: HelixRenderer.cpp
	$(CC) $(CCFLAGS) -c HelixRenderer.cpp -o HelixRenderer.o -I. -I../OpenGL_Viewer -I../UsefulMath

HollowCylinderRenderer.o: HollowCylinderRenderer.cpp
	$(CC) $(CCFLAGS) -c HollowCylinderRenderer.cpp -o HollowCylinderRenderer.o -I. -I../OpenGL_Viewer -I../UsefulMath

ImposterRenderer.o: ImposterRenderer.cpp
	$(CC) $(CCFLAGS) -c ImposterRenderer.cpp -o ImposterRenderer.o -I. -I../OpenGL_Viewer -I../UsefulMath

PlainSphereRenderer.o: PlainSphereRenderer.cpp
	$(CC) $(CCFLAGS) -c PlainSphereRenderer.cpp -o PlainSphereRenderer.o -I. -I../OpenGL_Viewer -I../UsefulMath

sphereDrawing.o: sphereDrawing.cpp
	$(CC) $(CCFLAGS) -c sphereDrawing.cpp -o sphereDrawing.o -I. -I../OpenGL_Viewer -I../UsefulMath

StickRenderer.o: StickRenderer.cpp
	$(CC) $(CCFLAGS) -c StickRenderer.cpp -o StickRenderer.o -I. -I../OpenGL_Viewer -I../UsefulMath

Texture.o: Texture.cpp
	$(CC) $(CCFLAGS) -c Texture.cpp -o Texture.o -I. -I../OpenGL_Viewer -I../UsefulMath

clean:
	rm $(TARGET) BallRenderer.o FunctionSphereRenderer.o GaussianRenderer.o GlobalCGContext.o HelixRenderer.o HollowCylinderRenderer.o ImposterRenderer.o PlainSphereRenderer.o sphereDrawing.o StickRenderer.o Texture.o

