Added the MyStructLibEA.cpp+make_MyStruct.cpp that allow separate

compilation of representation-indenepent stuff. Modified create.sh script
and Makefile accordingly. See Lesson5 of the tutorial
This commit is contained in:
evomarc 2002-05-08 06:47:50 +00:00
commit b407bf5e81
4 changed files with 308 additions and 7 deletions

View file

@ -1,12 +1,11 @@
# sample makefile for building an EA evolving a new genotype
.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a
.cpp: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -Wall -g -o $@ $*.cpp ../../src/libeo.a ../../src/utils/libeoutils.a
.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" -DF2C -I. -I../../src -I./util -Wall -g -c $*.cpp
.cpp.o: ; c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I../../src -I./util -Wall -g -c $*.cpp
# local sources
LOCAL_SOURCES = MyStructEA.cpp \
eoMyStruct.h \
COMMON_SOURCES = eoMyStruct.h \
eoMyStructEvalFunc.h \
eoMyStructInit.h \
eoMyStructMutation.h \
@ -14,7 +13,12 @@ LOCAL_SOURCES = MyStructEA.cpp \
make_genotype_MyStruct.h \
make_op_MyStruct.h
NO_LIB_SOURCES = MyStructEA.cpp
LIB_SOURCES = MyStructLibEA.cpp make_MyStruct.cpp
SOURCES = $(COMMON_SOURCES) MyStructEA.cpp MyStructLibEA.cpp make_MyStruct.cpp
# START eventually modify the name of EO dir
DIR_EO = ../../src
@ -22,11 +26,14 @@ DIR_EO = ../../src
LIB_EO = $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a
ALL = MyStructEA
ALL = MyStructEA MyStructLibEA
MyStructEA : MyStructEA.o
c++ -g -o $@ MyStructEA.o ../../src/utils/libeoutils.a ../../src/libeo.a -lm
MyStructLibEA : MyStructLibEA.o make_MyStruct.o
c++ -g -o $@ MyStructLibEA.o make_MyStruct.o ../../src/utils/libeoutils.a ../../src/libeo.a -lm
tar : ; tar czvf MyStruct.tgz *.h *.cpp Makefile
all : $(ALL)
@ -34,5 +41,6 @@ all : $(ALL)
clean : ; /bin/rm *.o $(ALL)
########## local dependencies
AppliEA.o : $(LOCAL_SOURCES)
MyStructEA.o : $(COMMON_SOURCES) MyStructEA.cpp
MyStructLibEA.o : $(COMMON_SOURCES) MyStructLibEA.cpp
make_MyStruct.o : make_MyStruct.cpp eoMyStruct.h