Commit 6a9485b4 authored by sebastien's avatar sebastien
Browse files

Build system:

* disable building of k-order pert DLL for the moment
* rollback on the -fPIC flags for Dynare++: we can't use the same binary objects for standalone dynare++ and k-order DLL


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2974 ac1d8469-bf42-47a9-8791-bf33cf982152
parent 1e4a7c2c
......@@ -34,18 +34,6 @@ CXXFLAGS="$CXXFLAGS -Wall"
AC_PROG_RANLIB
AC_MSG_CHECKING([for compiler flag to generate position independent code])
case ${host_os} in
*cygwin* | *mingw*)
PICFLAG=""
;;
*)
PICFLAG="-fPIC"
;;
esac
AC_MSG_RESULT($PICFLAG)
AC_SUBST(PICFLAG)
AC_PROG_LN_S
case ${host_os} in
*cygwin*)
......@@ -73,7 +61,8 @@ CPPFLAGS="$CPPFLAGS_SAVED"
# Don't use deprecated hash structures
AC_DEFINE([BOOST_NO_HASH])
LT_LIB_DLLOAD
# Libtool test for dlopen, disabled for the moment
#LT_LIB_DLLOAD
AC_CHECK_PROG([PDFTEX], [pdftex], [pdftex])
AM_CONDITIONAL([HAVE_PDFTEX], [test "x$PDFTEX" != "x"])
......
......@@ -56,9 +56,6 @@ libkord_a_SOURCES = $(CWEBSRC) $(GENERATED_FILES)
libkord_a_CPPFLAGS = -I../sylv/cc -I../tl/cc -I../integ/cc -DPOSIX_THREADS
libkord_a_CXXFLAGS = $(PTHREAD_CFLAGS)
# Generate position independent code for k-order DLL
libkord_a_CXXFLAGS += $(PICFLAG)
BUILT_SOURCES = $(GENERATED_FILES)
EXTRA_DIST = main.web
......
bin_PROGRAMS = dynare++
noinst_LIBRARIES = libnsolve.a
GENERATED_FILES = dynglob_ll.cc dynglob_tab.cc dynglob_tab.hh
dynare___SOURCES = \
......@@ -19,17 +17,14 @@ dynare___SOURCES = \
dynare_model.cpp \
dynare_params.h \
forw_subst_builder.cpp \
nlsolve.cpp \
nlsolve.h \
$(GENERATED_FILES)
dynare___CPPFLAGS = -I../sylv/cc -I../tl/cc -I../kord -I../integ/cc -I.. -DDYNVERSION=\"$(PACKAGE_VERSION)\" -DPOSIX_THREADS
dynare___LDADD = ../kord/libkord.a ../integ/cc/libinteg.a ../tl/cc/libtl.a ../parser/cc/libparser.a ../utils/cc/libutils.a ../sylv/cc/libsylv.a $(noinst_LIBRARIES) $(LAPACK_LIBS) $(BLAS_LIBS) $(LIBS) $(FLIBS) $(PTHREAD_LIBS)
dynare___CXXFLAGS = $(PTHREAD_CFLAGS)
# Put nlsolve in a separate library, with position independent code, for k-order DLL
libnsolve_a_SOURCES = nlsolve.cpp nlsolve.h
libnsolve_a_CPPFLAGS = $(dynare___CPPFLAGS)
libnsolve_a_CXXFLAGS = $(PICFLAG)
BUILT_SOURCES = $(GENERATED_FILES)
EXTRA_DIST = dynglob.lex dynglob.y
......
......@@ -40,6 +40,3 @@ libsylv_a_SOURCES = \
SchurDecomp.cpp \
KronVector.h \
KronUtils.cpp
# Generate position independent code for k-order DLL
libsylv_a_CXXFLAGS = $(PICFLAG)
......@@ -94,9 +94,6 @@ libtl_a_SOURCES = $(CWEBSRC) $(GENERATED_FILES)
libtl_a_CPPFLAGS = -I../../sylv/cc -DPOSIX_THREADS
libtl_a_CXXFLAGS = $(PTHREAD_CFLAGS)
# Generate position independent code for k-order DLL
libtl_a_CXXFLAGS += $(PICFLAG)
BUILT_SOURCES = $(GENERATED_FILES)
EXTRA_DIST = main.web
......
......@@ -12,10 +12,10 @@ if HAVE_BLAS
if HAVE_LAPACK
if HAVE_PTHREAD
if HAVE_MEXOPTS
SUBDIRS += korderpert/matlab korderpert/tests
#SUBDIRS += korderpert/matlab korderpert/tests
endif
if HAVE_MKOCTFILE
SUBDIRS += korderpert/octave
#SUBDIRS += korderpert/octave
endif
endif
endif
......
VPATH = $(top_srcdir)/mex/sources/korderpert
vpath %.cpp $(top_srcdir)/mex/sources/korderpert
vpath %.cpp $(top_srcdir)/mex/sources/gensylv
noinst_PROGRAMS = korderpert
#check_PROGRAMS = ramst1_dynamic fs2000k_dynamic
# Can't use korderpert_CPPFLAGS, because it interacts badly with VPATH
CPPFLAGS += -DMATLAB_MEX_FILE -DPOSIX_THREADS -I$(top_srcdir)/dynare++/src -I$(top_srcdir)/dynare++/kord -I$(top_srcdir)/dynare++/tl/cc -I$(top_srcdir)/dynare++/utils/cc -I$(top_srcdir)/dynare++/sylv/cc
CPPFLAGS += -I$(top_srcdir)/dynare++/src -I$(top_srcdir)/dynare++/kord -I$(top_srcdir)/dynare++/tl/cc -I$(top_srcdir)/dynare++/utils/cc -I$(top_srcdir)/dynare++/sylv/cc
# For Dynare++ thread implementation in tensor library
CPPFLAGS += -DPOSIX_THREADS
# For Dynare++ gensylv (so that it uses the right prototypes for BLAS/LAPACK)
CPPFLAGS += -DMATLAB
# So that we have mexFunction() in the library
CPPFLAGS += -DMATLAB_MEX_FILE
CXXFLAGS += $(PTHREAD_CFLAGS)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment