From 48096db2ff03f1792d16c17cdc3e560abbf7d296 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien.villemot@ens.fr>
Date: Thu, 28 Oct 2010 10:17:58 +0200
Subject: [PATCH] Build system: add logMHMCMC DLL

---
 mex/build/logMHMCMCposterior.am               | 62 +++++++++++++++++++
 mex/build/matlab/Makefile.am                  |  2 +-
 mex/build/matlab/configure.ac                 |  3 +-
 .../matlab/logMHMCMCposterior/Makefile.am     |  2 +
 mex/build/octave/Makefile.am                  |  2 +-
 mex/build/octave/configure.ac                 |  1 +
 .../octave/logMHMCMCposterior/Makefile.am     |  3 +
 mex/sources/estimation/Makefile.am            |  5 ++
 8 files changed, 77 insertions(+), 3 deletions(-)
 create mode 100644 mex/build/logMHMCMCposterior.am
 create mode 100644 mex/build/matlab/logMHMCMCposterior/Makefile.am
 create mode 100644 mex/build/octave/logMHMCMCposterior/Makefile.am

diff --git a/mex/build/logMHMCMCposterior.am b/mex/build/logMHMCMCposterior.am
new file mode 100644
index 000000000..b20be8373
--- /dev/null
+++ b/mex/build/logMHMCMCposterior.am
@@ -0,0 +1,62 @@
+vpath %.cc $(top_srcdir)/../../sources/estimation $(top_srcdir)/../../sources/estimation/libmat $(top_srcdir)/../../sources/estimation/utils
+vpath %.hh $(top_srcdir)/../../sources/estimation $(top_srcdir)/../../sources/estimation/libmat
+
+CPPFLAGS += -I$(top_srcdir)/../../sources/estimation/libmat -I$(top_srcdir)/../../sources/estimation/utils $(BOOST_CPPFLAGS)
+LDFLAGS += $(BOOST_LDFLAGS)
+
+noinst_PROGRAMS = logMHMCMCposterior
+
+logMHMCMCposterior_LDADD = $(LIBADD_DLOPEN)
+
+MAT_SRCS = \
+	Matrix.hh \
+	Matrix.cc \
+	Vector.hh \
+	Vector.cc \
+	BlasBindings.hh \
+	DiscLyapFast.hh \
+	GeneralizedSchurDecomposition.cc \
+	GeneralizedSchurDecomposition.hh \
+	LapackBindings.hh \
+	LUSolver.cc \
+	LUSolver.hh \
+	QRDecomposition.cc \
+	QRDecomposition.hh \
+	VDVEigDecomposition.cc \
+	VDVEigDecomposition.hh
+
+nodist_logMHMCMCposterior_SOURCES = \
+	$(MAT_SRCS) \
+	DecisionRules.cc \
+	DecisionRules.hh \
+	DetrendData.cc \
+	DetrendData.hh \
+	EstimatedParameter.cc \
+	EstimatedParameter.hh \
+	EstimatedParametersDescription.cc \
+	EstimatedParametersDescription.hh \
+	EstimationSubsample.cc \
+	EstimationSubsample.hh \
+	InitializeKalmanFilter.cc \
+	InitializeKalmanFilter.hh \
+	KalmanFilter.cc \
+	KalmanFilter.hh \
+	LogLikelihoodSubSample.cc \
+	LogLikelihoodSubSample.hh \
+	LogLikelihoodMain.hh \
+	LogLikelihoodMain.cc \
+	LogPosteriorDensity.cc \
+	LogPosteriorDensity.hh \
+	LogPriorDensity.cc \
+	LogPriorDensity.hh \
+	ModelSolution.cc \
+	ModelSolution.hh \
+	Prior.cc \
+	Prior.hh \
+	RandomWalkMetropolisHastings.cc \
+	RandomWalkMetropolisHastings.hh \
+	RandSampler.cc \
+	RandSampler.hh \
+	dynamic_dll.cc \
+	dynamic_dll.hh \
+	logMHMCMCposterior.cc
diff --git a/mex/build/matlab/Makefile.am b/mex/build/matlab/Makefile.am
index a06359d3d..bfb2c6094 100644
--- a/mex/build/matlab/Makefile.am
+++ b/mex/build/matlab/Makefile.am
@@ -2,7 +2,7 @@ ACLOCAL_AMFLAGS = -I ../../../m4
 
 # libdynare++ must come before gensylv, k_order_perturbation, dynare_simul_
 if DO_SOMETHING
