Skip to content

Commit

Permalink
Merge pull request #7 from mawebster/FSL
Browse files Browse the repository at this point in the history
Fixed build for FSL6.0.x
  • Loading branch information
ecr05 authored Apr 24, 2019
2 parents 44a2f8f + c5805f4 commit 7f7410e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 52 deletions.
21 changes: 3 additions & 18 deletions src/DiscreteOpt/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@
include ${FSLCONFDIR}/default.mk

PROJNAME=DiscreteOpt
HOCR=True
USRCXXFLAGS=-g -DNDEBUG
USRCXXFLAGS=-g -DNDEBUG
USRINCFLAGS =-I${INC_NEWMAT} -I${INC_NEWRAN} -I${INC_ZLIB} -I${INC_CPROB} -I${INC_PROB} -I${INC_BOOST} -I${FSLDEVDIR}/include -I${FSLDEVDIR}/extras/include
USRLDFLAGS =-L${LIB_NEWMAT} -L${LIB_NEWRAN} -L${LIB_ZLIB} -L${LIB_CPROB} -L${LIB_PROB} -L${FSLDEVDIR}/lib #${TBBLIBPATH}

LIBS=-lnewmeshclass -lfslsurface -lgiftiio -lexpat -lfslvtkio -lnewimage -lmiscmaths -lfslio -lniftiio -lnewmat -lutils -lbint -lnewran -lprob -lznz -lz
MYPROGRAMOBJ=similarities.o DiscreteCostFunction.o DiscreteModel.o
MYPROGRAM=DiscreteOpt
MYPROGRAMOBJ=similarities.o DiscreteCostFunction.o DiscreteModel.o
Mylib=libdiscrete

ifdef HOCR
Expand All @@ -18,26 +15,14 @@ ifdef HOCR
endif

ifdef GROUP
MYPROGRAMOBJ+= DiscreteGroupCostFunction.o DiscreteGroupModel.o
MYPROGRAMOBJ+= DiscreteGroupCostFunction.o DiscreteGroupModel.o
endif

ifdef TBB
USRCXXFLAGS+= -DHAS_TBB
LIBS=-ltbb -lnewmeshclass -lfslsurface -lgiftiio -lexpat -lfslvtkio -lnewimage -lmiscmaths -lfslio -lniftiio -lnewmat -lutils -lbint -lnewran -lprob -lznz -lz
endif



#-----------------------------------------------------------------

MYINCLUDES=

MYLIBRARIES=

#------------------------------------------------------------------------------

all: ${MYlib}.a

${MYlib}.a: ${MYPROGRAMOBJ}
${AR} -r libdiscrete.a ${MYPROGRAMOBJ}

44 changes: 20 additions & 24 deletions src/MSM/Makefile
Original file line number Diff line number Diff line change
@@ -1,77 +1,73 @@
# $id: Makefile,v 1.1.1.1 2013/10/08 14:06:18 emmar Exp $
include ${FSLCONFDIR}/default.mk

PROJNAME= MSM
USRCXXFLAGS=-g
HOCR=True

USRINCFLAGS=-I${INC_NEWMAT} -I${INC_NEWRAN} -I${INC_ZLIB} -I${INC_CPROB} -I${INC_PROB} -I${INC_GD} -I${INC_GDC} -I${INC_PNG} -I${INC_BOOST} -I./include -I${FSLDEVDIR}/include -I${FSLDEVDIR}/extras/include
USRLDFLAGS=-L${LIB_NEWMAT} -L${LIB_NEWRAN} -L${LIB_ZLIB} -L${LIB_CPROB} -L${LIB_PROB} -L${LIB_GDC} -L${LIB_PNG} -L${LIB_GD} -L. -L${FSLDEVDIR}/lib -L${FSLDEVDIR}/extras/lib
LIBS= -lmeshreg -lfastpd -ldiscrete -lnewmeshclass -lfslsurface -lgiftiio -lmm -lexpat -lfslvtkio -lnewimage -lmiscmaths -lmiscplot -lmiscpic -lfslio -lniftiio -lnewmat -lutils -lbint -lnewran -lprob -lznz -lgdc -lgd -lpng -lz
LIBS= -lmeshreg -lfastpd -ldiscrete -lnewmeshclass -lfslsurface -lgiftiio -lmm -lexpat -lfslvtkio -lnewimage -lmiscmaths -lmiscplot -lmiscpic -lNewNifti -lutils -lbint -lnewran -lprob -lznz -lgdc -lgd -lpng -lz

