# # $RCSfile$ # $Author$ # $Date$ # $Revision$ # ######################################################################## export_dir = $(HOME)/sfdist version = @ctversion@ ct = $(export_dir)/cantera-$(version) build_ck = @BUILD_CK@ build_clib = @BUILD_CLIB@ build_python = @BUILD_PYTHON@ build_matlab = @BUILD_MATLAB@ os_is_win = @OS_IS_WIN@ incl_user_code = @INCL_USER_CODE@ prefix=@prefix@ all: kernel user cxxlib hdr-collect clib python matlab utils datafiles # use this target on a Windows machine to build the Python and # MATLAB interfaces after building the project in Visual C++ win: hdr-collect python matlab install: hdr-install kernel-install data-install python-install matlab-install tools-install finish-install win-install: hdr-install win-kernel-install data-install python-install matlab-install finish-install demos: example_codes # build the Cantera static libraries kernel: @INSTALL@ -d @buildlib@ @INSTALL@ -d @buildbin@ rm -f @buildlib@/*.a rm -f @buildlib@/*.so rm -f @buildbin@/* cd ext; @MAKE@ cd Cantera/src; @MAKE@ # build the user library user: ifeq ($(incl_user_code),1) cd Cantera/user; @MAKE@ endif clib: cd Cantera/clib/src; @MAKE@ ranlib @buildlib@/*.a cxxlib: cd Cantera/cxx/src; @MAKE@ utils: cd tools; @MAKE@ kernel-install: @INSTALL@ -d @ct_libdir@ rm -f @ct_libdir@/* @INSTALL@ -m 644 @buildlib@/*.a @ct_libdir@ cd Cantera/clib/src; @MAKE@ install ranlib @ct_libdir@/*.a win-kernel-install: @INSTALL@ -d @ct_libdir@ rm -f @ct_libdir@/* @INSTALL@ -m 644 @buildlib@/*.lib @ct_libdir@ data-install: @INSTALL@ -d @ct_datadir@ @INSTALL@ -m 644 data/inputs/elements.xml @ct_datadir@ @INSTALL@ -m 644 data/inputs/gri30.xml @ct_datadir@ @INSTALL@ -m 644 data/inputs/*.cti @ct_datadir@ tools-install: cd tools; @MAKE@ install hdr-install: @INSTALL@ -d @ct_incdir@ cp -r -f build/include/cantera @ct_incroot@ # collect scattered header files abd build the include directory hdr-collect: @INSTALL@ -d build/include/cantera rm -r -f build/include/cantera/* @INSTALL@ -d build/include/cantera/kernel @INSTALL@ -d build/include/cantera/kernel/oneD @INSTALL@ -d build/include/cantera/kernel/zeroD @INSTALL@ -d build/include/cantera/kernel/converters @INSTALL@ -d build/include/cantera/kernel/transport @INSTALL@ Cantera/cxx/include/*.h build/include/cantera @INSTALL@ config.h build/include/cantera @INSTALL@ Cantera/src/*.h build/include/cantera/kernel @INSTALL@ Cantera/src/oneD/*.h build/include/cantera/kernel/oneD @INSTALL@ Cantera/src/zeroD/*.h build/include/cantera/kernel/zeroD @INSTALL@ Cantera/src/converters/*.h build/include/cantera/kernel/converters @INSTALL@ Cantera/src/transport/*.h build/include/cantera/kernel/transport python: ifeq ($(build_python),1) ifeq ($(os_is_win),0) cd Cantera/python; @MAKE@ else cd Cantera/python; @MAKE@ win endif endif python-install: ifeq ($(build_python),1) cd Cantera/python; @MAKE@ install @INSTALL@ -d @ct_demodir@/python @INSTALL@ Cantera/python/examples/*.py @ct_demodir@/python @INSTALL@ -d @ct_tutdir@/python @INSTALL@ Cantera/python/tutorial/*.py \ @ct_tutdir@/python chown -R @username@ @ct_demodir@/python chown -R @username@ @ct_tutdir@/python endif matlab: ifeq ($(build_matlab),1) cd Cantera/matlab; @MAKE@ endif win-matlab: ifeq ($(build_matlab),1) cd Cantera/matlab; @MAKE@ win endif matlab-install: ifeq ($(build_matlab),1) cd Cantera/matlab; @MAKE@ install @INSTALL@ -d @ct_demodir@/matlab @INSTALL@ Cantera/matlab/cantera/examples/*.m @ct_demodir@/matlab @INSTALL@ -d @ct_tutdir@/matlab @INSTALL@ Cantera/matlab/cantera/tutorial/*.m @ct_tutdir@/matlab chown -R @username@ @ct_demodir@/matlab chown -R @username@ @ct_tutdir@/matlab endif finish-install: @INSTALL@ -d @ct_docdir@ @INSTALL@ -d @ct_bindir@ #@INSTALL@ doc/*.pdf @ct_docdir@ @INSTALL@ -d @ct_demodir@/cxx @INSTALL@ Cantera/cxx/demos/*.cpp @ct_demodir@/cxx @INSTALL@ Cantera/cxx/demos/*.h @ct_demodir@/cxx @INSTALL@ Cantera/cxx/demos/Makefile @ct_demodir@/cxx chown -R @username@ @ct_demodir@/cxx @INSTALL@ -d @ct_demodir@/f77 @INSTALL@ Cantera/fortran/f77demos/*.f @ct_demodir@/f77 @INSTALL@ tools/templates/f77/demo_ftnlib.cpp @ct_demodir@/f77 @INSTALL@ Cantera/fortran/f77demos/*.txt @ct_demodir@/f77 @INSTALL@ Cantera/fortran/f77demos/f77demos.mak @ct_demodir@/f77/Makefile chown -R @username@ @ct_demodir@/f77 ifeq ($(os_is_win),0) rm -f @prefix@/cantera/demos rm -f @prefix@/cantera/data rm -f @prefix@/cantera/templates rm -f @prefix@/cantera/tutorials ln -s @ct_demodir@ @prefix@/cantera/demos ln -s @ct_datadir@ @prefix@/cantera/data ln -s @ct_templdir@ @prefix@/cantera/templates ln -s @ct_tutdir@ @prefix@/cantera/tutorials @INSTALL@ License.* @prefix@/cantera @INSTALL@ tools/src/finish_install.py tools/bin (PYTHONPATH=''; @PYTHON_CMD@ tools/bin/finish_install.py @prefix@ @PYTHON_CMD@) chmod +x @ct_bindir@/ctnew else cd Cantera/fortran/f77demos; sed s'/isentropic/ctlib/g' isentropic.dsp > ctlib.dsp @INSTALL@ Cantera/fortran/f77demos/*.dsp @ct_demodir@/f77 @INSTALL@ @buildbin@/* @ct_bindir@ endif #@INSTALL@ bin/ctmkmf @ct_bindir@/ctnew #@INSTALL@ bin/cxx_examples @ct_demodir@/c++ example_codes: (cd examples/cxx; @MAKE@) test: example_codes datafiles cd test_problems; @MAKE@ all cd test_problems; @MAKE@ test datafiles: cd data/inputs; @MAKE@ uninstall: rm -r -f @ct_incdir@ rm -r -f @ct_libdir@ rm -r -f @ct_datadir@ rm -r -f @ct_demodir@ rm -r -f @ct_docdir@ rm -r -f @ct_tutdir@ rm -r -f @prefix@/matlab/toolbox/cantera cd tools; make uninstall clean: rm -f *.*~ @buildlib@/*.* cd Cantera; @MAKE@ clean cd tools; @MAKE@ clean cd ext; @MAKE@ clean cd test_problems; @MAKE@ clean cd examples; @MAKE@ clean docs: cd tools/doxygen/Cantera; doxygen Cantera.cfg depends: cd Cantera; @MAKE@ depends cd tools; @MAKE@ depends export: @INSTALL@ -d $(export_dir) if (test -d $(export_dir)/cantera); then rm -r -f $(export_dir)/cantera; fi cd $(export_dir); cvs export -D 1/01/2010 cantera cd $(export_dir); mv cantera cantera-$(version) pack: export (cd $(export_dir); \ rm -f cantera-$(version).tar.gz; \ tar cvf cantera-$(version).tar cantera-$(version)/*; \ gzip cantera-$(version).tar) #info: # echo '#define CANTERA_ROOT "@prefix@/cantera"' > include/ctdir.h