[cantera]: changing relative directory of all generated libraries to build directory, in keeping with cantera 1.8 standard. Next: make working 'make check'!

This commit is contained in:
Nicholas Malaya 2012-01-04 00:42:46 +00:00
parent 374d43d697
commit 92abf1f919
17 changed files with 53 additions and 178 deletions

View file

@ -12,12 +12,12 @@ cc_sources = ct2ctml.cpp ctml.cpp misc.cpp plots.cpp \
INCLUDES =
AM_CXXFLAGS = $(INCLUDES)
lib_LTLIBRARIES = libctbase.la
lib_LTLIBRARIES = $(top_builddir)/build/lib/libctbase.la
library_includedir = $(includedir)
#-----------------------
# Cantera Converters C/C++ library
#-----------------------
libctbase_la_LDFLAGS = $(all_libraries) -release $(GENERIC_RELEASE)
libctbase_la_SOURCES = $(cc_sources) $(h_sources)
__top_builddir__build_lib_libctbase_la_LDFLAGS = $(all_libraries) -release $(GENERIC_RELEASE)
__top_builddir__build_lib_libctbase_la_SOURCES = $(cc_sources) $(h_sources)

View file

@ -9,12 +9,12 @@ cc_sources = atomicWeightDB.cpp ck2ctml.cpp CKReader.cpp filter.cpp \
INCLUDES = -I../base -I../../../
AM_CXXFLAGS = $(INCLUDES)
lib_LTLIBRARIES = libconverters.la
lib_LTLIBRARIES = $(top_builddir)/build/lib/libconverters.la
library_includedir = $(includedir)
#-----------------------
# Cantera Converters C/C++ library
#-----------------------
libconverters_la_LDFLAGS = $(all_libraries) -release $(GENERIC_RELEASE)
libconverters_la_SOURCES = $(cc_sources) $(h_sources)
__top_builddir__build_lib_libconverters_la_LDFLAGS = $(all_libraries) -release $(GENERIC_RELEASE)
__top_builddir__build_lib_libconverters_la_SOURCES = $(cc_sources) $(h_sources)

View file

@ -8,12 +8,12 @@ INCLUDES = -I../base -I../thermo -I../numerics -I../../../
INCLUDES += -I../../../ext/f2c_libs/
AM_CXXFLAGS = $(INCLUDES)
lib_LTLIBRARIES = libequil.la
lib_LTLIBRARIES = $(top_builddir)/build/lib/libequil.la
library_includedir = $(includedir)
#-----------------------
# Cantera Converters C/C++ library
#-----------------------
libequil_la_LDFLAGS = $(all_libraries) -release $(GENERIC_RELEASE)
libequil_la_SOURCES = $(cc_sources) $(h_sources)
__top_builddir__build_lib_libequil_la_LDFLAGS = $(all_libraries) -release $(GENERIC_RELEASE)
__top_builddir__build_lib_libequil_la_SOURCES = $(cc_sources) $(h_sources)

View file

@ -12,12 +12,12 @@ cc_sources = importKinetics.cpp GRI_30_Kinetics.cpp KineticsFactory.cpp \
INCLUDES = -I../base -I../thermo -I../../../
AM_CXXFLAGS = $(INCLUDES)
lib_LTLIBRARIES = libkinetics.la
lib_LTLIBRARIES = $(top_builddir)/build/lib/libkinetics.la
library_includedir = $(includedir)
#-----------------------
# Cantera Kinetics C/C++ library
#-----------------------
libkinetics_la_LDFLAGS = $(all_libraries) -release $(GENERIC_RELEASE)
libkinetics_la_SOURCES = $(cc_sources) $(h_sources)
__top_builddir__build_lib_libkinetics_la_LDFLAGS = $(all_libraries) -release $(GENERIC_RELEASE)
__top_builddir__build_lib_libkinetics_la_SOURCES = $(cc_sources) $(h_sources)

View file

