-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (53 loc) · 1.96 KB
/
Makefile
File metadata and controls
67 lines (53 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
include ${FSLCONFDIR}/default.mk
PROJNAME = fabber_asl
XFILES = fabber_asl
SOFILES = libfsl-fabber_models_asl.so
AFILES = libfabber_models_asl.a
# The FSL build system changed
# substantially in FSL 6.0.6
# FSL >= 6.0.6
ifeq (${FSL_GE_606}, true)
LIBS = -lfsl-fabberexec -lfsl-fabbercore -lfsl-newimage \
-lfsl-miscmaths -lfsl-NewNifti -lfsl-utils \
-lfsl-cprob -lfsl-znz -ldl
# FSL <= 6.0.5
else
ifeq ($(shell uname -s), Linux)
MATLIB := -lopenblas
endif
USRINCFLAGS = -I${INC_NEWMAT} -I${INC_PROB} -I${INC_CPROB} \
-I${INC_BOOST} -I.. -I${FSLDIR}/extras/include/armawrap
USRLDFLAGS = -L${LIB_NEWMAT} -L${LIB_PROB} -L../fabber_core \
-lnewimage -lmiscmaths -lutils -lprob ${MATLIB} \
-lNewNifti -lznz -lz -ldl
endif
# Forward models
OBJS = fwdmodel_asl_multiphase.o fwdmodel_asl_grase.o asl_models.o fwdmodel_asl_rest.o \
fwdmodel_asl_quasar.o fwdmodel_asl_satrecov.o fwdmodel_asl_satrecovdualfa.o fwdmodel_asl_turboquasar.o \
fwdmodel_asl_2compartment.o fwdmodel_asl_multite.o fwdmodel_asl_velocityselective.o
# For debugging:
#OPTFLAGS = -ggdb
# Pass Git revision details
GIT_SHA1 := $(shell git describe --dirty)
GIT_DATE := $(shell git log -1 --format=%ad --date=local)
CXXFLAGS += -DGIT_SHA1=\"${GIT_SHA1}\" -DGIT_DATE="\"${GIT_DATE}\""
#
# Build
#
# FSL >=606 uses dynamic linking
ifeq (${FSL_GE_606}, true)
all: ${XFILES} ${SOFILES}
# models in a library
libfsl-fabber_models_asl.so : ${OBJS}
${CXX} ${CXXFLAGS} -shared -o $@ $^ ${LDFLAGS}
# fabber built from the FSL fabbercore library including the models specifieid in this project
fabber_asl : fabber_client.o | libfsl-fabber_models_asl.so
${CXX} ${CXXFLAGS} -o $@ $< -lfsl-fabber_models_asl ${LDFLAGS}
# FSL <=605 uses static linking
else
all: ${XFILES} ${AFILES}
libfabber_models_asl.a : ${OBJS}
${AR} -r $@ ${OBJS}
fabber_asl : fabber_client.o ${OBJS}
${CXX} ${CXXFLAGS} -o $@ $^ -lfabbercore -lfabberexec ${LDFLAGS}
endif