paradiseo/eo/tutorial/Templates/Makefile.tmpl
evomarc b407bf5e81 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
2002-05-08 06:47:50 +00:00

46 lines
1.4 KiB
Cheetah

# sample makefile for building an EA evolving a new genotype
.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.3\" -I. -I../../src -I./util -Wall -g -c $*.cpp
# local sources
COMMON_SOURCES = eoMyStruct.h \
eoMyStructEvalFunc.h \
eoMyStructInit.h \
eoMyStructMutation.h \
eoMyStructQuadCrossover.h \
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
# END eventually modify the name of EO dir
LIB_EO = $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a
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)
clean : ; /bin/rm *.o $(ALL)
########## local dependencies
MyStructEA.o : $(COMMON_SOURCES) MyStructEA.cpp
MyStructLibEA.o : $(COMMON_SOURCES) MyStructLibEA.cpp
make_MyStruct.o : make_MyStruct.cpp eoMyStruct.h