@ -11,12 +11,12 @@ cc_sources = DenseMatrix.cpp funcs.cpp Func1.cpp ODE_integrators.cpp \
INCLUDES = -I../base -I../../../
AM_CXXFLAGS = $(INCLUDES)
lib_LTLIBRARIES = libctnumerics.la
lib_LTLIBRARIES = $(top_builddir)/build/lib/libctnumerics.la
library_includedir = $(includedir)
#-----------------------
# Cantera numerics C/C++ library
#-----------------------
libctnumerics_la_LDFLAGS = $(all_libraries) -release $(GENERIC_RELEASE)
libctnumerics_la_SOURCES = $(cc_sources) $(h_sources)
__top_builddir__build_lib_libctnumerics_la_LDFLAGS = $(all_libraries) -release $(GENERIC_RELEASE)
__top_builddir__build_lib_libctnumerics_la_SOURCES = $(cc_sources) $(h_sources)

View file

@ -8,12 +8,12 @@ h_sources = Inlet1D.h MultiJac.h Sim1D.h StFlow.h \
INCLUDES = -I../base -I../thermo -I../kinetics -I../transport -I../numerics -I../../../
AM_CXXFLAGS = $(INCLUDES) -fPIC
lib_LTLIBRARIES = liboneD.la
lib_LTLIBRARIES = $(top_builddir)/build/lib/liboneD.la
library_includedir = $(includedir)
#-----------------------
# Cantera OneD C/C++ library
#-----------------------
liboneD_la_LDFLAGS = $(all_libraries) -release $(GENERIC_RELEASE)
liboneD_la_SOURCES = $(cc_sources) $(h_sources)
__top_builddir__build_lib_liboneD_la_LDFLAGS = $(all_libraries) -release $(GENERIC_RELEASE)
__top_builddir__build_lib_liboneD_la_SOURCES = $(cc_sources) $(h_sources)

View file

@ -6,12 +6,12 @@ cc_sources = LineBroadener.cpp rotor.cpp spectralUtilities.cpp
INCLUDES = -I../base -I../../../
AM_CXXFLAGS = $(INCLUDES)
lib_LTLIBRARIES = libctspectra.la
lib_LTLIBRARIES = $(top_builddir)/build/lib/libctspectra.la
library_includedir = $(includedir)
#-----------------------
# Cantera Spectra C/C++ library
#-----------------------
libctspectra_la_LDFLAGS = $(all_libraries) -release $(GENERIC_RELEASE)
libctspectra_la_SOURCES = $(cc_sources) $(h_sources)
__top_builddir__build_lib_libctspectra_la_LDFLAGS = $(all_libraries) -release $(GENERIC_RELEASE)
__top_builddir__build_lib_libctspectra_la_SOURCES = $(cc_sources) $(h_sources)

View file

@ -27,12 +27,12 @@ cc_sources = State.cpp Elements.cpp Constituents.cpp Phase.cpp \
INCLUDES = -I../base -I../../../
AM_CXXFLAGS = $(INCLUDES)
lib_LTLIBRARIES = libthermo.la
lib_LTLIBRARIES = $(top_builddir)/build/lib/libthermo.la
library_includedir = $(includedir)
#-----------------------
# Cantera thermo C/C++ library
#-----------------------
libthermo_la_LDFLAGS = $(all_libraries) -release $(GENERIC_RELEASE)
libthermo_la_SOURCES = $(cc_sources) $(h_sources)
__top_builddir__build_lib_libthermo_la_LDFLAGS = $(all_libraries) -release $(GENERIC_RELEASE)
__top_builddir__build_lib_libthermo_la_SOURCES = $(cc_sources) $(h_sources)

View file

