# Header para Makefile de modulos ligados dinamicamente ao Geolab
#
# Por:
#      Welson R. Jacometti
#

DLIB = $(GEOLAB_HOME)/lib/
DOBJ = obj/
CFLAGS = -I$(GUIDEHOME)/include -I$(OPENWINHOME)/include -PIC
LDFLAGS =
CC = CC-3.0.1


OBJS=  \
		$(DOBJ)ConvexHull.o \
		$(DOBJ)Diameter.o \
		$(DOBJ)Misc.o \
		$(DOBJ)Real.o

$(DLIB)Diameter.so: $(OBJS)
	ld $(LDFLAGS) -assert pure-text -o $(DLIB)Diameter.so $(OBJS)

$(DOBJ)ConvexHull.o: 	ConvexHull.C \
			Algorithm.h \
			Circle.h \
			ConvexHull.h \
			Coords2D.h \
			External.h \
			ExternalObj_id.h \
			Line2D.h \
			List.h \
			Misc.h \
			Obj.h \
			Point2D.h \
			Polygon.h \
			Ray2D.h \
			Rectangle.h \
			Segment2D.h \
			Square.h \
			String.h \
			World.h \
			attributes.h \
			basic.h \
			global.h \
			handle.h \
			tools.h \
			utilities.h
	$(CC) $(CFLAGS) -c ConvexHull.C -o $(DOBJ)ConvexHull.o

$(DOBJ)Diameter.o: 	Diameter.C \
			Algorithm.h \
			Circle.h \
			ConvexHull.h \
			Coords2D.h \
			Diameter.h \
			External.h \
			ExternalObj_id.h \
			List.h \
			Misc.h \
			Obj.h \
			Point2D.h \
			Polygon.h \
			Real.h \
			Rectangle.h \
			Segment2D.h \
			Square.h \
			String.h \
			World.h \
			attributes.h \
			basic.h \
			global.h \
			handle.h \
			tools.h \
			utilities.h
	$(CC) $(CFLAGS) -c Diameter.C -o $(DOBJ)Diameter.o

$(DOBJ)Misc.o: 	Misc.C \
			Algorithm.h \
			Circle.h \
			Coords2D.h \
			External.h \
			ExternalObj_id.h \
			Line2D.h \
			List.h \
			Misc.h \
			Obj.h \
			Point2D.h \
			Ray2D.h \
			Rectangle.h \
			Segment2D.h \
			Square.h \
			String.h \
			World.h \
			attributes.h \
			basic.h \
			global.h \
			handle.h \
			tools.h \
			utilities.h
	$(CC) $(CFLAGS) -c Misc.C -o $(DOBJ)Misc.o

$(DOBJ)Real.o: 	Real.C \
			ExternalObj_id.h \
			List.h \
			Obj.h \
			Real.h \
			String.h \
			World.h \
			attributes.h \
			basic.h \
			global.h \
			tools.h \
			utilities.h
	$(CC) $(CFLAGS) -c Real.C -o $(DOBJ)Real.o

clean: 
	$(RM) $(DOBJ)* core *~


