Skip to content
Snippets Groups Projects
Commit 7a8bd080 authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

MNT: Clean up, and compile shared not static

parent 12c60252
No related branches found
No related tags found
1 merge request!8Mnt/conda
......@@ -3,29 +3,14 @@
include ${FSLCONFDIR}/default.mk
PROJNAME = miscmaths
USRINCFLAGS = -I${INC_NEWMAT} -I${INC_BOOST} -I${INC_CPROB}
USRLDFLAGS = -L${LIB_NEWMAT} -L${LIB_CPROB}
LIBS = -lfsl-utils -lfsl-cprob
SOFILES = libfsl-miscmaths.so
USRCXXFLAGS = -std=c++11
OBJS = miscmaths.o optimise.o miscprob.o kernel.o histogram.o base2z.o t2z.o f2z.o minimize.o cspline.o sparse_matrix.o sparsefn.o rungekutta.o nonlin.o bfmatrix.o Simplex.o SpMatMatrices.o
LIBS = -lutils -lcprob -lm
# The target "all" should ALWAYS be provided
# typically it will just be another target name
all: libmiscmaths.a
quick:${OBJS} quick.o
${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ ${OBJS} quick.o ${LIBS}
libmiscmaths.a: ${OBJS}
${AR} -r libmiscmaths.a ${OBJS}
%.o:%.cpp
$(CXX11) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@
all: libfsl-miscmaths.so
%.o:%.cc
$(CXX11) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@
libfsl-miscmaths.so: ${OBJS}
$(CXX) $(CXXFLAGS) -shared -o $@ $^
Initial creation of branchname log file
/* quick.cc
Mark Woolrich, FMRIB Image Analysis Group
Copyright (C) 1999-2000 University of Oxford */
/* CCOPYRIGHT */
#include <iostream>
#include <fstream>
#include <iomanip>
#include <sstream>
#define WANT_STREAM
#define WANT_MATH
#include "miscmaths.h"
#include "t2z.h"
using namespace MISCMATHS;
int main(int argc, char *argv[])
{
try{
Matrix X = read_vest("/usr/people/woolrich/matlab/vbbabe/data/design2.mat").t();
ColumnVector Y = read_vest("/usr/people/woolrich/matlab/vbbabe/data/sdf2.mat").t();
ColumnVector m_B;
SymmetricMatrix ilambda_B;
glm_vb(X, Y, m_B, ilambda_B, 30);
write_ascii_matrix(m_B,"/usr/people/woolrich/matlab/vbbabe/data/m_B");
}
catch(Exception p_excp)
{
cerr << p_excp.what() << endl;
}
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment