# -- makefile for code using openGL
#    if you  encounter the message: "Missing separator..."
#    make sure that all indented lines are indented by using a TAB
#    rather than blanks

CC = gcc 
CFLAGS = -g -c

# -- Choose Lib path for your platform ---

# uncomment below when compiling on the SGIs (room 313)
LDLIBS = -rpath /usr/lib32:/usr/local/lib32 \
	-L/usr/lib32 -L/usr/local/lib32 -lglut -lXi -lGLU -lGL \
	-lX11 -lXmu -lm

# uncomment below when compiling under Solaris 
#LDLIBS = -lglut  -lGL -lGLU -L/usr/X11R6/lib -lXi -lXmu \
	-lXext -lXm -lX11 -lm 

# uncomment below when compiling under Linux 6.x
#LDLIBS = -lglut  -lMesaGL -lMesaGLU -L/usr/X11R6/lib -lXi -lXmu \
#	-lXext -lX11 -lm 


# ---- Files --- 
output	: nurb_gl1 nurb_gl2

ALL	= pcp3.o drawtri.o rotate.o nurb_gl1.o

nurb_gl1:    $(ALL)
	$(CC) -o nurb_gl1 -g $(ALL) $(LDLIBS)

ALLFOR2	= pcp3.o drawtri.o rotate.o nurb_gl2.o

nurb_gl2:    $(ALLFOR2)
	$(CC) -o nurb_gl2 -g $(ALLFOR2) $(LDLIBS)

.c.o:
	$(CC) $(CFLAGS) $*.c

clean:
	rm *.o nurb_gl1 nurb_gl2


