TARGET	=	objects.o

CPP	=	g++
CXX	=	g++
CC	=	gcc
LD	=	ld
MOC	=	moc
MSGFMT	= 	msgfmt
CP	=	cp -u
RM	=	rm -f

INCL	=	-I../../include -I../classes
CPPINCL	=	$(INCL)

OBJS	=	script.o\
		cmesh.o \
		graph.o \
		csg.o\
		blob.o\
		sphere.o\
		cylinder.o\
		box.o\
		torus.o\
		cone.o\
		text.o\
		disc.o\
		triangle.o\
		plane.o\
		heightfield.o\
		obj.o\
		ref.o\
		refptr.o \
		world.o\
		mesh.o\
		lightpoint.o\
		spotlight.o \
		view.o \
		camera.o

#		lathe.o \
#		poly.o\
#		cubic.o\
#		quartic.o\
#		quadric.o\
#		prism.o\
#		superellipsoid.o\

.SUFFIXES:	.cpp

.cpp.o:
		$(CPP) $(CPPFLAGS) -c $(CPPINCL) $<

.cc.o:
		$(CPP) $(CPPFLAGS) -c $(CPPINCL) $<

%.cpp:		%.h

all:		debug

release:	$(TARGET)

debug:		$(TARGET)

new:		clean all


$(TARGET):	$(OBJS)
		$(LD) -r -o $(TARGET) $(OBJS)
		$(CP) $(TARGET) ../$(TARGET)

clean:
		$(RM) $(OBJS) $(TARGET) *~ 


graph:		cmeshtest.cpp
		$(CPP) -g -Wall -o cmeshtest $(CPPINCL) cmeshtest.cpp -lm

