# Makefile for Lithium Genetic Programming Toolkit # # Copyright (c) 2006 Henry Strickland -- in the domain # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. # # (* http://www.opensource.org/licenses/mit-license.php *) OPT= -O3 -march=i686 -D"NDEBUG" INC= -I /usr/local/ActiveTcl/include/ -I /usr/include/malloc/ -I /usr/local/include -I ./cpptcl CFLAGS= -g $(INC) $(OPT) #EXCEPTIONS = -f"no-exceptions" EXCEPTIONS = all : litcl.so tests ci # For making a litcl command, which is a tclsh with litcl.cc already in it litcl : lithium3.h lithium3.cc bf.cc ewok.cc hf.cc grissom.cc g2005.cc crumbs.cc main.cc lilib.cc litcl.cc newlib.cc cpptcl.o gcc -g $(INC) $(OPT) -Wall -c tclAppInit.c g++ -g $(EXCEPTIONS) $(INC) $(OPT) -Wall -o litcl tclAppInit.o lilib.cc litcl.cc lithium3.cc grissom.cc g2005.cc crumbs.cc bf.cc ewok.cc hf.cc newlib.cc cpptcl.o -L/usr/local/lib -ltcl # For making litcl.so, which dynamically loads into tclsh at runtime litcl.so : lithium3.h lithium3.cc bf.cc ewok.cc hf.cc grissom.cc g2005.cc crumbs.cc main.cc lilib.cc litcl.cc newlib.cc cpptcl.o g++ -g $(EXCEPTIONS) $(INC) $(OPT) -Wall -shared -o litcl.so lilib.cc litcl.cc lithium3.cc grissom.cc g2005.cc crumbs.cc bf.cc ewok.cc hf.cc newlib.cc cpptcl.o cpptcl.o : cpptcl/cpptcl.cc g++ -c $(INC) $(OPT) cpptcl/cpptcl.cc -o cpptcl.o tests : litcl.so tclsh run.tcl -unit tclsh test/test-encode.tcl tclsh test/test-g2004.tcl tclsh test/test-li.tcl tclsh test/test-bf.tcl tclsh test/test-crumbs.tcl clean : rm -f litcl.so litcl cleaner : clean rm -rf _duck_[0-9]*[0-9] ___* _a _q _r _x ci : test -x /usr/bin/ci && mkdir -p RCS && ci -l -q -m/dev/null -t/dev/null *.h *.cc *.tcl Makefile