#
# Keisanki Joron 2 (Introduction to Computing II)
# Dept. of Engineering Systems, University of Tsukuba
# 2005/10/21, kameda@iiit.tsukuba.ac.jp  Y.Kameda
#             [coutesy of Y.Nakamura]

#
# To use make command for compiling foo.c, type
# % make foo
#

#---------------------------------------------------------
# variables
#---------------------------------------------------------

# Compiler
CC	      = gcc

# Options used on compiling
CFLAGS        = -O2 -Wall 

# Options used on linking
LDFLAGS	      = -L/usr/X11R6/lib

# Libraries to be linked
LDLIBS	      = -lX11 -lXmu -lXi -lGL -lGLU -lglut -lm 

# Shared Objects 
SHAREDOBJS    = kj2-3Dscript-animation.o \
		kj2-3Dscript-datastructure.o \
		kj2-3Dscript-debug.o \
		kj2-3Dscript-drawfigure.o \
		kj2-3Dscript-file.o \
		kj2-3Dscript-geometry.o \
		kj2-3Dscript-global.o \
		kj2-3Dscript-glut-events.o \
		kj2-3Dscript-matrix.o \
		kj2-3Dscript-main.o

#---------------------------------------------------------
# make rules
#---------------------------------------------------------

clean:
	rm -f *.o *~ core

3Dscript: $(SHAREDOBJS)
	gcc -o $@ $(SHAREDOBJS) $(LDFLAGS) $(LDLIBS)