-SUBDIRS = mjdgges kronecker bytecode libdynare++ gensylv k_order_perturbation dynare_simul_ logposterior
+SUBDIRS = mjdgges kronecker bytecode libdynare++ gensylv k_order_perturbation dynare_simul_ logposterior logMHMCMCposterior
 if HAVE_GSL
 SUBDIRS += swz
 endif
diff --git a/mex/build/matlab/configure.ac b/mex/build/matlab/configure.ac
index 1de917537..2545b6ce2 100644
--- a/mex/build/matlab/configure.ac
+++ b/mex/build/matlab/configure.ac
@@ -118,6 +118,7 @@ AC_CONFIG_FILES([Makefile
                  k_order_perturbation/Makefile
                  dynare_simul_/Makefile
                  swz/Makefile
-                 logposterior/Makefile])
+                 logposterior/Makefile
+                 logMHMCMCposterior/Makefile])
 
 AC_OUTPUT
diff --git a/mex/build/matlab/logMHMCMCposterior/Makefile.am b/mex/build/matlab/logMHMCMCposterior/Makefile.am
new file mode 100644
index 000000000..58f0fcc47
--- /dev/null
+++ b/mex/build/matlab/logMHMCMCposterior/Makefile.am
@@ -0,0 +1,2 @@
+include ../mex.am
+include ../../logMHMCMCposterior.am
diff --git a/mex/build/octave/Makefile.am b/mex/build/octave/Makefile.am
index 0471b4409..ebbc7e7c9 100644
--- a/mex/build/octave/Makefile.am
+++ b/mex/build/octave/Makefile.am
@@ -2,7 +2,7 @@ ACLOCAL_AMFLAGS = -I ../../../m4
 
 # libdynare++ must come before gensylv, k_order_perturbation, dynare_simul_
 if DO_SOMETHING
-SUBDIRS = mjdgges kronecker bytecode libdynare++ gensylv k_order_perturbation dynare_simul_ logposterior qzcomplex ordschur
+SUBDIRS = mjdgges kronecker bytecode libdynare++ gensylv k_order_perturbation dynare_simul_ logposterior logMHMCMCposterior qzcomplex ordschur
 if HAVE_GSL
 SUBDIRS += swz
 endif
diff --git a/mex/build/octave/configure.ac b/mex/build/octave/configure.ac
index a30d348fa..3b3177740 100644
--- a/mex/build/octave/configure.ac
+++ b/mex/build/octave/configure.ac
@@ -102,6 +102,7 @@ AC_CONFIG_FILES([Makefile
                  dynare_simul_/Makefile
                  swz/Makefile
                  logposterior/Makefile
+                 logMHMCMCposterior/Makefile
                  qzcomplex/Makefile
                  ordschur/Makefile])
 
diff --git a/mex/build/octave/logMHMCMCposterior/Makefile.am b/mex/build/octave/logMHMCMCposterior/Makefile.am
new file mode 100644
index 000000000..d5d3d68d2
--- /dev/null
+++ b/mex/build/octave/logMHMCMCposterior/Makefile.am
@@ -0,0 +1,3 @@
+EXEEXT = .mex
+include ../mex.am
+include ../../logMHMCMCposterior.am
diff --git a/mex/sources/estimation/Makefile.am b/mex/sources/estimation/Makefile.am
index 4277875d5..ee380b038 100644
--- a/mex/sources/estimation/Makefile.am
+++ b/mex/sources/estimation/Makefile.am
@@ -25,6 +25,7 @@ EXTRA_DIST = \
 	LogLikelihoodMain.cc \
 	LogLikelihoodSubSample.cc \
 	LogLikelihoodSubSample.hh \
+	logMHMCMCposterior.cc \
 	logposterior.cc \
 	LogPosteriorDensity.cc \
 	LogPosteriorDensity.hh \
@@ -34,6 +35,10 @@ EXTRA_DIST = \
 	ModelSolution.hh \
 	Prior.cc \
 	Prior.hh \
+	RandomWalkMetropolisHastings.cc \
+	RandomWalkMetropolisHastings.hh \
+	RandSampler.cc \
+	RandSampler.hh \
 	utils/dynamic_dll.cc \
 	utils/dynamic_dll.hh \
 	utils/ts_exception.h
-- 
GitLab