This repository has been archived on 2026-03-28. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
eodev/eo/tutorial/Templates/Makefile.tmpl
2002-10-23 04:42:07 +00:00

48 lines
1.3 KiB
Cheetah

# sample makefile for building an EA evolving a new genotype
# START eventually modify the name of EO dir
DIR_EO = ../../src
# END eventually modify the name of EO dir
# eo libs
LIB_EO = $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a
# implicit compile rules
.SUFFIXES: .cpp
.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -o $@ $*.cpp $(LIB_EO)
.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -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
ALL = MyStructEA MyStructLibEA
MyStructEA : MyStructEA.cpp
$(CXX) -I. -I$(DIR_EO) -g -o $@ MyStructEA.cpp $(LIB_EO) -lm
MyStructLibEA : MyStructLibEA.o make_MyStruct.o
$(CXX) -g -o $@ MyStructLibEA.o make_MyStruct.o $(LIB_EO) -lm
tar : ; tar czvf MyStruct.tgz *.h *.cpp Makefile
all : $(ALL)
clean : ; /bin/rm *.o $(ALL)
########## local dependencies
MyStructEA.cpp : $(COMMON_SOURCES)
MyStructLibEA.o : $(COMMON_SOURCES) MyStructLibEA.cpp
make_MyStruct.o : make_MyStruct.cpp eoMyStruct.h