File: debian_build_cfg

package info (click to toggle)
fsl 5.0.8-6
  • links: PTS, VCS
  • area: non-free
  • in suites: buster
  • size: 23,660 kB
  • sloc: cpp: 166,922; tcl: 25,439; sh: 14,612; ansic: 9,707; makefile: 1,336; python: 151; xml: 106; csh: 17
file content (352 lines) | stat: -rw-r--r-- 11,241 bytes parent folder | download | duplicates (2)
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
Description: Debian build setup and shared libraries
 This patch turns all private FSL libraries into shared libs.
--- a/config/common/rules.mk
+++ b/config/common/rules.mk
@@ -32,7 +32,7 @@
 	${RM} -f /tmp/fslgrot *.o *.a *.exe core depend.mk
 
 install:
-	@${MAKE} "DESTDIR=${FSLDEVDIR}" master-install-script
+	@${MAKE} "DESTDIR=${DEB_DESTDIR}" master-install-script
 
 install-fmrib: 
 	@numunst=`cvs status | grep "Sticky Tag" | grep -v -i stable | wc -l` ; export numunst ; \
@@ -317,4 +317,4 @@
 		fi \
 	done
 
-include depend.mk
+#include depend.mk
--- a/config/common/vars.mk
+++ b/config/common/vars.mk
@@ -3,13 +3,15 @@
 INCDIR = ${FSLDIR}/include
 LIBDIR = ${FSLDIR}/lib
 
-DEVINCDIR = ${FSLDEVDIR}/include
-DEVLIBDIR = ${FSLDEVDIR}/lib
-
-DESTDIR = ${FSLDEVDIR}
-
-dest_INCDIR = ${DESTDIR}/include
-dest_LIBDIR = ${DESTDIR}/lib
+# for the Debian build FSLDIR and FSLDEVDIR is the same
+DEVINCDIR = ${FSLDIR}/include
+DEVLIBDIR = ${FSLDIR}/lib
+
+DESTDIR = ${DEB_DESTDIR}
+
+# do not install the libs and headers with the binaries
+dest_INCDIR = ${FSLDIR}/include
+dest_LIBDIR = ${FSLDIR}/lib
 dest_BINDIR = ${DESTDIR}/bin
 dest_MANDIR = ${DESTDIR}/man
 dest_TCLDIR = ${DESTDIR}/tcl
@@ -35,7 +37,8 @@
 	${AccumulatedIncFlags}
 
 HFILES = *.h
-AFILES = *.a
+# install the shared libs as well
+AFILES = *.a *.so
 XFILES = 
 SCRIPTS =
 TCLFILES = *.tcl
--- a/config/default.mk
+++ b/config/default.mk
@@ -1,6 +1,7 @@
 # Assumes that ${FSLDIR} is set as an environment variable
 
-include ${FSLCONFDIR}/${FSLMACHTYPE}/systemvars.mk
-include ${FSLCONFDIR}/${FSLMACHTYPE}/externallibs.mk
+# use Debian specific build configuration
+include ${FSLDIR}/debian/systemvars.mk
+include ${FSLDIR}/debian/externallibs.mk
 include ${FSLCONFDIR}/common/vars.mk
 include ${FSLCONFDIR}/common/rules.mk
--- a/extras/src/cprob/Makefile
+++ b/extras/src/cprob/Makefile
@@ -8,13 +8,12 @@
 
 USRCFLAGS = -std=gnu99
 
-all: libprob.a
+all: libprob
 
 dftest: all dftest.o
 	$(CC) $(CFLAGS) -L. -o dftest dftest.o -lprob
 
