Files
cantera/Makefile.in

304 lines
8.1 KiB
Makefile
Executable File

#!/bin/sh
#
# $Id: Makefile.in,v 1.96 2009/03/25 01:11:48 hkmoffa Exp $
#
export_dir = $(HOME)/sfdist
version = @ctversion@
ct = $(export_dir)/cantera-$(version)
build_ck = @BUILD_CK@
build_clib = @BUILD_CLIB@
build_python = @BUILD_PYTHON@
build_f90 = @BUILD_F90@
build_matlab = @BUILD_MATLAB@
os_is_win = @OS_IS_WIN@
incl_user_code = @INCL_USER_CODE@
do_ranlib = @DO_RANLIB@
use_dll = @USE_CLIB_DLL@
cvs_tag = @CVSTAG@
branch = -r $(cvs_tag)
RMDIRTREE = /bin/rm -r -f
INSTALL_TSC = bin/install_tsc
prefix=@prefix@
all: hdr-collect kernel user cxxlib clib fortran python matlab \
utils
# 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
@echo
@echo Now type \'make win-install\' to install Cantera in @ct_dir@.
@echo
install: hdr-install kernel-install clib-install data-install f90-modules-install \
python-install matlab-install tools-install demo-install finish-install
win-install: hdr-install win-kernel-install data-install python-install \
matlab-install demo-install finish-install
@echo
@echo Cantera has been successfully installed in @ct_dir@.
@echo
demos: example_codes
# build the Cantera static libraries
kernel:
@INSTALL@ -d @buildlib@
@INSTALL@ -d @buildbin@
cd ext; @MAKE@
cd Cantera/src; @MAKE@
# build the user library
user:
ifeq ($(incl_user_code),1)
cd Cantera/user; @MAKE@
endif
clib:
ifeq ($(build_clib),1)
cd Cantera/clib/src; @MAKE@
endif
fortran:
ifeq ($(build_f90),1)
cd Cantera/fortran/src; @MAKE@
@INSTALL@ -c Cantera/fortran/src/*.mod build/include/cantera
else
@echo skipping building the Fortran 90/95 interface
endif
cxxlib:
cd Cantera/cxx; @MAKE@
utils:
cd tools; @MAKE@
kernel-install:
@INSTALL@ -d @ct_libdir@
-rm -fR @ct_libdir@/*
( for ilib in @buildlib@/*.a ; do \
@INSTALL@ -c -m 644 $${ilib} @ct_libdir@ ; \
done )
ifeq ($(do_ranlib),1)
@RANLIB@ @ct_libdir@/*.a
endif
clib-install:
ifeq ($(build_clib),1)
cd Cantera/clib/src; @MAKE@ install
endif
win-kernel-install:
@INSTALL@ -d @ct_libdir@
-$(RMDIRTREE) @ct_libdir@/*
( for ilib in @buildlib@/*.lib ; do \
@INSTALL@ -c -m 644 $${ilib} @ct_libdir@ ; done )
ifeq ($(use_dll),1)
( for ilib in @buildlib@/*.dll ; do \
@INSTALL@ -c -m 644 $${ilib} @ct_libdir@ ; done )
( for ilib in @buildlib@/*.exp ; do \
@INSTALL@ -c -m 644 $${ilib} @ct_libdir@ ; done )
endif
data-install:
@INSTALL@ -d @ct_datadir@
( for iddd in data/inputs/*.xml ; do \
@INSTALL@ -c -m 644 $${iddd} @ct_datadir@ ; done )
( for iddd in data/inputs/*.cti ; do \
@INSTALL@ -c -m 644 $${iddd} @ct_datadir@ ; done )
tools-install:
cd tools; @MAKE@ install
hdr-install:
@INSTALL@ -d @ct_incdir@
cp -r -f build/include/cantera @ct_incroot@
@(if test -f @ct_incroot@/cantera/Cantera_bt.mak ; then rm -f @ct_incroot@/cantera/Cantera_bt.mak ; fi )
f90-modules-install:
ifeq ($(build_f90),1)
@INSTALL@ -c -m 644 build/include/cantera/*.mod @ct_incroot@/cantera
endif
# collect scattered header files and build the include directory
hdr-collect:
@INSTALL@ -d build/include/cantera
@INSTALL@ -d build/include/cantera/kernel
@(cd Cantera/cxx/include ; for ihhh in *.h *.mak; do \
../../../$(INSTALL_TSC) $${ihhh} ../../../build/include/cantera ; \
done )
@$(INSTALL_TSC) config.h build/include/cantera
python:
ifeq ($(build_python),2)
ifeq ($(os_is_win),0)
cd Cantera/python; @MAKE@
else
cd Cantera/python; @MAKE@ win
endif
endif
ifeq ($(build_python),1)
cd Cantera/python; @MAKE@ minbuild
endif
python-install:
ifneq ($(build_python),0)
cd Cantera/python; @MAKE@ install
ifeq ($(build_python),2)
@INSTALL@ -d @ct_tutdir@/python
@(for ihhh in Cantera/python/tutorial/*.py ; do \
@INSTALL@ -c $${ihhh} @ct_tutdir@/python ; \
echo "@INSTALL@ -c $${ihhh} @ct_tutdir@/python" ; \
done )
chown -R @username@ @ct_tutdir@/python
else
@echo 'NOT installing Python demos or tutorials'
endif
endif
matlab:
ifeq ($(build_matlab),1)
ifneq ($(build_python),0)
cd Cantera/matlab; @MAKE@
endif
else
@echo 'NOT building the Matlab toolbox'
endif
matlab-install:
ifeq ($(build_matlab),1)
ifneq ($(build_python),0)
cd Cantera/matlab; @MAKE@ install
endif
endif
demo-install:
(cd Cantera/cxx/demos; @MAKE@ install)
@INSTALL@ -c -m ug+rw,o+r tools/templates/cxx/demo.mak @ct_demodir@/cxx
@INSTALL@ -d @ct_demodir@/f77
(cd Cantera/fortran/f77demos; @MAKE@ install)
@INSTALL@ -c -m ug+rw,o+r tools/templates/f77/demo_ftnlib.cpp @ct_demodir@/f77
( for ihhh in Cantera/fortran/f77demos/*.txt ; do \
@INSTALL@ -c -m ug+rw,o+r $${ihhh} @ct_demodir@/f77 ; done )
chown -R @username@ @ct_demodir@/f77
ifeq ($(build_python),2)
(cd Cantera/python/examples; @MAKE@ install)
chown -R @username@ @ct_demodir@/python
endif
finish-install:
@INSTALL@ -d @ct_docdir@
@INSTALL@ -d @ct_bindir@
-( cd bin ; @INSTALL@ -c exp3to2.sh "@ct_bindir@" )
-( cd bin ; @INSTALL@ -c csvdiff "@ct_bindir@" )
ifeq ($(os_is_win),0)
# Commands to be executed for non-win systems
cp -f License.rtf "@ct_bindir@"
cp -f License.txt "@ct_bindir@"
ifneq ($(build_python),0)
@INSTALL@ -c tools/src/finish_install.py tools/bin
@PYTHON_CMD@ tools/bin/finish_install.py @prefix@ @PYTHON_CMD@
cp -f "@homedir@/setup_cantera" "@ct_bindir@"
chmod +x @ct_bindir@/setup_cantera
chmod +x @ct_bindir@/ctnew
ifeq ($(build_python),2)
chmod +x @ct_bindir@/mixmaster
endif
endif
else
# Commands to be executed for win systems
cd Cantera/fortran/f77demos; sed s'/isentropic/ctlib/g' isentropic.dsp > ctlib.dsp
( for ihhh in Cantera/fortran/f77demos/*.dsp ; do \
@INSTALL@ -c $${ihhh} @ct_demodir@/f77 ; done )
( for ihhh in @buildbin@/* ; do \
@INSTALL@ -c $${ihhh} @ct_bindir@ ; done )
endif
example_codes:
(cd Cantera/cxx/demos; @MAKE@ clean)
(cd Cantera/cxx; @MAKE@)
test: example_codes datafiles
cd test_problems; @MAKE@ clean
cd test_problems; @MAKE@ all
cd test_problems; @MAKE@ test
run-matlab-demo:
cd Cantera/matlab; @MAKE@ run-demo
test-matlab:
cd Cantera/matlab; @MAKE@ test-demo
run-python-demo:
cd Cantera/python; @MAKE@ run-demo
uninstall:
-$(RMDIRTREE) @ct_incdir@
-$(RMDIRTREE) @ct_libdir@
-$(RMDIRTREE) @ct_datadir@
-$(RMDIRTREE) @ct_demodir@
-$(RMDIRTREE) @ct_docdir@
-$(RMDIRTREE) @ct_tutdir@
-$(RMDIRTREE) @prefix@/matlab/toolbox/cantera
cd tools; @MAKE@ uninstall
clean:
-$(RMDIRTREE) *.*~ @buildlib@/*.* build/include/cantera/config.h svn*~
-cd Cantera; @MAKE@ clean
-cd tools; @MAKE@ clean
-cd ext; @MAKE@ clean
-cd test_problems; @MAKE@ clean
-$(RM) mt.mod
docs:
cd tools/doxygen/Cantera; doxygen Cantera.cfg
depends:
cd Cantera; @MAKE@ depends
cd tools; @MAKE@ depends
cd ext; @MAKE@ depends
ifeq ($(build_particles),1)
cd Cantera/cads; @MAKE@ depends
endif
ChangeLog: CVS/Entries
tools/bin/cvs2cl.pl --prune
export: ChangeLog
@INSTALL@ -d $(export_dir)
if (test -d $(export_dir)/cantera); then rm -r -f $(export_dir)/cantera; fi
if (test -d $(export_dir)/cantera-$(version)); then rm -r -f $(export_dir)/cantera-$(version); fi
cd $(export_dir); cvs export $(branch) cantera
cd $(export_dir)/cantera; rm -r -f win32
cd $(export_dir); mv cantera cantera-$(version)
export-win: ChangeLog
@INSTALL@ -d $(export_dir)
if (test -d $(export_dir)/cantera); then rm -r -f $(export_dir)/cantera; fi
cd $(export_dir); cvs export $(branch) cantera
cd $(export_dir)/cantera; rm -r -f win32
cd $(export_dir)/cantera; cvs export $(branch) win32
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)
cf:
@INSTALL@ -d $(export_dir)
if (test -d $(export_dir)/cantera); then rm -r -f $(export_dir)/cantera; fi
cd $(export_dir); cvs export $(branch) cantera
cd $(export_dir)/cantera; rm -r -f win32
(cd $(export_dir); \
rm -f cantera-cf.tar.gz; \
tar cvf cantera-cf.tar cantera/*; \
gzip cantera-cf.tar; scp cantera-cf.tar.gz dggoodwin@cf-shell.sourceforge.net:cantera.tar.gz)
sshcf './runall' &