ifdef HOCR
USRCXXFLAGS+= -std=c++11 -DHAS_HOCR
endif

ifdef TBB
USRCXXFLAGS+= -DHAS_TBB
LIBS= -lmeshreg -lfastpd -ldiscrete -ltbb -lnewmeshclass -lfslsurface -lgiftiio -lmm -lexpat -lfslvtkio -lnewimage -lmiscmaths -lmiscplot -lmiscpic -lfslio -lniftiio -lnewmat -lutils -lbint -lnewran -lprob -lznz -lgdc -lgd -lpng -lz
LIBS= -lmeshreg -lfastpd -ldiscrete -ltbb -lnewmeshclass -lfslsurface -lgiftiio -lmm -lexpat -lfslvtkio -lnewimage -lmiscmaths -lmiscplot -lmiscpic -lNewNifti -lutils -lbint -lnewran -lprob -lznz -lgdc -lgd -lpng -lz

endif

ifdef GROUP
all:= msm_group msm_metricmath msmresamplemesh estimate_strains estimate_curvature msm_metric_average msm_makeicos intensity_normalise minimise_anat-to-sphere_distortions:
endif

all:msm msmapplywarp estimate_metric_distortion surfconvert msmresample msm_metric_sim
all:msm msmapplywarp estimate_metric_distortion surfconvert msmresample msm_metric_sim

libmsm.a: ${MSMLIBOBJS}
${AR} -r libmsm.a ${MSMLIBOBJS}


msm: msm.o
${CXX} ${LDFLAGS} -o $@ msm.o ${LIBS}
${CXX} ${LDFLAGS} -o $@ msm.o ${LIBS}
msm_group: msm_group.o
${CXX} ${LDFLAGS} -o $@ msm_group.o ${LIBS}
${CXX} ${LDFLAGS} -o $@ msm_group.o ${LIBS}

msm_makeicos: msm_makeicos.o
${CXX} ${LDFLAGS} -o $@ msm_makeicos.o ${LIBS}
${CXX} ${LDFLAGS} -o $@ msm_makeicos.o ${LIBS}
intensity_normalise: intensity_normalise.o
${CXX} ${LDFLAGS} -o $@ intensity_normalise.o ${LIBS}
${CXX} ${LDFLAGS} -o $@ intensity_normalise.o ${LIBS}
msm_metricmath: msm_metricmath.o
${CXX} ${LDFLAGS} -o $@ msm_metricmath.o ${LIBS}
${CXX} ${LDFLAGS} -o $@ msm_metricmath.o ${LIBS}
msm_surface_average: msm_surface_average.o
${CXX} ${LDFLAGS} -o $@ msm_surface_average.o ${LIBS}
${CXX} ${LDFLAGS} -o $@ msm_surface_average.o ${LIBS}
msm_metric_sim: msm_metric_sim.o
${CXX} ${LDFLAGS} -o $@ msm_metric_sim.o ${LIBS}
${CXX} ${LDFLAGS} -o $@ msm_metric_sim.o ${LIBS}

estimate_strains: estimate_strains.o
${CXX} ${LDFLAGS} -o $@ estimate_strains.o ${LIBS}
${CXX} ${LDFLAGS} -o $@ estimate_strains.o ${LIBS}
estimate_curvature: estimate_curvature.o
${CXX} ${LDFLAGS} -o $@ estimate_curvature.o ${LIBS}
${CXX} ${LDFLAGS} -o $@ estimate_curvature.o ${LIBS}

groupsegmentation: groupsegmentation.o
${CXX} ${LDFLAGS} -o $@ groupsegmentation.o ${LIBS}
${CXX} ${LDFLAGS} -o $@ groupsegmentation.o ${LIBS}

msmapplywarp: msmapplywarp.o
${CXX} ${LDFLAGS} -o $@ msmapplywarp.o ${LIBS}
${CXX} ${LDFLAGS} -o $@ msmapplywarp.o ${LIBS}

msmresample: msmresample.o
${CXX} ${LDFLAGS} -o $@ msmresample.o ${LIBS}
${CXX} ${LDFLAGS} -o $@ msmresample.o ${LIBS}

msmresamplemesh: msmresamplemesh.o
${CXX} ${LDFLAGS} -o $@ msmresamplemesh.o ${LIBS}
${CXX} ${LDFLAGS} -o $@ msmresamplemesh.o ${LIBS}

estimate_metric_distortion: estimate_metric_distortion.o
${CXX} ${LDFLAGS} -o $@ estimate_metric_distortion.o ${LIBS}
${CXX} ${LDFLAGS} -o $@ estimate_metric_distortion.o ${LIBS}

minimise_anat-to-sphere_distortions: minimise_anat-to-sphere_distortions.o
${CXX} ${LDFLAGS} -o $@ minimise_anat-to-sphere_distortions.o ${LIBS}
${CXX} ${LDFLAGS} -o $@ minimise_anat-to-sphere_distortions.o ${LIBS}

msm_metric_average: msm_metric_average.o
${CXX} ${LDFLAGS} -o $@ msm_metric_average.o ${LIBS}
${CXX} ${LDFLAGS} -o $@ msm_metric_average.o ${LIBS}

surfconvert: surfconvert.o
${CXX} ${LDFLAGS} -o $@ surfconvert.o ${LIBS}


${CXX} ${LDFLAGS} -o $@ surfconvert.o ${LIBS}
14 changes: 4 additions & 10 deletions src/MSMRegLib/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
# $id: Makefile,v 1.1.1.1 2013/10/08 14:06:18 emmar Exp $
include ${FSLCONFDIR}/default.mk

PROJNAME = MeshReg
USRCXXFLAGS=-g
HOCR=True
USRCXXFLAGS=-g

USRINCFLAGS =-I${INC_NEWMAT} -I${INC_NEWRAN} -I${INC_ZLIB} -I${INC_CPROB} -I${INC_PROB} -I${INC_GD} -I${INC_GDC} -I${INC_PNG} -I${INC_BOOST} -I${FSLDEVDIR}/include -I${FSLDEVDIR}/extras/include
USRLDFLAGS =-L${LIB_NEWMAT} -L${LIB_NEWRAN} -L${LIB_ZLIB} -L${LIB_CPROB} -L${LIB_PROB} -L${LIB_GDC} -L${LIB_PNG} -L${LIB_GD} -L. -L${FSLDEVDIR}/lib -L${FSLDEVDIR}/extras/lib
LIBS= -lmsm -lfastpd -ldiscrete -lnewmeshclass -lfslsurface -lgiftiio -lmm -lexpat -lfslvtkio -lnewimage -lmiscmaths -lmiscplot -lmiscpic -lfslio -lniftiio -lnewmat -lutils -lbint -lnewran -lprob -lznz -lgdc -lgd -lpng -lz
MSMLIBOBJS= ContinuosOpt.o meshmodify.o meshreg.o

ifdef HOCR
Expand All @@ -16,20 +13,17 @@ ifdef HOCR
endif

ifdef GROUP
MSMLIBOBJS+= groupmeshreg.o
MSMLIBOBJS+= groupmeshreg.o
endif

ifdef TBB
USRCXXFLAGS+= -DHAS_TBB
LIBS= -lmsm -lfastpd -ldiscrete -ltbb -lANN -lnewmeshclass -lfslsurface -lgiftiio -lmm -lexpat -lfirst_lib -lshapeModel -lfslvtkio -lmeshclass -lnewimage -lmiscmaths -lmiscplot -lmiscpic -lfslio -lniftiio -lnewmat -lutils -lbint -lnewran -lprob -lznz -lgdc -lgd -lpng -lz
endif
endif




all: libmeshreg.a
all: libmeshreg.a

libmeshreg.a: ${MSMLIBOBJS}
${AR} -r libmeshreg.a ${MSMLIBOBJS}


0 comments on commit 7f7410e

Please sign in to comment.