@ -13,12 +13,12 @@ cc_sources = AqueousTransport.cpp LiquidTransport.cpp MMCollisionInt.cpp \
INCLUDES = -I../base -I../thermo -I../numerics -I../../../
AM_CXXFLAGS = $(INCLUDES)
lib_LTLIBRARIES = libtransport.la
lib_LTLIBRARIES = $(top_builddir)/build/lib/libtransport.la
library_includedir = $(includedir)
#-----------------------
# Cantera Transport C/C++ library
#-----------------------
libtransport_la_LDFLAGS = $(all_libraries) -release $(GENERIC_RELEASE)
libtransport_la_SOURCES = $(cc_sources) $(h_sources)
__top_builddir__build_lib_libtransport_la_LDFLAGS = $(all_libraries) -release $(GENERIC_RELEASE)
__top_builddir__build_lib_libtransport_la_SOURCES = $(cc_sources) $(h_sources)

View file

@ -9,12 +9,12 @@ cc_sources = Reactor.cpp ReactorBase.cpp FlowDevice.cpp Wall.cpp \
INCLUDES = -I../base -I../thermo -I../kinetics -I../numerics -I../../../
AM_CXXFLAGS = $(INCLUDES)
lib_LTLIBRARIES = libzeroD.la
lib_LTLIBRARIES = $(top_builddir)/build/lib/libzeroD.la
library_includedir = $(includedir)
#-----------------------
# Cantera OneD C/C++ library
#-----------------------
libzeroD_la_LDFLAGS = $(all_libraries) -release $(GENERIC_RELEASE)
libzeroD_la_SOURCES = $(cc_sources) $(h_sources)
__top_builddir__build_lib_libzeroD_la_LDFLAGS = $(all_libraries) -release $(GENERIC_RELEASE)
__top_builddir__build_lib_libzeroD_la_SOURCES = $(cc_sources) $(h_sources)

View file

