mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
126 lines
3.6 KiB
Plaintext
Executable File
126 lines
3.6 KiB
Plaintext
Executable File
|
|
C A N T E R A
|
|
|
|
release 1.5
|
|
|
|
9/12/2003
|
|
|
|
Copyright (c) 2001-2003 California Institute of Technology
|
|
|
|
|
|
|
|
License information
|
|
===================
|
|
|
|
See the file "License.txt" for information on the terms & conditions
|
|
for usage, and a DISCLAIMER OF ALL WARRANTIES.
|
|
|
|
All trademarks referenced herein are property of their respective
|
|
holders.
|
|
|
|
|
|
|
|
Building Cantera from the source code
|
|
=====================================
|
|
|
|
|
|
1) Unix/linux/cygwin build procedure
|
|
------------------------------------
|
|
|
|
Run the 'configure' script to build the Makefiles. By default, 'make install'
|
|
will install under '/usr/local.' If you want to install Cantera somewhere else,
|
|
run 'configure' with the 'prefix' option:
|
|
|
|
configure --prefix=$HOME/my_cantera_dir
|
|
|
|
If necessary, edit 'configure' to set options appropriate for your
|
|
system.
|
|
|
|
After running 'configure', type:
|
|
|
|
make
|
|
make install
|
|
|
|
The last one may need to be run as super-user.
|
|
|
|
To test the installation, type
|
|
|
|
make test
|
|
|
|
After running 'make install', run script '/usr/local/cantera/setup_cantera'
|
|
to configure the environment before using Cantera.
|
|
|
|
The build process requires a 'make' utility compatible with GNU
|
|
'make'. If this has a different name on your system, define
|
|
environment variable MAKE to the name (e..g. 'gmake') before running
|
|
'configure'.
|
|
|
|
This procedure also builds the Python and MATLAB interfaces if
|
|
your system is configured to use them. The requirements are:
|
|
-- Python 2.x + NumPy for the Python interface
|
|
-- MATLAB 6.x for the MATLAB toolbox
|
|
If either is missing or an error occurs, the interface is not installed.
|
|
|
|
|
|
2) Windows Build Procedure
|
|
--------------------------
|
|
|
|
Cantera can be built under Windows using Visual C++ 6.0 and Compaq Visual
|
|
Fortran 6.0. In the 'win32' directory, open workspace 'cantera.dsw'. Set
|
|
the active project to 'examples', and the active configuration to
|
|
'Win32 - Release'. Build the project, and execute 'examples.exe' from
|
|
the Build menu to verify that it works.
|
|
|
|
If you plan to build the Python or MATLAB interfaces, you also need to
|
|
build project 'ct'. This creates a DLL file which by default is placed
|
|
in the Windows system directory. Edit the project settings if you want
|
|
to put it somewhere else.
|
|
|
|
|
|
|
|
Configuring Matlab
|
|
---------------------
|
|
|
|
The Matlab toolbox uses one compiled MEX program written in C++.
|
|
Before you can build it, Matlab needs to be configured
|
|
for your compiler. In Matlab type:
|
|
|
|
mex -setup
|
|
|
|
and enter the number for the compiler you wish to use.
|
|
|
|
The Matlab toolbox is built automatically by the Cantera build
|
|
process, but can also be built manually. To build the MEX file needed
|
|
for the Matlab toolbox, within Matlab go to to the 'cantera' directory
|
|
containing the toolbox and type 'buildux' on unix/linux/Mac OS X, or
|
|
'buildwin' on Windows.
|
|
|
|
|
|
Configuring Python
|
|
---------------------
|
|
|
|
Before you can build the Python interface from the source, you need to
|
|
have Python 2.0 or greater, and the 'Numeric' package must be
|
|
installed. Python is available at www.python.org, and Numeric is
|
|
available through SourceForge.
|
|
|
|
|
|
Customizing
|
|
-----------
|
|
|
|
Before running configure, the following environment variables may be set:
|
|
|
|
MAKE set to 'make' utility compatible with GNU make
|
|
|
|
CXX C++ compiler
|
|
|
|
F77 Fortran 77 compiler
|
|
|
|
PYTHON_CMD Python interpreter to use with Cantera
|
|
(default: 'python')
|
|
|
|
MATLAB_CMD Matlab command (default: 'matlab')
|
|
|
|
Additional customization can be done by editing the configure script.
|
|
|