# 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)Boolean.o \
		$(DOBJ)Integer.o \
		$(DOBJ)Message.o \
		$(DOBJ)Real.o \
		$(DOBJ)boolean_example.o \
		$(DOBJ)integer_example.o \
		$(DOBJ)message_example.o \
		$(DOBJ)real_example.o

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

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

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

$(DOBJ)Message.o: 	Message.C \
			ExternalObj_id.h \
			List.h \
			Message.h \
			Obj.h \
			String.h \
			World.h \
			attributes.h \
			basic.h \
			global.h \
			tools.h \
			utilities.h
	$(CC) $(CFLAGS) -c Message.C -o $(DOBJ)Message.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

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

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

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

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

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








