Files
cantera/Cantera/python/Makefile.in

107 lines
2.8 KiB
Makefile
Raw Normal View History

2003-04-14 17:57:48 +00:00
#/bin/sh
###############################################################
# $Author$
# $Date$
# $Revision$
#
# Copyright 2001 California Institute of Technology
# See file License.txt for licensing information
#
###############################################################
2004-08-10 01:08:20 +00:00
have_python_site_package_topdir=@local_python_inst@
python_site_package_topdir=@python_prefix@
2003-04-20 04:59:05 +00:00
CANTERA_LIBDIR= @buildlib@
2003-04-20 04:04:16 +00:00
LIB_DEPS = $(CANTERA_LIBDIR)/libcantera.a $(CANTERA_LIBDIR)/libzeroD.a \
2003-12-12 16:15:17 +00:00
$(CANTERA_LIBDIR)/liboneD.a \
$(CANTERA_LIBDIR)/libtransport.a \
$(CANTERA_LIBDIR)/libclib.a \
$(CANTERA_LIBDIR)/libconverters.a
2004-01-04 15:49:22 +00:00
WIN_LIB_DEPS = $(CANTERA_LIBDIR)/cantera.lib $(CANTERA_LIBDIR)/zeroD.lib \
$(CANTERA_LIBDIR)/oneD.lib \
$(CANTERA_LIBDIR)/transport.lib
2003-04-20 04:04:16 +00:00
SRCS = src/ctphase_methods.cpp \
src/ctthermo_methods.cpp \
src/ctkinetics_methods.cpp \
src/cttransport_methods.cpp \
src/ctxml_methods.cpp \
src/ctfuncs.cpp \
src/ctsurf_methods.cpp \
src/ctbndry_methods.cpp \
src/ctrpath_methods.cpp \
src/ctreactor_methods.cpp \
src/ctfunc_methods.cpp \
2003-09-06 21:00:13 +00:00
src/ctonedim_methods.cpp \
2003-04-20 04:04:16 +00:00
src/methods.h
2003-09-06 21:00:13 +00:00
os_is_win = @OS_IS_WIN@
use_clib_dll = @USE_CLIB_DLL@
2003-09-06 21:00:13 +00:00
2003-09-12 11:31:48 +00:00
all: _build
win: _winbuild
2003-04-20 04:04:16 +00:00
2006-04-30 23:10:42 +00:00
#
# HKM -> Python seems to want to compile C++ code with the CC compiler.
# The fix is to assign the CC compiler to the CXX compiler.
# the double quotes are needed if the CXX variable is multi-token.
#
_build: $(SRCS) $(LIB_DEPS) Makefile setup.py
2003-04-20 13:18:09 +00:00
touch src/pycantera.cpp
2006-04-30 23:10:42 +00:00
(CXX="@CXX@"; export CXX; CC="@CXX@"; export CC; @PYTHON_CMD@ setup.py build)
2003-09-12 11:31:48 +00:00
echo 'ok' > _build
2004-08-10 01:08:20 +00:00
#
# HKM -> If clib is built as a dll, it needs to be copied by hand to the
# site package directory.
#
ifeq ($(use_clib_dll), 1)
2004-08-10 01:08:20 +00:00
CLIB_DLL=../../build/lib/i686-pc-win32/clib.dll
CLIB_EXP=../../build/lib/i686-pc-win32/clib.exp
else
CLIB_DLL=
CLIB_EXP=
endif
2003-09-12 11:31:48 +00:00
2004-08-10 01:08:20 +00:00
_winbuild: $(SRCS) $(WIN_LIB_DEPS) $(CLIB_DLL)
2003-09-12 11:31:48 +00:00
touch src/pycantera.cpp
2003-09-10 13:42:25 +00:00
(@PYTHON_CMD@ setup.py build)
ifeq ($(use_clib_dll), 1)
2004-08-10 01:08:20 +00:00
ifeq ($(have_python_site_package_topdir), 1)
(@INSTALL@ -m 755 $(CLIB_DLL) $(CLIB_EXP) \
$(python_site_package_topdir)/lib/site-packages/Cantera)
endif
2004-08-10 01:08:20 +00:00
endif
2003-09-12 11:31:48 +00:00
echo 'ok' > _winbuild
2003-04-14 17:57:48 +00:00
minbuild:
(@PYTHON_CMD@ setup.py build)
2003-04-14 17:57:48 +00:00
install:
ifeq (@local_python_inst@,1)
(@PYTHON_CMD@ setup.py install --prefix="@python_win_prefix@")
2003-04-20 13:18:09 +00:00
else
2003-04-21 10:23:54 +00:00
(@PYTHON_CMD@ setup.py install)
2003-04-20 13:18:09 +00:00
endif
2003-04-14 17:57:48 +00:00
clean:
@PYTHON_CMD@ setup.py clean
2004-05-22 00:46:16 +00:00
rm -f _build; rm -f _winbuild
2003-04-14 17:57:48 +00:00
cd src; rm -f *.o
depends:
echo '-'
2004-08-03 16:35:37 +00:00
test:
cd examples; @PYTHON_CMD@ reactor1.py &> reactor1.out
cd examples; @PYTHON_CMD@ flame1.py &> flame1.out
cd examples; @PYTHON_CMD@ diamond.py &> diamond.out
cd examples; @PYTHON_CMD@ critProperties.py &> critProperties.out
2003-04-14 17:57:48 +00:00
# end of file