-libprob.a: $(OBJS) $(INCS)
-	ar rv libprob.a $(OBJS)
-	ranlib libprob.a
-	rm -f libcprob.a
-	ln -s libprob.a libcprob.a
+libprob: $(OBJS) $(INCS)
+	${CXX} -shared -o libprob.so $(OBJS) -fPIC ${LDFLAGS}
+	rm -f libcprob.so
+	ln -s libprob.so libcprob.so
--- a/src/fdt/Makefile
+++ b/src/fdt/Makefile
@@ -10,7 +10,7 @@
 USRINCFLAGS = -I${INC_NEWMAT} -I${INC_NEWRAN} -I${INC_CPROB} -I${INC_PROB} -I${INC_BOOST} -I${INC_ZLIB}
 USRLDFLAGS = -L${LIB_NEWMAT} -L${LIB_NEWRAN} -L${LIB_CPROB} -L${LIB_PROB} -L${LIB_ZLIB}
 
-DLIBS = -lwarpfns -lbasisfield -lmeshclass -lnewimage -lutils -lmiscmaths -lnewmat -lnewran -lfslio -lniftiio -lznz -lcprob -lprob -lm -lz
+DLIBS = -lwarpfns -lbasisfield -lmeshclass -lbint -lnewimage -lutils -lmiscmaths -lnewmat -lfslio -lniftiio -lznz -lprob -lm -lz
 
 DTIFIT=dtifit
 CCOPS=ccops
@@ -155,7 +155,7 @@ ${EDDYCOMBINE}: ${EDDYCOMBINEOBJS}
 		   ${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ ${EDDYCOMBINEOBJS} ${DLIBS}
 
 ${LIBBEDPOSTX_CUDA}: 
-		${CUDA}/bin/nvcc --shared --compiler-options '-fPIC' -o CUDA/libbedpostx_cuda.so CUDA/init_gpu.cu CUDA/samples.cu CUDA/diffmodels.cu CUDA/runmcmc.cu  CUDA/xfibres_gpu.cu -O3  -gencode=arch=compute_20,code=\"sm_20,compute_20\" -gencode=arch=compute_35,code=\"sm_35,compute_35\"  -lcudart -lcuda -lcurand -I. -L${CUDA}/lib64 -L${CUDA}/lib -ICUDA/options -I${CUDA}/include/thrust -I${FSLDIR}/extras/include/newmat -I${FSLDIR}/include -I${FSLDIR}/extras/include/boost -maxrregcount=64
+		${CUDA}/bin/nvcc --shared --compiler-options '-fPIC' -o CUDA/libbedpostx_cuda.so CUDA/init_gpu.cu CUDA/samples.cu CUDA/diffmodels.cu CUDA/runmcmc.cu  CUDA/xfibres_gpu.cu -O3  -gencode=arch=compute_20,code=\"sm_20,compute_20\" -gencode=arch=compute_35,code=\"sm_35,compute_35\"  -lcudart -lcuda -lcurand -I. -L${CUDA}/lib64 -L${CUDA}/lib -ICUDA/options -I${CUDA}/include/thrust -I${FSLDIR}/extras/include/newmat -I${FSLDIR}/include -I${FSLDIR}/extras/include/boost -maxrregcount=64 -DBOOST_NOINLINE='__attribute__ ((noinline))'
 		@if [ ! -d ${FSLDEVDIR}/lib/ ] ; then ${MKDIR} ${FSLDEVDIR}/lib ; fi
 		${CP} -rf CUDA/libbedpostx_cuda.so ${FSLDEVDIR}/lib
 
--- a/src/fslio/Makefile
+++ b/src/fslio/Makefile
@@ -8,10 +8,10 @@
 
 SCRIPTS = remove_ext fsloutputtype imtest imglob imcp imln imrm immv
 
-all: libfslio.a
+all: libfslio
 
-libfslio.a: ${OBJS}
-	${AR} -r libfslio.a ${OBJS}
+libfslio: ${OBJS}
+	${CXX} -shared -o libfslio.so $(OBJS) -fPIC ${LDFLAGS} -lniftiio -lznz -lz
 
 TESTOBJS = exttest.o
 TESTLIBS = -lfslio -lniftiio -lznz -lz
--- a/src/fslio/fslio.h
+++ b/src/fslio/fslio.h
@@ -25,8 +25,8 @@
 #define __FSLIO_H
 
 #include <stdio.h>
-#include "niftiio/nifti1_io.h"
-#include "znzlib/znzlib.h"
+#include <nifti1_io.h>
+#include <znzlib.h>
 #include "dbh.h"
 
 #ifdef __cplusplus
--- a/src/libvis/Makefile
+++ b/src/libvis/Makefile
@@ -4,7 +4,7 @@
 
 PROJNAME = libvis
 
-USRINCFLAGS = -I${INC_NEWMAT} -I${INC_PROB} -I${INC_GD} -I${INC_GDC} -I${INC_PNG} -I${INC_ZLIB} -I${INC_BOOST}
+USRINCFLAGS = -I${INC_NEWMAT} -I${INC_PROB} -I${INC_GD} -I${INC_GDC} -I${INC_PNG} -I${INC_ZLIB} -I${INC_BOOST} -fPIC
 USRLDFLAGS = -L${LIB_NEWMAT} -L${LIB_PROB} -L${LIB_GD} -L${LIB_GDC} -L${LIB_PNG} -L${LIB_ZLIB}
 
 LIBS = -lnewimage -lmiscplot -lmiscpic -lmiscmaths -lfslio -lniftiio -lznz -lnewmat -lprob -lm  -lgdc -lgd -lpng -lz
@@ -21,10 +21,10 @@
 all: miscplot miscpic
 
 miscplot: ${PLOTOBJS}
-	${AR} -r libmiscplot.a ${PLOTOBJS}
+	${CXX} -shared -o libmiscplot.so ${PLOTOBJS} ${LDFLAGS} -lnewmat -lgd -lgdc -lmiscmaths -lfslio -lprob -lniftiio
 
 miscpic: ${PICOBJS}
-	${AR} -r libmiscpic.a ${PICOBJS}
+	${CXX} -shared -o libmiscpic.so ${PICOBJS} ${LDFLAGS} -lnewimage -lgd -lfslio -lmiscmaths -lnewmat -lniftiio
 
 test: ${TOBJS}
-	$(CXX) ${CXXFLAGS} ${LDFLAGS} -o $@ ${TOBJS} ${LIBS}
+	$(CXX) ${CXXFLAGS} ${LDFLAGS} -o $@ ${TOBJS}
--- a/src/melodic/Makefile
+++ b/src/melodic/Makefile
@@ -66,7 +66,7 @@
 all: ggmix fsl_regfilt fsl_glm melodic ${OTHERFILES}
 
 ggmix: ${GGMIX_OBJS}
-	${AR} -r libggmix.a ${GGMIX_OBJS} 
+	${CXX} -shared -o libggmix.so ${GGMIX_OBJS} ${LDFLAGS} -fPIC -lnewmat -lmiscmaths -lnewimage
 
 melodic: ${MELODIC_OBJS}
 	$(CXX) ${CXXFLAGS} ${LDFLAGS} -o $@ ${MELODIC_OBJS} ${LIBS}
--- a/src/meshclass/Makefile
+++ b/src/meshclass/Makefile
@@ -16,10 +16,10 @@
 
 DBGFLAGS=-g
 
-all: meshclass.a ${XFILES}
+all: meshclass ${XFILES}
 
-meshclass.a: ${MESHOBJS}
-	${AR} -r libmeshclass.a ${MESHOBJS}
+meshclass: ${MESHOBJS}
+	${CXX} -shared -o libmeshclass.so ${MESHOBJS} ${LDFLAGS} -fPIC
 
 drawmesh:${DRAWOBJS} 
 	${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ ${DRAWOBJS} ${LIBS} 
--- a/src/miscmaths/Makefile
+++ b/src/miscmaths/Makefile
@@ -14,10 +14,10 @@
 # The target "all" should ALWAYS be provided
 #   typically it will just be another target name
 
-all: libmiscmaths.a
+all: libmiscmaths
 
 quick:${OBJS} quick.o
 	${CXX}  ${CXXFLAGS} ${LDFLAGS} -o $@ ${OBJS} quick.o ${LIBS}
 
-libmiscmaths.a: ${OBJS}
-	${AR} -r libmiscmaths.a ${OBJS}
+libmiscmaths: ${OBJS}
+	${CXX} -shared -o libmiscmaths.so ${OBJS} -fPIC ${LDFLAGS} -lnewmat -lutils -lfslio -lniftiio -lprob
--- a/src/mm/Makefile
+++ b/src/mm/Makefile
@@ -13,10 +13,10 @@
 
 #OPTFLAGS =
 
-all:	${XFILES} libmm.a
+all:	${XFILES} libmm
 
-libmm.a: ${OBJS}
-	${AR} -r libmm.a ${OBJS}
+libmm: ${OBJS}
+	${CXX} -shared -o libmm.so ${OBJS} ${LDFLAGS} -fPIC -lmiscpic -lnewmat -lnewimage -lmiscmaths -lfslio -lutils -lprob -lmiscplot -lgd
 
 mm:${OBJS} mm.o
 	${CXX}  ${CXXFLAGS} ${LDFLAGS} -o $@ ${OBJS} mm.o ${LIBS}
--- a/src/newimage/Makefile
+++ b/src/newimage/Makefile
@@ -18,10 +18,10 @@
 TESTXFILES = testprog skeletonapp
 XFILES = 
 
-all: libnewimage.a
+all: libnewimage
 
-libnewimage.a: ${NOBJS}
-	${AR} -r libnewimage.a ${NOBJS}
+libnewimage: ${NOBJS}
+	${CXX} -shared -o libnewimage.so ${NOBJS} ${LDFLAGS} -fPIC -lnewmat -lfslio -lmiscmaths -lniftiio
 
 skeletonapp: ${SOBJS}
 	$(CXX)  ${CXXFLAGS} ${LDFLAGS} -o $@ ${SOBJS} ${LIBS}
--- a/src/newimage/newimage.h
+++ b/src/newimage/newimage.h
@@ -80,7 +80,7 @@
 #include "positerators.h"
 #include "miscmaths/miscmaths.h"
 #include "miscmaths/kernel.h"
-#include "niftiio/nifti1.h"
+#include <nifti1.h>
 #include "miscmaths/splinterpolator.h"
  
 using namespace NEWMAT;
--- a/src/shapeModel/Makefile
+++ b/src/shapeModel/Makefile
@@ -8,10 +8,10 @@
 USRLDFLAGS = -L${LIB_NEWMAT}  -L${LIB_ZLIB}
  
 
-all: shapeModel.a 
+all: shapeModel
 
-shapeModel.a: ${SHAPEOBJS}
-	${AR} -r libshapeModel.a ${SHAPEOBJS}
+shapeModel: ${SHAPEOBJS}
+	${CXX} -shared -o libshapeModel.so ${SHAPEOBJS} ${LDFLAGS} -fPIC -lmeshclass -lnewimage -lnewmat -lfirst_lib -lfslvtkio -lmiscmaths
 
 
 
--- a/src/utils/Makefile
+++ b/src/utils/Makefile
@@ -11,7 +11,7 @@
 OptionsTestObjects = opttst.o
 OptionsTestLibrarys = -lutils
 
-LibraryTarget = libutils.a
+LibraryTarget = libutils.so
 LibraryObjects = matches.o functions.o usage.o check.o parse.o log.o time_tracer.o
 
 all: ${LibraryTarget}
@@ -21,9 +21,7 @@
 		${OptionsTestLibrarys}
 
 ${LibraryTarget}: ${LibraryObjects}
-	${RM} -f ${LibraryTarget}
-	${AR} -r $@ ${LibraryObjects}
-	${RANLIB} ${LibraryTarget}
+	${CXX} -shared -o $@ ${LibraryObjects} ${LDFLAGS} -fPIC -lnewmat
 
 XFILES = 
 AFILES = ${LibraryTarget}
--- a/src/ptx2/Makefile
+++ b/src/ptx2/Makefile
@@ -16,7 +16,7 @@
 USRINCFLAGS = -I${INC_NEWMAT} -I${INC_NEWRAN} -I${INC_CPROB} -I${INC_PROB} -I${INC_BOOST} -I${INC_ZLIB}
 USRLDFLAGS = -L${LIB_NEWMAT} -L${LIB_NEWRAN} -L${LIB_CPROB} -L${LIB_PROB} -L${LIB_ZLIB}
 
-DLIBS =  -lwarpfns -lbasisfield -lfslsurface  -lfslvtkio -lmeshclass -lnewimage -lutils -lmiscmaths -lnewmat -lnewran -lfslio -lgiftiio -lexpat -lfirst_lib -lniftiio -lznz -lcprob -lutils -lprob -lm -lz
+DLIBS = -lwarpfns -lbasisfield -lfslsurface  -lfslvtkio -lmeshclass -lnewimage -lutils -lmiscmaths -lnewmat -lfslio -lgiftiio -lexpat -lfirst_lib -lniftiio -lznz -lcprob -lutils -lprob -lm -lz
 
 
 CCOPS=ccops
--- a/src/qboot/Makefile
+++ b/src/qboot/Makefile
@@ -5,7 +5,7 @@
 USRINCFLAGS = -I${INC_NEWMAT} -I${INC_NEWRAN} -I${INC_CPROB} -I${INC_PROB} -I${INC_BOOST} -I${INC_ZLIB}
 USRLDFLAGS = -L${LIB_NEWMAT} -L${LIB_NEWRAN} -L${LIB_CPROB} -L${LIB_PROB} -L${LIB_ZLIB}
 
-DLIBS = -lnewimage -lutils -lmiscmaths -lnewmat -lnewran -lfslio -lniftiio -lznz -lcprob -lprob -lm -lz
+DLIBS = -lnewimage -lutils -lmiscmaths -lnewmat -lfslio -lniftiio -lznz -lcprob -lprob -lm -lz
 
 QBOOT=qboot
 
@@ -19,4 +19,4 @@
 
 all: qboot
 ${QBOOT}:	   ${QBOOTOBJS}
-		   ${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ ${QBOOTOBJS} ${DLIBS}
\ No newline at end of file
+		   ${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ ${QBOOTOBJS} ${DLIBS}
--- a/src/fslsurface/fslsurfaceio.cc
+++ b/src/fslsurface/fslsurfaceio.cc
@@ -68,7 +68,7 @@
 #include <fslvtkio/fslvtkio.h>
 
 extern "C" {
-#include <giftiio/gifti_io.h>
+#include <gifti_io.h>
 }
 
 using namespace fslvtkio;
--- a/src/fslsurface/fslsurfaceio.h
+++ b/src/fslsurface/fslsurfaceio.h
@@ -71,7 +71,7 @@
 #include <vector>
 
 extern "C" {
-#include <giftiio/gifti_io.h>
+#include <gifti_io.h>
 }
 
 
--- a/src/fslvtkio/Makefile
+++ b/src/fslvtkio/Makefile
@@ -12,10 +12,10 @@
  
 MODELOBJS=fslvtkio.o
 
-all: fslvtkio.a 
+all: fslvtkio
 
-fslvtkio.a: ${SHAPEOBJS}
-	${AR} -r libfslvtkio.a ${SHAPEOBJS}
+fslvtkio: ${SHAPEOBJS}
+	${CXX} -shared -o libfslvtkio.so $(SHAPEOBJS) -fPIC ${LDFLAGS} ${LIBS}