@ -55,6 +55,7 @@ DX_INIT_DOXYGEN(cantera, doxygen/cantera.dox, docs)
# Generate Output Files
AC_OUTPUT(Makefile examples/Makefile \
examples/cxx/Makefile \
test_problems/Makefile \
doxygen/Makefile \
Cantera/Makefile \

View file

@ -1,3 +1,5 @@
SUBDIRS = cxx
EXTRA_DIST =
dist-hook:

18
examples/cxx/Makefile.am Normal file
View file

@ -0,0 +1,18 @@
h_sources = example_utils.h
cc_sources = equil_example1.cpp examples.cpp flame1.cpp kinetics_example1.cpp \
kinetics_example2.cpp kinetics_example3.cpp rxnpath_example1.cpp \
transport_example1.cpp transport_example2.cpp
INCLUDES = -I../base -I../../Cantera/cxx/include
AM_CXXFLAGS = $(INCLUDES)
bin_PROGRAMS = cxx_examples
library_includedir = $(includedir)
#-----------------------
# Cantera cxx examples
#-----------------------
cxx_examples_LDFLAGS = $(all_libraries) -release $(GENERIC_RELEASE)
cxx_examples_SOURCES = $(cc_sources) $(h_sources)

View file

@ -1,131 +0,0 @@
#!/bin/sh
############################################################################
#
# Makefile to compile and link a C++ application to
# Cantera.
#
#############################################################################
# the name of the executable program to be created
PROG_NAME = cxx_examples
# the object files to be linked together. List those generated from Fortran
# and from C/C++ separately
OBJS = examples.o kinetics_example1.o kinetics_example2.o \
kinetics_example3.o equil_example1.o \
transport_example1.o transport_example2.o \
rxnpath_example1.o
# additional flags to be passed to the linker. If your program
# requires other external libraries, put them here
LINK_OPTIONS = @EXTRA_LINK@
#############################################################################
# the Fortran compiler
FORT = @F90@
PURIFY=@PURIFY@
# Fortran compile flags
FORT_FLAGS = @FFLAGS@
# Fortran libraries
ifeq (@build_with_f2c@, 0)
FORT_LIBS = @FLIBS@
else
FORT_LIBS =
endif
# the C++ compiler
CXX = @CXX@
# C++ compile flags
CXX_FLAGS = @CXXFLAGS@ @CXX_INCLUDES@
# external libraries
EXT_LIBS = @LOCAL_LIBS@ -lctcxx
# Ending C++ linking libraries
LCXX_END_LIBS = @LCXX_END_LIBS@
#------ you probably don't have to change anything below this line -----
# the directory where the Cantera libraries are located
CANTERA_LIBDIR=@buildlib@
# required Cantera libraries
CANTERA_LIBS = @LOCAL_LIBS@ -lctcxx
CANTERA_LIB_DEPS = $(CANTERA_LIBDIR)/libkinetics.a \
$(CANTERA_LIBDIR)/libtransport.a \
$(CANTERA_LIBDIR)/libthermo.a \
$(CANTERA_LIBDIR)/libctnumerics.a \
$(CANTERA_LIBDIR)/libctbase.a \
$(CANTERA_LIBDIR)/libctmath.a \
$(CANTERA_LIBDIR)/libtpx.a \
$(CANTERA_LIBDIR)/libconverters.a
ifeq (@build_lapack@, 1)
CANTERA_LAPACK_DEPS = $(CANTERA_LIBDIR)/libctblas.a \
$(CANTERA_LIBDIR)/libctlapack.a
endif
ifeq (@use_sundials@, 0)
CANTERA_CVODE_DEPS = $(CANTERA_LIBDIR)/libcvode.a
endif
LIB_DEPS = $(CANTERA_LIB_DEPS) $(CANTERA_LAPACK_DEPS) $(CANTERA_CVODE_DEPS)
# the directory where Cantera include files may be found.
CANTERA_INC=-I@ctroot@/build/include
# flags passed to the C++ compiler/linker for the linking step
LCXX_FLAGS = -L$(CANTERA_LIBDIR) @LOCAL_LIB_DIRS@ @CXXFLAGS@
# how to compile C++ source files to object files
.@CXX_EXT@.@OBJ_EXT@:
$(PURIFY) $(CXX) -c $< $(CANTERA_INC) $(CXX_FLAGS)
# how to compile Fortran source files to object files
.@F77_EXT@.@OBJ_EXT@:
$(PURIFY) $(FORT) -c $< $(FORT_FLAGS)
PROGRAM = ./$(PROG_NAME)$(EXE_EXT)
all: .depends $(PROGRAM)
DEPENDS=$(OBJS:.o=.d)
%.d:
@CXX_DEPENDS@ $(CANTERA_INC) $(CXX_FLAGS) $*.cpp > $*.d
$(PROGRAM): $(OBJS) $(LIB_DEPS)
$(PURIFY) $(CXX) -o $(PROGRAM) $(OBJS) $(LCXX_FLAGS) $(CANTERA_LIBS) \
$(LINK_OPTIONS) $(EXT_LIBS) @LIBS@ \
$(LCXX_END_LIBS)
clean:
$(RM) $(OBJS) $(PROGRAM) $(DEPENDS) .depends *~
(if test -d SunWS_cache ; then \
$(RM) -rf SunWS_cache ; \
fi )
depends:
$(MAKE) .depends
.depends: $(DEPENDS)
cat *.d > .depends
TAGS:
etags *.h *.cpp
ifeq ($(wildcard .depends), .depends)
include .depends
endif

View file

@ -16,7 +16,7 @@
#pragma warning(disable:4503)
#endif
#include <cantera/Cantera.h>
#include <Cantera.h>
#include <time.h>
#include "example_utils.h"
#include <cantera/equilibrium.h>

View file

@ -5,6 +5,7 @@
ChemEquil_ionizedGas ChemEquil_red1 CpJump \
mixGasTransport multiGasTransport printUtilUnitTest
SUBDIRS = cxx_ex
#
# would be good to add:
#

View file

@ -1,16 +0,0 @@
#
# $Revision: 1.7 $
# $Author: hkmoffa $
# $Date: 2006/04/30 18:06:56 $
#
#
all:
(cd ../../examples/cxx ; @MAKE@ )
test:
./runtest
clean:
(cd ../../examples/cxx ; @MAKE@ clean )
depends: