Commit 566b2af5 authored by ale's avatar ale

use libtool to create libraries; fixes to use embedded Torch3 lib

parent 588c5695
include $(top_srcdir)/vars.mk
noinst_LIBRARIES = libimmsanalyzer.a
noinst_LTLIBRARIES = libimmsanalyzer.la
bin_PROGRAMS = imms-analyzer
libimmsanalyzer_a_SOURCES = \
libimmsanalyzer_la_SOURCES = \
beatkeeper.cc \
beatkeeper.h \
fftprovider.cc \
......
......@@ -18,16 +18,15 @@
*/
#include <sstream>
#include <torch/KMeans.h>
#include <torch/Random.h>
#include <torch/EMTrainer.h>
#include <torch/NLLMeasurer.h>
#include <torch/MemoryXFile.h>
#include <torch/Sequence.h>
#include <torch/MemoryDataSet.h>
#include <torch/DiagonalGMM.h>
//#include <sqlite++.h>
// Torch3 headers.
#include "KMeans.h"
#include "Random.h"
#include "EMTrainer.h"
#include "NLLMeasurer.h"
#include "MemoryXFile.h"
#include "Sequence.h"
#include "MemoryDataSet.h"
#include "DiagonalGMM.h"
#include "mfcckeeper.h"
......
......@@ -21,6 +21,8 @@ AC_INIT([imms-analyzer],[svnversion],[mag@luminal.org])
AM_INIT_AUTOMAKE([foreign])
LT_INIT([disable-shared])
AC_CONFIG_SRCDIR([immscore/immsutil.h])
AC_PREFIX_DEFAULT("/usr")
......@@ -221,7 +223,6 @@ AC_SUBST(OPTIONAL)
AC_CONFIG_HEADERS(immsconf.h)
AC_OUTPUT(
vars.mk
Makefile
ext/Makefile
ext/torch3/Makefile
......
include $(top_srcdir)/vars.mk
AM_CXXFLAGS += -ffast-math -malign-double
AM_CXXFLAGS += -ffast-math
PACKAGES = core distributions gradients matrix kernels
nobase_noinst_LIBRARIES = libtorch.a
nobase_noinst_LTLIBRARIES = libtorch.la
libtorch_a_SOURCES = \
libtorch_la_SOURCES = \
core/Allocator.cc \
core/Bagging.cc \
core/Boosting.cc \
......
include $(top_srcdir)/vars.mk
noinst_LIBRARIES = libimmscore.a
noinst_LTLIBRARIES = libimmscore.la
libimmscore_a_SOURCES = \
libimmscore_la_SOURCES = \
appname.h \
base64.cc \
base64.h \
......
include $(top_srcdir)/vars.mk
lib_LIBRARIES = libimmsmodel.a
AM_CPPFLAGS += -DWITH_TORCH
libimmsmodel_a_SOURCES = \
lib_LTLIBRARIES = libimmsmodel.la
libimmsmodel_la_SOURCES = \
cint.cc \
cint.h \
distance.cc \
......@@ -12,5 +14,5 @@ libimmsmodel_a_SOURCES = \
model.cc \
model.h
libimmsmodel_a_LIBADD = $(ANALYZER_LIB) $(IMMSCORE_LIB) $(TORCH_LIB)
libimmsmodel_la_LIBADD = $(ANALYZER_LIB) $(IMMSCORE_LIB) $(TORCH_LIB)
......@@ -19,17 +19,17 @@
#include "immsconf.h"
#ifdef WITH_TORCH
#include "torch/ConnectedMachine.h"
#include "torch/XFile.h"
#include "torch/DiskXFile.h"
#include "torch/MemoryXFile.h"
#include "torch/Linear.h"
#include "torch/LogSoftMax.h"
#include "torch/MeanVarNorm.h"
#include "torch/MemoryDataSet.h"
#include "torch/OneHotClassFormat.h"
#include "torch/SVMClassification.h"
#include "torch/Tanh.h"
#include "ConnectedMachine.h"
#include "XFile.h"
#include "DiskXFile.h"
#include "MemoryXFile.h"
#include "Linear.h"
#include "LogSoftMax.h"
#include "MeanVarNorm.h"
#include "MemoryDataSet.h"
#include "OneHotClassFormat.h"
#include "SVMClassification.h"
#include "Tanh.h"
#endif // WITH_TORCH
#include <iostream>
......
TORCH_LIB = $(top_builddir)/ext/torch3/libtorch.a
IMMSCORE_LIB = $(top_builddir)/immscore/libimmscore.a
ANALYZER_LIB = $(top_builddir)/analyzer/libimmsanalyzer.a
TORCH_LIB = $(top_builddir)/ext/torch3/libtorch.la
IMMSCORE_LIB = $(top_builddir)/immscore/libimmscore.la
ANALYZER_LIB = $(top_builddir)/analyzer/libimmsanalyzer.la
INCLUDES = \
-I$(top_srcdir)/ext/torch3/core \
-I$(top_srcdir)/ext/torch3/distributions \
-I$(top_srcdir)/ext/torch3/gradients \
-I$(top_srcdir)/ext/torch3/kernel \
-I$(top_srcdir)/ext/torch3/kernels \
-I$(top_srcdir)/immscore \
-I$(top_srcdir)/analyzer
......
Markdown is supported
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