Added in the PIC autoconf variable, that already existed, into most

of the Makefiles in the code. This variable will now be used
to specify the position independent code compiler option within
Cantera. Note, this bug fix was needed for a 64 bit full python compile
on linux.
This commit is contained in:
Harry Moffat 2007-04-13 22:39:15 +00:00
parent 25bb63376a
commit 05e16e8e35
26 changed files with 3279 additions and 4946 deletions

View file

@ -15,7 +15,9 @@
INSTALL_TSC = ../../../bin/install_tsc
do_ranlib = @DO_RANLIB@
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT)
PIC_FLAG=@PIC@
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) $(PIC_FLAG)
OBJS = ct.o Storage.o ctsurf.o ctrpath.o \
ctreactor.o ctfunc.o ctxml.o ctonedim.o ctmultiphase.o
@ -53,7 +55,7 @@ LCXX_FLAGS = -L$(CANTERA_LIBDIR) @CXXFLAGS@
# how to compile C++ source files to object files
.@CXX_EXT@.@OBJ_EXT@:
$(CXX) -c $< $(CXX_INCLUDES) $(CXX_FLAGS) @PIC@
$(CXX) -c $< $(CXX_INCLUDES) $(CXX_FLAGS)
LIB_NAME=lib@CT_SHARED_LIB@

View file

@ -69,7 +69,7 @@ PROGRAM = $(PROG_NAME)$(EXE_EXT)
DEPENDS = $(OBJS:.o=.d)
all: $(PROGRAM) .depends
all: $(PROGRAM)
$(PROGRAM): $(OBJS) $(CANTERA_LIBDIR)/libcantera.a
$(CXX) -o $(PROGRAM) $(OBJS) $(LCXX_FLAGS) $(CANTERA_LIBS) \

View file

@ -12,7 +12,8 @@
SUFFIXES=
SUFFIXES= .cpp .d .o
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT)
PIC_FLAG=@PIC@
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) $(PIC_FLAG)
OBJS = cxxutils.o

View file

@ -15,6 +15,8 @@ INCDIR = ../../build/include/cantera/kernel
INSTALL_TSC = ../../bin/install_tsc
CANTERA_LIB = @buildlib@/libcantera.a
PIC_FLAG=@PIC@
debug_mode = @CANTERA_DEBUG_MODE@
ifeq ($(debug_mode), 1)
DEBUG_FLAG=-DDEBUG_MODE
@ -23,7 +25,7 @@ else
endif
#LOCAL_DEFNS=-DDEBUG_PATHS -DDEBUG_MULTIPHASE_EQUIL
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) $(LOCAL_DEFNS) $(DEBUG_FLAG)
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) $(PIC_FLAG) $(LOCAL_DEFNS) $(DEBUG_FLAG)
EXT = ../../ext
do_ranlib = @DO_RANLIB@
USE_SUNDIALS = @use_sundials@

View file

@ -15,7 +15,9 @@ INCDIR = ../../../build/include/cantera/kernel/converters
INSTALL_TSC = ../../../bin/install_tsc
do_ranlib = @DO_RANLIB@
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT)
PIC_FLAG=@PIC@
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) $(PIC_FLAG)
OBJS = atomicWeightDB.o CKParser.o CKReader.o Reaction.o ckr_utils.o \
thermoFunctions.o writelog.o ck2ct.o

View file

@ -14,7 +14,10 @@
INCDIR = ../../../build/include/cantera/kernel/oneD
INSTALL_TSC = ../../../bin/install_tsc
do_ranlib = @DO_RANLIB@
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT)
PIC_FLAG=@PIC@
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) $(PIC_FLAG)
CXX_INCLUDES = -I.. @CXX_INCLUDES@
# stirred reactors

View file

@ -25,7 +25,9 @@ else
endif
#LOCAL_DEFS=-DDEBUG_MODE
CXX_FLAGS = @CXXFLAGS@ $(LOCAL_DEFS) $(CXX_OPT) $(DEBUG_FLAG)
PIC_FLAG=@PIC@
CXX_FLAGS = @CXXFLAGS@ $(LOCAL_DEFS) $(CXX_OPT) $(PIC_FLAG) $(DEBUG_FLAG)
# Extended Cantera Thermodynamics Object Files

View file

@ -15,7 +15,9 @@ INCDIR = ../../../build/include/cantera/kernel/transport
INSTALL_TSC = ../../../bin/install_tsc
do_ranlib = @DO_RANLIB@
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT)
PIC_FLAG=@PIC@
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) $(PIC_FLAG)
# Transport Object Files
OBJS = TransportFactory.o MultiTransport.o MixTransport.o MMCollisionInt.o \

