[cantera]: fixing cxx library build

This commit is contained in:
Nicholas Malaya 2012-01-18 20:15:05 +00:00
parent 00b631a310
commit 020a18fa07
8 changed files with 23 additions and 127 deletions

View file

@ -1,4 +1,4 @@
# $Id: $
# will need to add python and matlab
SUBDIRS = src user
SUBDIRS = src user cxx

1
Cantera/cxx/Makefile.am Normal file
View file

@ -0,0 +1 @@
SUBDIRS = src

View file

@ -1,57 +0,0 @@
#/bin/sh
###############################################################
# $Author: hkmoffa $
# $Date: 2009/04/04 03:27:43 $
# $Revision: 1.14 $
#
# Copyright 2001 California Institute of Technology
# See file License.txt for licensing information
#
###############################################################
build_f90=@BUILD_F90@
build_python=@BUILD_PYTHON@
INCDIR = ../../build/include/cantera
INSTALL_TSC = ../../../bin/install_tsc
CXX_H = Cantera.h equilibrium.h IncompressibleSolid.h \
kinetics.h onedim.h surface.h GRI30.h integrators.h \
Metal.h PureFluid.h transport.h Edge.h \
IdealGasMix.h Interface.h numerics.h \
reactionpaths.h zerodim.h importPhase.h thermo.h \
radiation.h spectra.h electrolyteThermo.h Cantera.mak Cantera_bt.mak
all:
@(cd include ; \
for lh in $(CXX_H) ; do \
$(INSTALL_TSC) "$${lh}" "../"$(INCDIR) ; \
done)
cd src; @MAKE@
# cd demos; @MAKE@
clean:
@(for lh in $(CXX_H) ; do \
th=$(INCDIR)/"$${lh}" ; \
if test -f "$${th}" ; then \
$(RM) "$${th}" ; \
echo "$(RM) $${th}" ; \
fi \
done)
cd src; $(RM) .depends ; @MAKE@ clean
cd demos; $(RM) .depends ; @MAKE@ clean
depends:
cd src; @MAKE@ depends
# cd demos; @MAKE@ depends
install:
cd src; @MAKE@ install
cd demos; @MAKE@ install
demos:
cd demos; @MAKE@
# end of file

View file

@ -0,0 +1,16 @@
cc_sources = cxxutils.cpp importPhase.cpp
AM_CPPFLAGS = -I../../src/thermo -I../../src/base
AM_CXXFLAGS = $(AM_CPPFLAGS)
lib_LTLIBRARIES = $(top_builddir)/build/lib/libctcxx.la
library_includedir = $(top_builddir)/build/include
library_include_HEADERS = $(h_sources)
#-----------------------
# Cantera Converters C/C++ library
#-----------------------
__top_builddir__build_lib_libctcxx_la_LDFLAGS = $(all_libraries) -release $(GENERIC_RELEASE)
__top_builddir__build_lib_libctcxx_la_SOURCES = $(cc_sources) $(h_sources)
CLEANFILES = *.o

View file

@ -1,65 +0,0 @@
#/bin/sh
###############################################################
# $Author$
# $Date$
# $Revision$
#
# Copyright 2001 California Institute of Technology
#
###############################################################
.SUFFIXES :
.SUFFIXES : .cpp .d .o .h
PIC_FLAG=@PIC@
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) $(PIC_FLAG)
OBJS = importPhase.o
DEPENDS = $(OBJS:.o=.d)
PURIFY=@PURIFY@
PIC_FLAG=@PIC@
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) $(PIC_FLAG)
# the directory where Cantera include files may be found.
CXX_INCLUDES = -I../../src/base -I../../src/thermo @CXX_INCLUDES@
# how to compile C++ source files to object files
.cpp.o:
$(PURIFY) @CXX@ -c $< $(CXX_INCLUDES) $(CXX_FLAGS)
%.d: Makefile %.o
@CXX_DEPENDS@ $(CXX_FLAGS) $(CXX_INCLUDES) $*.cpp > $*.d
LIB_NAME=libctcxx
CXXLIB=@buildlib@/$(LIB_NAME).a
all: .depends $(CXXLIB)
$(CXXLIB): $(OBJS)
@ARCHIVE@ $(CXXLIB) $(OBJS)
clean:
$(RM) $(OBJS) *.d $(CXXLIB)
(if test -d SunWS_cache ; then \
$(RM) -rf SunWS_cache ; \
fi )
install:
@INSTALL@ $(CXXLIB) @prefix@/lib/cantera
depends:
@MAKE@ .depends
.depends: $(DEPENDS)
cat $(DEPENDS) > .depends
$(OBJS): Makefile
ifeq ($(wildcard .depends), .depends)
include .depends
endif

View file

@ -9,7 +9,7 @@ cc_sources = importKinetics.cpp GRI_30_Kinetics.cpp KineticsFactory.cpp \
GasKinetics.cpp AqueousKinetics.cpp FalloffFactory.cpp
ReactionStoichMgr.cpp Kinetics.cpp solveSP.cpp
AM_CPPFLAGS = -I../base -I../thermo -I../../../
AM_CPPFLAGS = -I../base -I../thermo -I../../../
AM_CXXFLAGS = $(AM_CPPFLAGS)
lib_LTLIBRARIES = $(top_builddir)/build/lib/libkinetics.la

View file

@ -5,7 +5,7 @@ AC_PREREQ(2.61)
AC_INIT([cantera], [1.8.0], [nick@ices.utexas.edu])
AC_CONFIG_HEADER(config.h)
AC_CONFIG_AUX_DIR([build-aux])
AX_ENABLE_BUILDDIR
#AX_ENABLE_BUILDDIR
AM_INIT_AUTOMAKE(-Wall -Werror)
# snarf and provide versioning numbers
@ -69,6 +69,8 @@ AC_OUTPUT(Makefile examples/Makefile \
Cantera/Makefile \
Cantera/user/Makefile \
Cantera/src/Makefile \
Cantera/cxx/Makefile \
Cantera/cxx/src/Makefile \
Cantera/src/base/Makefile \
Cantera/src/converters/Makefile \
Cantera/src/kinetics/Makefile \

View file

@ -8,8 +8,7 @@ cc_sources = examples.cpp kinetics_example1.cpp kinetics_example2.cpp \
LINK = -lkinetics -ltransport -lthermo -lctnumerics
LINK += -lctbase -ltpx -lctmath -lconverters
LINK += -luser -lcvode -lstdc++ -lctlapack
LINK += -lctblas
# -lctf2c -lctcxx -luser -lstdc++
LINK += -lctblas -lctf2c -lctcxx
LIBS = -L$(top_builddir)/build/lib/ $(LINK)