View file

@ -15,7 +15,9 @@ INCDIR = ../../../build/include/cantera/kernel/zeroD
INSTALL_TSC = ../../../bin/install_tsc
do_ranlib = @DO_RANLIB@
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT)
PIC_FLAG=@PIC@
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) $(PIC_FLAG)
# stirred reactors
OBJS = Reactor.o ReactorBase.o FlowDevice.o Wall.o ReactorNet.o \

View file

@ -22,8 +22,8 @@ SUFFIXES=
SUFFIXES= .cpp .d .o
OBJDIR = .
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT)
PIC_FLAG=@PIC@
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) $(PIC_FLAG)
CXX_INCLUDES = -I../src

8078
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -989,6 +989,15 @@ AC_SUBST(SOEXT)
if test -z "$SHARED"; then SHARED='-shared'; fi
AC_SUBST(SHARED)
#
# PIC
# Compiler flag for specifying position independent code.
# This flag is needed sometimes in the compilation step
# for code that will go into a shared library.
# If Cantera is used in the Full python installation
# mode, this means just about all of Cantera's code
# should be position independent.
#
if test -z "$PIC"; then PIC='-fPIC'; fi
AC_SUBST(PIC)

View file

@ -9,7 +9,9 @@ BLASLIB = @buildlib@/libctblas.a
SUFFIXES=
SUFFIXES= .f .o
F_FLAGS = @FFLAGS@
PIC_FLAG=@PIC@
F_FLAGS = @FFLAGS@ $(PIC_FLAG)
OBJS = \
dasum.o \

View file

@ -22,10 +22,12 @@
do_ranlib = @DO_RANLIB@
all: @buildlib@/libcvode.a
PIC_FLAG=@PIC@
COMPILER = @CC@
OPTS = -I../include @CFLAGS@ $(CXX_OPT)
OPTS = -I../include @CFLAGS@ $(CXX_OPT) $(PIC_FLAG)
OBJS = source/cvode.o source/cvdense.o source/dense.o source/cvband.o \
source/band.o source/cvdiag.o source/cvspgmr.o source/spgmr.o \

View file

@ -26,7 +26,8 @@ CXX = @CXX@
CC = @CC@
# C++ compile flags
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT)
PIC_FLAG=@PIC@
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) $(PIC_FLAG)
# C compile flags
CFLAGS = @CFLAGS@

View file

@ -21,7 +21,8 @@ CXX = @CXX@
CC = @CC@
# C++ compile flags
CXX_FLAGS = @CXXFLAGS@
PIC_FLAG=@PIC@
CXX_FLAGS = @CXXFLAGS@ $(PIC_FLAG)
# C compile flags
CFLAGS = @CFLAGS@

View file

@ -25,8 +25,9 @@ CC = @CC@
SHELL = /bin/sh
do_ranlib = @DO_RANLIB@
do_stripsymbols = @HAVE_STRIPSYMBOLS@
PIC_FLAG=@PIC@
CFLAGS = @CFLAGS@ $(CXX_OPT)
CFLAGS = @CFLAGS@ $(CXX_OPT) $(PIC_FLAG)
# Destination f2c lib located in Cantera's build directory
# -> Calling it ctf2c

View file

@ -1,2 +1,6 @@
#define IEEE_8087
#define Arith_Kind_ASL 1
#define Long int
#define Intcast (int)(long)
#define Double_Align
#define X64_bit_pointers

View file

@ -23,7 +23,8 @@ CXX = @CXX@
CC = @CC@
# C++ compile flags
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT)
PIC_FLAG=@PIC@
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) $(PIC_FLAG)
CFLAGS = @CFLAGS@ $(CXX_OPT)

View file

@ -24,7 +24,8 @@ CXX = @CXX@
CC = @CC@
# C++ compile flags
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT)
PIC_FLAG=@PIC@
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) $(PIC_FLAG)
# Local include files
CXX_INCLUDES=-I../f2c_libs

View file

@ -10,7 +10,9 @@ LAPACKLIB = @buildlib@/libctlapack.a
do_ranlib = @DO_RANLIB@
F_FLAGS = @FFLAGS@
PIC_FLAG=@PIC@
F_FLAGS = @FFLAGS@ $(PIC_FLAG)
OBJS = \
dbdsqr.o \

View file

@ -13,9 +13,9 @@ do_ranlib = @DO_RANLIB@
LIB = @buildlib@/libctmath.a
all: $(LIB)
PIC_FLAG=@PIC@
F_FLAGS = @FFLAGS@
F_FLAGS = @FFLAGS@ $(PIC_FLAG)
OBJS = \
mach.o \
@ -48,7 +48,7 @@ ifeq ($(do_ranlib),1)
@RANLIB@ $(LIB)
endif
%.o : %.cpp
@CXX@ -c $< @DEFS@ @CXXFLAGS@ $(INCLUDES)
@CXX@ -c $< @DEFS@ @CXXFLAGS@ @PIC@ $(INCLUDES)
%.o : %.f
@F77@ -c $< $(F_FLAGS)

View file

@ -9,8 +9,8 @@
LIB = @buildlib@/librecipes.a
do_ranlib = @DO_RANLIB@
F_FLAGS = @FFLAGS@
PIC_FLAG=@PIC@
F_FLAGS = @FFLAGS@ $(PIC_FLAG)
OBJS = simp1.o simp2.o simp3.o simplx.o
SRCS = $(OBJS:.o=.cpp)

View file

@ -4,7 +4,8 @@
.SUFFIXES : .cpp .d .o
do_ranlib = @DO_RANLIB@
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT)
PIC_FLAG=@PIC@
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) $(PIC_FLAG)
#COBJS = tpx_files.o
COBJS = Methane.o Nitrogen.o Oxygen.o Water.o Hydrogen.o RedlichKwong.o \

View file

@ -322,7 +322,7 @@ CXXFLAGS=${CXXFLAGS:="-O3 -Wall"}
# Ending libraries to tack onto the linking of all C++ programs
LCXX_END_LIBS=${LCXX_END_LIBS:="-lm"}
# the compiler flag to use to compile code that will be inserted into
# The compiler flag to use to compile code that will be inserted into
# shared libraries.
PIC=${PIC:=-fPIC}

View file

@ -89,7 +89,7 @@ Initial T = 207.284, pres = 5.8944e-07 atm
N 9.55809e-114 4.63943e-114 -18.9446
O 1.18094e-57 6.54771e-58 -20.4172
NO 1.82556e-23 1.89829e-23 -39.3618
NO+ 2.2952e-228 2.3866e-228 12.2863
NO+ 2.2952e-228 2.38659e-228 12.2863
Electron 2.2952e-228 4.33484e-233 -541.209
N+ 0 0
O+ 0 0
@ -155,8 +155,8 @@ Initial T = 207.284, pres = 5.8944e-05 atm
N 9.55809e-115 4.63943e-115 -16.642
O 1.18094e-58 6.54771e-59 -18.1147
NO 1.82556e-23 1.89829e-23 -34.7566
NO+ 2.60402e-230 2.70772e-230 12.4126
Electron 2.60402e-230 4.9181e-235 -541.083
NO+ 2.60403e-230 2.70772e-230 12.4126
Electron 2.60403e-230 4.91811e-235 -541.083
N+ 0 0
O+ 0 0
N2+ 0 0
@ -258,7 +258,7 @@ Initial T = 414.143, pres = 1.17767e-08 atm
Electron 4.00599e-102 7.56595e-107 -254.374
N+ 7.16723e-207 3.47879e-207 34.3246
O+ 3.0296e-168 1.6797e-168 32.8512
N2+ 6.19808e-167 6.01689e-167 13.4694
N2+ 6.19807e-167 6.01689e-167 13.4694
O2+ 3.22979e-125 3.58144e-125 10.5226
Final T = 414.143, pres = 1.17767e-08 atm
@ -288,10 +288,10 @@ Initial T = 414.143, pres = 1.17767e-07 atm
O 5.92517e-26 3.28519e-26 -21.1772
NO 5.58575e-12 5.80828e-12 -40.8811
NO+ 5.13663e-103 5.34118e-103 12.2446
Electron 5.13663e-103 9.70134e-108 -254.125
N+ 2.90616e-208 1.41058e-208 33.4219
O+ 1.22844e-169 6.81082e-170 31.9485
N2+ 7.9474e-168 7.71508e-168 13.718
Electron 5.13663e-103 9.70133e-108 -254.125
N+ 2.90616e-208 1.41057e-208 33.4219
O+ 1.22844e-169 6.81081e-170 31.9485
N2+ 7.9474e-168 7.71507e-168 13.718
O2+ 4.14136e-126 4.59225e-126 10.7712
Final T = 414.143, pres = 1.17767e-07 atm
@ -320,12 +320,12 @@ Initial T = 414.143, pres = 1.17767e-06 atm
N 2.06855e-54 1.00406e-54 -18.5525
O 1.8737e-26 1.03887e-26 -20.026
NO 5.58575e-12 5.80828e-12 -38.5785
NO+ 2.82555e-104 2.93806e-104 11.6469
Electron 2.82555e-104 5.33648e-109 -254.723
N+ 5.05526e-210 2.45369e-210 31.6729
O+ 2.13687e-171 1.18474e-171 30.1995
N2+ 4.37168e-169 4.24389e-169 13.1203
O2+ 2.27807e-127 2.52609e-127 10.1735
NO+ 2.82554e-104 2.93805e-104 11.6469
Electron 2.82554e-104 5.33647e-109 -254.723
N+ 5.05525e-210 2.45369e-210 31.6729
O+ 2.13686e-171 1.18474e-171 30.1995
N2+ 4.37167e-169 4.24387e-169 13.1203
O2+ 2.27806e-127 2.52609e-127 10.1735
Final T = 414.143, pres = 1.17767e-06 atm
Initial T = 414.143, pres = 1.17767e-05 atm
@ -353,12 +353,12 @@ Initial T = 414.143, pres = 1.17767e-05 atm
N 6.54134e-55 3.17512e-55 -17.4013
O 5.92517e-27 3.28519e-27 -18.8747
NO 5.58575e-12 5.80828e-12 -36.2759
NO+ 3.94045e-105 4.09737e-105 11.9795
Electron 3.94045e-105 7.44216e-110 -254.39
N+ 2.2294e-211 1.08209e-211 30.8542
O+ 9.4237e-173 5.22476e-173 29.3808
N2+ 6.09667e-170 5.91845e-170 13.4529
O2+ 3.17695e-128 3.52284e-128 10.5061
NO+ 3.94044e-105 4.09735e-105 11.9795
Electron 3.94044e-105 7.44214e-110 -254.39
N+ 2.22939e-211 1.08209e-211 30.8542
O+ 9.42367e-173 5.22475e-173 29.3808
N2+ 6.09665e-170 5.91843e-170 13.4529
O2+ 3.17694e-128 3.52283e-128 10.5061
Final T = 414.143, pres = 1.17767e-05 atm
Initial T = 414.143, pres = 0.000117767 atm
@ -367,7 +367,7 @@ Initial T = 414.143, pres = 0.000117767 atm
temperature 414.143 K
pressure 11.9328 Pa
density 0.0001 kg/m^3
density 1e-04 kg/m^3
mean mol. weight 28.8565 amu
1 kg 1 kmol
@ -390,7 +390,7 @@ Initial T = 414.143, pres = 0.000117767 atm
Electron 2.91676e-106 5.50875e-111 -254.691
N+ 5.21845e-213 2.5329e-213 29.4021
O+ 2.20585e-174 1.22298e-174 27.9287
N2+ 4.51281e-171 4.38088e-171 13.1521
N2+ 4.51281e-171 4.38089e-171 13.1521
O2+ 2.35161e-129 2.60764e-129 10.2053
Final T = 414.143, pres = 0.000117767 atm
@ -422,9 +422,9 @@ Initial T = 414.143, pres = 0.00117767 atm
NO+ 3.85738e-107 4.01099e-107 11.9582
Electron 3.85738e-107 7.28527e-112 -254.411
N+ 2.1824e-214 1.05928e-214 28.5303
O+ 9.22504e-176 5.11462e-176 27.0569
N2+ 5.96815e-172 5.79368e-172 13.4316
O2+ 3.10998e-130 3.44858e-130 10.4848
O+ 9.22503e-176 5.11462e-176 27.0569
N2+ 5.96814e-172 5.79367e-172 13.4316
O2+ 3.10997e-130 3.44857e-130 10.4848
Final T = 414.143, pres = 0.00117767 atm
Initial T = 414.143, pres = 0.0117767 atm
@ -551,7 +551,7 @@ Initial T = 1152.61, pres = 3.27763e-06 atm
N 2.88709e-16 1.40138e-16 -19.0539
O 2.24413e-06 1.24425e-06 -20.575
NO 0.000134716 0.000140083 -39.6289
NO+ 9.06539e-24 9.42639e-24 11.6607
NO+ 9.06539e-24 9.4264e-24 11.6607
Electron 9.06539e-24 1.71214e-28 -69.7325
N+ 1.62909e-57 7.90717e-58 32.2358
O+ 3.09489e-44 1.7159e-44 30.7146