-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
1878 lines (1689 loc) · 64.8 KB
/
Makefile
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
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
SHELL=/bin/sh
BUILDER_VERSION= $(shell sed -e '/Id/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q Makefile )
version:
# +-------------------------------------+
# | QUARANTINE BUILDER VERSION: ${BUILDER_VERSION} |
# +-------------------------------------+
@echo
@echo "Syntax: make [option]"
@echo "Useful options are:"
@echo " untar - get packages from web and untar"
@echo " utils - util libs (perl, PMP, etc)"
@echo " mnilibs - internal BIC libs (bicpl, EBTKS, etc)"
@echo " main - core codes (pve, clasp, surfreg, etc)"
@echo " civet - CIVET pipeline (internal, development)"
@echo " visual - BIC viewers (Display, register, brainview)"
@echo " clean - clean-up (incomplete)"
@echo " imagemagick - from ftp://ftp.imagemagick.org/pub/"
@echo
@echo "If some modules fail to compile, you may have to install"
@echo "the following packages on your Linux Debian/Ubuntu system:"
@echo " sudo apt-get install build-essential "
@echo " libx11-dev freeglut3-dev libgmp3-dev libgnome-perl"
@echo " gawk zlib1g-dev m4 libgnome2-dev libgnome-dev xlibs-dev"
@echo " r-base r-base-core r-base-dev"
@echo "For verify images, adding the following:"
@echo " imagemagick"
@echo "or install it from sources at ftp://ftp.imagemagick.org/pub/"
@echo
@echo "On CentOS, modules to install are:"
@echo " sudo yum groupinstall 'Development Tools'"
@echo " sudo yum install zlib-devel"
@echo " sudo yum install libjpeg-devel"
@echo " sudo yum install libpng-devel"
@echo " sudo yum install libtiff-devel"
@echo " sudo yum install lcms2-devel"
@echo " sudo yum install which"
@echo " sudo yum install cpan"
@echo " cpan install ExtUtils::MakeMaker"
@echo " sudo yum install libX11-devel"
@echo " sudo yum install freeglut-devel"
@echo " sudo yum install perl-Env"
@echo " sudo yum install perl-Perl4-CoreLibs"
@echo " sudo yum install gnuplot"
@echo
@echo "For Ubuntu 16.0/18.0:"
@echo " sudo apt-get install libz-dev libjpeg-dev libpng-dev "
@echo " libtiff-dev liblcms2-dev flex libx11-dev freeglut3-dev "
@echo " libxmu-dev libxi-dev libqt4-dev "
@echo " sudo apt-get install libfreetype6-dev "
@echo " for fonts on png before compiling ImageMagick"
@echo
@echo "Copyright Alan C. Evans"
@echo "Professor of Neurology"
@echo "McGill University"
@echo
packages:
@echo
@echo "Creating civet$(CIVET_VERS)-cdrom.tar.gz from TGZ..."
@echo
mkdir -p dist
mkdir -p dist/TGZ
@cp -f -p Makefile dist/
@cp -f -p mk_environment.pl dist/
@cp -f -p install.sh dist/
@cp -f -p LICENSE dist/
@cp -f -p $(ADNI_TAR) dist/TGZ/
@cp -f -p $(ARGS_TAR) dist/TGZ/
@cp -f -p $(AUTOREG_TAR) dist/TGZ/
@cp -f -p $(AVG305_TAR) dist/TGZ/
@cp -f -p $(BET_TAR) dist/TGZ/
@cp -f -p $(BICINVENTOR_TAR) dist/TGZ/
@cp -f -p $(BOOST_TAR) dist/TGZ/
@cp -f -p $(BICPL_TAR) dist/TGZ/
@cp -f -p $(BRAINVIEW_TAR) dist/TGZ/
@cp -f -p $(CAREA_TAR) dist/TGZ/
@cp -f -p $(NETCDF_TAR) dist/TGZ/
@cp -f -p $(CGAL_TAR) dist/TGZ/
@cp -f -p $(CIVET_TAR) dist/TGZ/
@cp -f -p $(CLASP_TAR) dist/TGZ/
@cp -f -p $(CLASSIFY_TAR) dist/TGZ/
@cp -f -p $(COIN_TAR) dist/TGZ/
@cp -f -p $(COLIN27_TAR) dist/TGZ/
@cp -f -p $(CONGLOMERATE_TAR) dist/TGZ/
@cp -f -p $(CSURFACE_TAR) dist/TGZ/
@cp -f -p $(DISPLAY_TAR) dist/TGZ/
@cp -f -p $(EBTKS_TAR) dist/TGZ/
@cp -f -p $(GETOPT_TAR) dist/TGZ/
@cp -f -p $(GGS_TAR) dist/TGZ/
@cp -f -p $(GSL_TAR) dist/TGZ/
@cp -f -p $(HDF_TAR) dist/TGZ/
@cp -f -p $(ICBM152_TAR) dist/TGZ/
@cp -f -p $(ICBM152NL_TAR) dist/TGZ/
@cp -f -p $(ICBM152NL09_TAR) dist/TGZ/
@cp -f -p $(ICBMTEMP_TAR) dist/TGZ/
@cp -f -p $(ILT_TAR) dist/TGZ/
@cp -f -p $(IMAGEMAGICK_TAR) dist/TGZ/
@cp -f -p $(INORM_TAR) dist/TGZ/
@cp -f -p $(LOBESEG_TAR) dist/TGZ/
@cp -f -p $(LAPLACE_TAR) dist/TGZ/
@cp -f -p $(M4_TAR) dist/TGZ/
@cp -f -p $(MINC_TAR) dist/TGZ/
@cp -f -p $(MRISIM_TAR) dist/TGZ/
@cp -f -p $(N3_TAR) dist/TGZ/
@cp -f -p $(NETPBM_TAR) dist/TGZ/
@cp -f -p $(OOBICPL_TAR) dist/TGZ/
@cp -f -p $(PCREPP_TAR) dist/TGZ/
@cp -f -p $(PCRE_TAR) dist/TGZ/
@cp -f -p $(PERLLIB_TAR) dist/TGZ/
@cp -f -p $(PMP_TAR) dist/TGZ/
@cp -f -p $(PVE_TAR) dist/TGZ/
@cp -f -p $(RAY_TRACE_TAR) dist/TGZ/
@cp -f -p $(REGISTER_TAR) dist/TGZ/
@cp -f -p $(SIMAGE_TAR) dist/TGZ/
@cp -f -p $(SOQT_TAR) dist/TGZ/
@cp -f -p $(STXSEG_TAR) dist/TGZ/
@cp -f -p $(SURFREG_TAR) dist/TGZ/
@cp -f -p $(TRUEFONT_TAR) dist/TGZ/
mkdir -p dist/Test
@cp -f -p Test/mni_icbm_00100_t1.mnc dist/Test/
cd dist; \
tar cvf civet$(CIVET_VERS)-cdrom.tar * ; \
gzip civet$(CIVET_VERS)-cdrom.tar ; \
mv civet$(CIVET_VERS)-cdrom.tar.gz .. ; \
cd ..; \
rm -rf dist
@echo
@echo "...done"
@echo
source_packages:
@echo
@echo "Creating civet$(CIVET_VERS)-cdrom.tar.gz from sources..."
@echo
mkdir -p dist
mkdir -p dist/TGZ
@cp -f -p Makefile dist/
@cp -f -p mk_environment.pl dist/
@cp -f -p install.sh dist/
@cp -f -p LICENSE dist/
for pkg in ${ADNI_PACKAGE} \
${ARGS_PACKAGE} \
${AUTOREG_PACKAGE} \
${AVG305_PACKAGE} \
${BET_PACKAGE} \
${BICPL_PACKAGE} \
${CAREA_PACKAGE} \
${CIVET_PACKAGE} \
${CLASP_PACKAGE} \
${CLASSIFY_PACKAGE} \
${COLIN27_PACKAGE} \
${CONGLOMERATE_PACKAGE} \
${CSURFACE_PACKAGE} \
${EBTKS_PACKAGE} \
${GETOPT_PACKAGE} \
${ICBM152_PACKAGE} \
${ICBM152NL_PACKAGE} \
${ICBM152NL09_PACKAGE} \
${ICBMTEMP_PACKAGE} \
${ILT_PACKAGE} \
${INORM_PACKAGE} \
${LAPLACE_PACKAGE} \
${MINC_PACKAGE} \
${N3_PACKAGE} \
${OOBICPL_PACKAGE} \
${PERLLIB_PACKAGE} \
${PMP_PACKAGE} \
${SURFREG_PACKAGE} \
${RAY_TRACE_PACKAGE} ; do \
cd ${SOURCE_DIR}/$$pkg/ ; \
make dist ; cd - ; \
mv -f ${SOURCE_DIR}/$$pkg/$$pkg.tar.gz dist/TGZ/ ; \
done
if [ ! -e ${SOURCE_DIR}/${PVE_PACKAGE}/configure ] ; then \
cd ${SOURCE_DIR}/${PVE_PACKAGE}/src ; \
make dist ; cd - ; \
mv -f ${SOURCE_DIR}/${PVE_PACKAGE}/src/${PVE_PACKAGE}.tar.gz dist/TGZ/ ; \
else \
cd ${SOURCE_DIR}/${PVE_PACKAGE}/ ; \
make dist ; cd - ; \
mv -f ${SOURCE_DIR}/${PVE_PACKAGE}/${PVE_PACKAGE}.tar.gz dist/TGZ/ ; \
fi
cd ${SOURCE_DIR}/ ; \
tar --exclude='*/.git' --exclude='*/CVS' -cvf ${M4_PACKAGE}.tar m4 ; \
gzip ${M4_PACKAGE}.tar ; \
cd - ; \
mv -f ${SOURCE_DIR}/${M4_PACKAGE}.tar.gz dist/TGZ/
for pkg in ${BOOST_TAR} \
${NETCDF_TAR} \
${CGAL_TAR} \
${GSL_TAR} \
${HDF_TAR} \
${NETPBM_TAR} \
${PCREPP_TAR} \
${PCRE_TAR} ; do \
cp -f -p $$pkg dist/TGZ/ ; \
done
mkdir -p dist/Test
@cp -f -p Test/mni_icbm_00100_t1.mnc dist/Test/
cd dist; \
tar cvf civet$(CIVET_VERS)-cdrom.tar * ; \
gzip civet$(CIVET_VERS)-cdrom.tar ; \
mv civet$(CIVET_VERS)-cdrom.tar.gz .. ; \
cd ..; \
rm -rf dist
@echo
@echo "...done"
@echo
binaries:
@echo
@echo "Packaging binaries for civet$(CIVET_VERS)-binaries.tar.gz..."
@echo
tar --exclude='$(UNAME)/share/hdf5_examples' \
-cvf civet$(CIVET_VERS)-binaries.tar $(UNAME)/bin \
$(UNAME)/CIVET$(CIVET_VERS) $(UNAME)/doc \
$(UNAME)/etc $(UNAME)/lib $(UNAME)/perl \
$(UNAME)/init.* $(UNAME)/share \
job_test Test/mni_icbm_00100_t1.mnc \
LICENSE
gzip civet$(CIVET_VERS)-binaries.tar
@echo
@echo "...done"
@echo
.PHONY: clean clean_dist
# +-------------------------+
# | SET SOME DEFAULTS |
# +-------------------------+
GTAR=tar
GTAR_FLAGS=-xzf
ABI = 64
DEBUG = 0
STATIC = 0
UNAME = $(shell uname)-$(shell uname -m | sed 's/ /_/g')
SOURCE_DIR = $(PWD)/$(UNAME)/SRC
PREFIX_PATH = $(PWD)/$(UNAME)
BUILD_PATH = $(PREFIX_PATH)
R_LIBS = $(PREFIX_PATH)/R_LIBS
MATLAB_ROOT = /usr/local/matlab
ANIMAL = no
MRI_SIM = no
MAGICK = no
USE_CVS = no
USE_GIT = no
QUARANTINE_FLAG = $(PWD)/$(UNAME)/.quarantine_created
LDFLAGS := -L$(PREFIX_PATH)/lib
PATH := $(PREFIX_PATH)/bin:$(PATH)
LD_LIBRARY_PATH := $(PREFIX_PATH)/lib:$(LD_LIBRARY_PATH)
OPT_OPTIONS :=
# +---------------------------------------------------+
# | STATIC OR DYNAMIC COMPILATION FOR BIC LIBRARIES |
# +---------------------------------------------------+
### fix LIB_EXT for cygwin and os-x (dll, dylib, whatever)
ifeq ($(STATIC),1)
BIC_STATIC = --enable-shared=no --enable-static=yes
LIB_EXT = a
else
BIC_STATIC = --enable-shared=yes --enable-static=no
LIB_EXT = so
ifneq ($(findstring Darwin,$(shell uname)),)
LIB_EXT = dylib
endif
endif
# +-------------------------------------+
# | OPTIMIZATION LEVEL (defaut opt) |
# +-------------------------------------+
ifeq ($(DEBUG),1)
OPT_OPTIONS += -g
else
ifneq ($(findstring IRIX,$(shell uname)),)
OPT_OPTIONS += -g -O2
else
ifneq ($(findstring Linux,$(shell uname)),)
ifneq ($(findstring ia64,$(shell uname -m)),)
OPT_OPTIONS += -g -O1
else
OPT_OPTIONS += -g -O2
endif
else
OPT_OPTIONS += -g -O2
endif
endif
endif
# These options are needed to compile with new gcc compilers (like 4.6 and above)
# (See http://www.amigacoding.de/index.php?topic=301.0).
GCCVERSIONSTRING=$(shell gcc -dumpversion)
empty:=
space:= $(empty) $(empty)
GCCVERSION := $(shell expr `echo $(GCCVERSIONSTRING)` | cut -f1 -d.)
GCCVERSION += $(shell expr `echo $(GCCVERSIONSTRING)` | cut -f2 -d.)
GCCVERSION += $(shell expr `echo $(GCCVERSIONSTRING)` | cut -f3 -d.)
# Make sure the version number has at least 3 decimals
GCCVERSION += 00
# Remove spaces from the version number
GCCVERSION := $(subst $(space),$(empty),$(GCCVERSION))
# Crop the version number to 3 decimals.
GCCVERSION := $(shell expr `echo $(GCCVERSION)` | cut -b1-3)
ifeq ($(shell expr `echo $(GCCVERSION)` \>= 460), 1)
$(info new compiler $(GCCVERSION))
OPT_OPTIONS += -D_GNU_SOURCE
CFLAGS=${OPT_OPTIONS} -std=c99
CPPFLAGS=${OPT_OPTIONS}
CXXFLAGS=${OPT_OPTIONS} -Wno-comment -Wno-write-strings
ifeq ($(shell expr `echo $(GCCVERSION)` \>= 470), 1)
CXXFLAGS+= -Wno-unused-local-typedefs
endif
### LDFLAGS:='-Wl,--no-as-needed ${LDFLAGS}'
LDFLAGS :='-Wl,--no-as-needed ${LDFLAGS}'
BRAINVIEWLDFLAGS :='-Wl,--no-as-needed -L$(PREFIX_PATH)/lib -L/usr/lib64/ -lQt3Support'
else
$(info old compiler $(GCCVERSION))
CFLAGS=${OPT_OPTIONS}
CPPFLAGS=${OPT_OPTIONS}
CXXFLAGS=${OPT_OPTIONS}
endif
# +----------------------------------+
# | SET ARCH and OS specific bits |
# +----------------------------------+
# +---------- IRIX64 ----------------+
ifneq ($(findstring IRIX,$(shell uname)),)
JAMARCH=bin.irixmips
BICPL_BUILD_SWITCH=--with-image-sgi
CPPFLAGS+=-I$(PREFIX_PATH)/include -I$(PREFIX_PATH)/include/volume_io -I/usr/include/gl
# THESE ARE BIC SPECIFIC THINGS
PERL=$(shell which /usr/local/perl5.8/bin/perl5.8.5)
GTAR:=gtar
else
PERL=$(shell which perl)
endif
# +---------- Linux ----------------+
ifneq ($(findstring Linux,$(shell uname)),)
BICPL_BUILD_SWITCH=--with-image-netpbm
ifneq ($(findstring x86_64,$(shell uname -m)),)
JAMARCH=bin.linuxx86_64
# some silliness for RMINC-0.4 on Linux 64 bits
CFLAGS+=-fpic
CPPFLAGS+=-fpic
CXXFLAGS+=-fpic
MEX_EXT=mexa64
else
JAMARCH=bin.linuxx86
MEX_EXT=mexglx
endif
ifneq ($(findstring ia64,$(shell uname -m)),)
JAMARCH=bin.linuxia64
endif
endif
# +----------- Darwin ----------------+
ifneq ($(findstring Darwin,$(shell uname)),)
BICPL_BUILD_SWITCH=--with-image-netpbm
ifneq ($(findstring i386,$(shell uname -m)),)
JAMARCH=bin.macosxx86
else
JAMARCH=bin.macosxppc
endif
BUILD_PATH := $(BUILD_PATH)/:/sw
DYLD_LIBRARY_PATH=$(PREFIX_PATH)/lib
VIEWER_OPTS='--with-apple-opengl-framework'
## add dylib for MAC to avoid recycle
VIEWER_LDFLAGS=${LDFLAGS} -L/Applications/MNI/Darwin-i386//lib -dylib_file \
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:\
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
else
VIEWER_OPTS='--with-x'
VIEWER_LDFLAGS=-L$(PREFIX_PATH)/lib
endif
CFG_COMP_FLAGS=CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' CXXFLAGS='${CXXFLAGS}'
# +-----------------------------------------------+
# | SET MINC BASE VERSION (MUST BE 2) |
# +-----------------------------------------------+
MINC_BASE=2
MINC_COMPRESS=4
MINC_FORCE_V2=1
MINC_EXTRA = $(BIC_STATIC) --enable-acr-nema --enable-minc2
MINC_FLAG = --with-minc2
# +-------------------------------------------+
# | SET VERSION NUMBERS, PACKAGE NAMES, ETC |
# +-------------------------------------------+
ADNI_VERS=-1.2
ADNI_PACKAGE=mni-models_adni_nl${ADNI_VERS}
[email protected]:aces/mni-models_adni_nl.git
ADNI_GIT_TAG=mni_adni_nl_1-2
ADNI_CVS=mni-models/adni-nl
ADNI_CVS_TAG=mni_adni_nl_1-2
ARGS_VERS=-0.2.1
ARGS_PACKAGE=arguments${ARGS_VERS}
[email protected]:aces/arguments.git
ARGS_GIT_TAG=arguments_0-2-1
ARGS_CVS=libraries/arguments
ARGS_CVS_TAG=arguments_0-2-1
AUTOREG_VERS=-0.99.7
AUTOREG_PACKAGE=mni_autoreg${AUTOREG_VERS}
[email protected]:aces/mni_autoreg.git
AUTOREG_GIT_TAG=mni-autoreg_0_99_7
AUTOREG_CVS=registration/mni_autoreg
AUTOREG_CVS_TAG=autoreg-0-99-7
AVG305_VERS=-1.1
AVG305_PACKAGE=mni-models_average305-lin${AVG305_VERS}
[email protected]:aces/mni-models_average305-lin.git
AVG305_GIT_TAG=average305-lin-1-1
AVG305_CVS=mni-models/average305-lin
AVG305_CVS_TAG=average305-lin-1-1
BET_VERS=-1.3.7
BET_PACKAGE=mincbet${BET_VERS}
[email protected]:aces/mincbet.git
BET_GIT_TAG=bet-1-3-7
BET_CVS=minc_dev/mincbet
BET_CVS_TAG=bet-1-3-7
BICINVENTOR_VERS=-0.3.1
BICINVENTOR_PACKAGE=bicInventor${BICINVENTOR_VERS}
BICINVENTOR_GIT=
BICINVENTOR_GIT_TAG=
BICINVENTOR_CVS=libraries/bicInventor
BICINVENTOR_CVS_TAG=bicinventor_0-3-1
BOOST_VERS=_1_64_0
BOOST_PACKAGE=boost${BOOST_VERS}
BOOST_GIT=
BOOST_GIT_TAG=
BOOST_CVS=
BOOST_CVS_TAG=
BICPL_VERS=-1.4.8
BICPL_PACKAGE=bicpl${BICPL_VERS}
[email protected]:aces/bicpl.git
BICPL_GIT_TAG=bicpl-1_4_8
BICPL_CVS=libraries/bicpl
BICPL_CVS_TAG=bicpl-1_4_8
BRAINVIEW_VERS=-0.8.2
BRAINVIEW_PACKAGE=brain-view${BRAINVIEW_VERS}
BRAINVIEW_GIT=
BRAINVIEW_GIT_TAG=
BRAINVIEW_CVS=visualization/brain-view
BRAINVIEW_CVS_TAG=bv_0_8_2
CAREA_VERS=-1.3.0
CAREA_PACKAGE=cortex_area${CAREA_VERS}
[email protected]:aces/cortex_area.git
CAREA_GIT_TAG=v1-3-0
CAREA_CVS=statistics/cortex_area
CAREA_CVS_TAG=v1-3-0
CGAL_VERS=-3.3.1
CGAL_PACKAGE=CGAL${CGAL_VERS}
CGAL_GIT=
CGAL_GIT_TAG=
CGAL_CVS=
CGAL_CVS_TAG=
CIVET_VERS=-2.1.1
CIVET_PACKAGE=civet${CIVET_VERS}
[email protected]:aces/CIVET.git
CIVET_GIT_TAG=CIVET_2_1_1
CIVET_CVS=pipelines/CIVET
CIVET_CVS_TAG=CIVET_2_1_1
CLASP_VERS=-3.0.3
ifeq ($(CLASP_VERS),-2.1)
CLASP_PACKAGE=CLASP${CLASP_VERS}
else
CLASP_PACKAGE=surface-extraction${CLASP_VERS}
endif
[email protected]:aces/surface-extraction.git
CLASP_GIT_TAG=clasp_3-0-3
CLASP_CVS=surface/surface-extraction
CLASP_CVS_TAG=clasp_3-0-3
CLASSIFY_VERS=-1.1.1
CLASSIFY_PACKAGE=classify${CLASSIFY_VERS}
[email protected]:aces/classify.git
CLASSIFY_GIT_TAG=release-1.1.10
CLASSIFY_CVS=INSECT/classify
CLASSIFY_CVS_TAG=classify-1-1-1
COIN_VERS=-3.1.3
# COIN_VERS=-4.0.0a
COIN_PACKAGE=Coin${COIN_VERS}
COIN_GIT=
COIN_GIT_TAG=
COIN_CVS=
COIN_CVS_TAG=
COLIN27_VERS=-1.2
COLIN27_PACKAGE=mni-models_colin27-lin${COLIN27_VERS}
[email protected]:aces/mni-models_colin27-lin.git
COLIN27_GIT_TAG=colin27-lin-1-2
COLIN27_CVS=mni-models/colin27-lin
COLIN27_CVS_TAG=colin27-lin-1-2
CONGLOMERATE_VERS=-1.6.9
CONGLOMERATE_PACKAGE=conglomerate${CONGLOMERATE_VERS}
[email protected]:aces/conglomerate.git
CONGLOMERATE_GIT_TAG=conglomerate_1-6-9
CONGLOMERATE_CVS=libraries/conglomerate
CONGLOMERATE_CVS_TAG=conglomerate_1-6-9
CSURFACE_VERS=-1.2.2
CSURFACE_PACKAGE=cortical_surface${CSURFACE_VERS}
[email protected]:aces/cortical_surface.git
CSURFACE_GIT_TAG=cortical-surface-1-2-2
CSURFACE_CVS=surface/cortical_surface
CSURFACE_CVS_TAG=cortical-surface-1-2-2
DISPLAY_VERS=-1.6.0
DISPLAY_PACKAGE=Display${DISPLAY_VERS}
DISPLAY_GIT=
DISPLAY_GIT_TAG=
DISPLAY_CVS=
DISPLAY_CVS_TAG=
EBTKS_VERS=-1.6.6
ifeq ($(EBTKS_VERS),-1.4)
EBTKS_PACKAGE=EBTKS${EBTKS_VERS}
else
EBTKS_PACKAGE=ebtks${EBTKS_VERS}
endif
[email protected]:aces/EBTKS.git
EBTKS_GIT_TAG=ebtks-1_6_6
EBTKS_CVS=libraries/EBTKS
EBTKS_CVS_TAG=ebtks-1-6-6
EMMA_VERS=-1.0.0
EMMA_PACKAGE=emma${EMMA_VERS}
EMMA_GIT=
EMMA_GIT_TAG=
EMMA_CVS=
EMMA_CVS_TAG=
GETOPT_VERS=-0.3
GETOPT_PACKAGE=Getopt-Tabular${GETOPT_VERS}
[email protected]:aces/Getopt-Tabular.git
GETOPT_GIT_TAG=getopt_0-3
GETOPT_CVS=libraries/Getopt-Tabular
GETOPT_CVS_TAG=getopt_0-3
GGS_VERS=-9.22
GGS_PACKAGE=ghostscript${GGS_VERS}
GGS_GIT=
GGS_GIT_TAG=
GGS_CVS=
GGS_CVS_TAG=
GLIM_VERS=-1.2
GLIM_PACKAGE=glim_image${GLIM_VERS}
GLIM_GIT=
GLIM_GIT_TAG=
GLIM_CVS=
GLIM_CVS_TAG=
GSL_VERS=-1.8
GSL_PACKAGE=gsl${GSL_VERS}
GSL_GIT=
GSL_GIT_TAG=
GSL_CVS=
GSL_CVS_TAG=
HDF_VERS=5-1.8.8
HDF_PACKAGE=hdf${HDF_VERS}
HDF_GIT=
HDF_GIT_TAG=
HDF_CVS=
HDF_CVS_TAG=
ICBM152_VERS=-1.1
ICBM152_PACKAGE=mni-models_icbm152-lin${ICBM152_VERS}
[email protected]:aces/mni-models_icbm152-lin.git
ICBM152_GIT_TAG=mni_icbm_lin_1-1
ICBM152_CVS=mni-models/icbm152-lin
ICBM152_CVS_TAG=release_1-1
ICBM152NL_VERS=-1.1
ICBM152NL_PACKAGE=mni-models_icbm152-nl${ICBM152NL_VERS}
[email protected]:aces/mni-models_icbm152-nl.git
ICBM152NL_GIT_TAG=mni_icbm_nl_1-1
ICBM152NL_CVS=mni-models/icbm152-nl
ICBM152NL_CVS_TAG=mni_icbm_nl_1-1
ICBM152NL09_VERS=-1.1
ICBM152NL09_PACKAGE=mni-models_icbm152-nl-2009${ICBM152NL09_VERS}
[email protected]:aces/mni-models_icbm152-nl-2009.git
ICBM152NL09_GIT_TAG=mni_icbm_nl_09a_1-1
ICBM152NL09_CVS=mni-models/icbm152-nl-2009
ICBM152NL09_CVS_TAG=mni_icbm_nl_09a_1-1
ICBMTEMP_VERS=-1.0
ICBMTEMP_PACKAGE=mni-templates${ICBMTEMP_VERS}
[email protected]:aces/mni-templates.git
ICBMTEMP_GIT_TAG=mni_templates_1-0
ICBMTEMP_CVS=mni-models/mni-templates
ICBMTEMP_CVS_TAG=mni_templates_1-0
ILT_VERS=-1.2.5
ILT_PACKAGE=ILT${ILT_VERS}
[email protected]:aces/ILT.git
ILT_GIT_TAG=ILT-1_2_5
ILT_CVS=libraries/ILT
ILT_CVS_TAG=ILT-1_2_5
IMAGEMAGICK_VERS=-7.0.1-8
IMAGEMAGICK_PACKAGE=ImageMagick${IMAGEMAGICK_VERS}
IMAGEMAGICK_GIT=
IMAGEMAGICK_GIT_TAG=
IMAGEMAGICK_CVS=
IMAGEMAGICK_CVS_TAG=
INORM_VERS=-1.0.4
INORM_PACKAGE=inormalize${INORM_VERS}
[email protected]:aces/inormalize.git
INORM_GIT_TAG=inormalize_1-0-4
INORM_CVS=INSECT/inormalize
INORM_CVS_TAG=inormalize_1-0-4
LOBESEG_VERS=-1.1
LOBESEG_PACKAGE=mni_lobe_segment${LOBESEG_VERS}
LOBESEG_GIT=
LOBESEG_GIT_TAG=
LOBESEG_CVS=INSECT/mni_lobe_segment
LOBESEG_CVS_TAG=lobe_segment_1-1
LAPLACE_VERS=-1.3.0
LAPLACE_PACKAGE=laplacian_thickness${LAPLACE_VERS}
[email protected]:aces/laplacian_thickness.git
LAPLACE_GIT_TAG=laplace-1-3-0
LAPLACE_CVS=surface/laplacian_thickness/
LAPLACE_CVS_TAG=laplace-1-3-0
M4_VERS=-1.0
M4_PACKAGE=m4
[email protected]:aces/m4.git
M4_GIT_TAG=civet-2.1.0
M4_CVS=libraries/mni-acmacros
M4_CVS_TAG=m4_1-0
MINC_VERS=-2.1.02
MINC_PACKAGE=minc${MINC_VERS}
[email protected]:aces/minc.git
MINC_GIT_TAG=minc-2-1-02
MINC_CVS=libraries/minc
MINC_CVS_TAG=minc2-1-02
MRISIM_VERS=-1.0.3
MRISIM_PACKAGE=mrisim${MRISIM_VERS}
MRISIM_GIT=
MRISIM_GIT_TAG=
MRISIM_CVS=simulation/mrisim
MRISIM_CVS_TAG=mrisim-1-0-3
N3_VERS=-1.12.3
N3_PACKAGE=N3${N3_VERS}
[email protected]:aces/N3.git
N3_GIT_TAG=N3-1_12_3
N3_CVS=INSECT/N3
N3_CVS_TAG=N3-1_12_3
NETCDF_VERS=-3.6.1
NETCDF_PACKAGE=netcdf${NETCDF_VERS}
NETCDF_GIT=
NETCDF_GIT_TAG=
NETCDF_CVS=
NETCDF_CVS_TAG=
NETPBM_VERS=-10.35.94
NETPBM_PACKAGE=netpbm${NETPBM_VERS}
NETPBM_GIT=
NETPBM_GIT_TAG=
NETPBM_CVS=
NETPBM_CVS_TAG=
OOBICPL_VERS=-0.4.9
OOBICPL_PACKAGE=oobicpl${OOBICPL_VERS}
[email protected]:aces/oobicpl.git
OOBICPL_GIT_TAG=oobicpl-0-4-9
OOBICPL_CVS=libraries/oobicpl
OOBICPL_CVS_TAG=oobicpl-0-4-9
PCREPP_VERS=-0.9.5
PCREPP_PACKAGE=pcre++${PCREPP_VERS}
PCREPP_GIT=
PCREPP_GIT_TAG=
PCREPP_CVS=
PCREPP_CVS_TAG=
PCRE_VERS=-7.8
PCRE_PACKAGE=pcre${PCRE_VERS}
PCRE_GIT=
PCRE_GIT_TAG=
PCRE_CVS=
PCRE_CVS_TAG=
PERLLIB_VERS=-0.09
PERLLIB_PACKAGE=mni_perllib${PERLLIB_VERS}
[email protected]:aces/mni-perllib.git
PERLLIB_GIT_TAG=mni_perllib_v0_09
PERLLIB_CVS=libraries/mni-perllib
PERLLIB_CVS_TAG=mni_perllib_v0_09
PMP_VERS=-0.8.3
PMP_PACKAGE=PMP${PMP_VERS}
[email protected]:aces/PMP.git
PMP_GIT_TAG=ver-0-8-3
PMP_CVS=libraries/PMP
PMP_CVS_TAG=ver-0-8-3
PVE_VERS=-1.4.3
PVE_PACKAGE=pve${PVE_VERS}
[email protected]:aces/pve.git
PVE_GIT_TAG=ver-1_4_3
PVE_CVS=INSECT/pve
PVE_CVS_TAG=ver-1_4_3
QVAL_VERS=_1.38.0
QVAL_PACKAGE=qvalue${QVAL_VERS}
QVAL_GIT=
QVAL_GIT_TAG=
QVAL_CVS=
QVAL_CVS_TAG=
RAY_TRACE_VERS=-1.0.4
RAY_TRACE_PACKAGE=ray_trace${RAY_TRACE_VERS}
[email protected]:aces/ray_trace.git
RAY_TRACE_GIT_TAG=ray-trace-1-0-4
RAY_TRACE_CVS=visualization/ray_trace
RAY_TRACE_CVS_TAG=ray-trace-1-0-4
REGISTER_VERS=-1.4.0
REGISTER_PACKAGE=Register${REGISTER_VERS}
REGISTER_GIT=
REGISTER_GIT_TAG=
REGISTER_CVS=
REGISTER_CVS_TAG=
RMINC_VERS=_0.5.1
RMINC_PACKAGE=RMINC${RMINC_VERS}
RMINC_GIT=
RMINC_GIT_TAG=
RMINC_CVS=
RMINC_CVS_TAG=
RSTAT_VERS=-0.9.4
RSTAT_PACKAGE=mni_cortical_statistics${RSTAT_VERS}
RSTAT_GIT=
RSTAT_GIT_TAG=
RSTAT_CVS=
RSTAT_CVS_TAG=
SIMAGE_VERS=-1.7.0
SIMAGE_PACKAGE=simage${SIMAGE_VERS}
SIMAGE_GIT=
SIMAGE_GIT_TAG=
SIMAGE_CVS=
SIMAGE_CVS_TAG=
# SOQT_VERS=-1.4.2a
SOQT_VERS=-1.5.0
SOQT_PACKAGE=SoQt${SOQT_VERS}
SOQT_GIT=
SOQT_GIT_TAG=
SOQT_CVS=
SOQT_CVS_TAG=
STXSEG_VERS=-1.0
STXSEG_PACKAGE=mni_stx_segment${STXSEG_VERS}
STXSEG_GIT=
STXSEG_GIT_TAG=
STXSEG_CVS=INSECT/mni_stx_segment
STXSEG_CVS_TAG=stx_segment_1-0
SURFREG_VERS=-0.6.4
ifeq ($(SURFREG_VERS),-0.4)
SURFREG_PACKAGE=mni-surfreg${SURFREG_VERS}
else
SURFREG_PACKAGE=mni_surfreg${SURFREG_VERS}
endif
[email protected]:aces/mni_surfreg.git
SURFREG_GIT_TAG=mni-surfreg-0-6-4
SURFREG_CVS=registration/mni_surfreg
SURFREG_CVS_TAG=mni-surfreg-0-6-4
TRUEFONT_VERS=-2.0
TRUEFONT_PACKAGE=urw-fonts${TRUEFONT_VERS}
TRUEFONT_GIT=
TRUEFONT_GIT_TAG=
TRUEFONT_CVS=
TRUEFONT_CVS_TAG=
# +---------------------+
# | NAMES OF PACKAGES |
# +---------------------+
TGZ_FLAG=${PWD}/TGZ/.tgz_created
TGZ_DIR=${PWD}/TGZ
# +---------------+
# | BOOST STUFF |
# +---------------+
ifeq ($(BOOST_VERS),_1_48_0)
BJAM := ${SOURCE_DIR}/${BOOST_PACKAGE}/tools/build/v2/engine/${JAMARCH}
endif
ifeq ($(BOOST_VERS),_1_64_0)
BJAM := ${SOURCE_DIR}/${BOOST_PACKAGE}
endif
BOOSTTMP := /tmp
# +--------------------------------------------------+
# | DEFINE THE VARIABLES FOR THE NAME OF PACKAGES. |
# | MOST PACKAGES ARE .tar.gz, EXCEPT A FEW |
# | EXCEPTIONS. |
# +--------------------------------------------------+
LIST_EXTRA = BICINVENTOR BRAINVIEW COIN DISPLAY EMMA GLIM \
QVAL REGISTER RMINC RSTAT SIMAGE SOQT TRUEFONT
LIST_TAR = ADNI ARGS AUTOREG AVG305 BET BOOST BICPL CAREA NETCDF \
CGAL CIVET CLASP CLASSIFY COLIN27 CONGLOMERATE CSURFACE EBTKS \
GETOPT GSL HDF ICBM152 ICBM152NL ICBM152NL09 ICBMTEMP ILT \
INORM LAPLACE M4 MINC N3 OOBICPL PCREPP PCRE PERLLIB PMP PVE \
RAY_TRACE SURFREG
ifeq ($(MAGICK),yes)
LIST_TAR += IMAGEMAGICK
endif
ifeq ($(ANIMAL),yes)
LIST_TAR += LOBESEG STXSEG
endif
ifeq ($(MRI_SIM),yes)
LIST_TAR += MRISIM
endif
LIST_TGZ = NETPBM
ifeq ($(GGS_VERS),-8.71.1)
LIST_BZ2 = GGS
endif
ifeq ($(GGS_VERS),-9.22)
LIST_BZ2 =
LIST_TAR += GGS
endif
define make-variables
$1_TAR = ${TGZ_DIR}/${$1_PACKAGE}.$2
$1_DIR = ${SOURCE_DIR}/${$1_PACKAGE}
$1_UNTAR = ${SOURCE_DIR}/${$1_PACKAGE}/.$1_created
endef
$(foreach element,$(LIST_TAR),$(eval $(call make-variables,$(element),tar.gz)))
$(foreach element,$(LIST_TGZ),$(eval $(call make-variables,$(element),tgz)))
$(foreach element,$(LIST_BZ2),$(eval $(call make-variables,$(element),tar.bz2)))
# Special case to redefine M4 without version tag.
M4_DIR = ${SOURCE_DIR}/m4
####################################################################################
# +---------------+
# | MAKE TGZ DIR |
# +---------------+
${TGZ_FLAG}:
mkdir -p ${TGZ_DIR}
@if [ ! -f $@ ] ; then \
echo 1 > $@ ; \
fi
# +-----------------------+
# | MAKE QUARANTINE DIRS |
# +-----------------------+
$(QUARANTINE_FLAG):
mkdir -p ${SOURCE_DIR}
mkdir -p $(PREFIX_PATH)/lib $(PREFIX_PATH)/include $(PREFIX_PATH)/man/man1 $(PREFIX_PATH)/man/man2 $(PREFIX_PATH)/man/man3 $(PREFIX_PATH)/man/man4 $(PREFIX_PATH)/man/man5 $(PREFIX_PATH)/man/man6 $(PREFIX_PATH)/man/man7 $(PREFIX_PATH)/man/man8 $(PREFIX_PATH)/man/man9 $(PREFIX_PATH)/perl
@if [ ! -f $@ ] ; then \
echo 1 > $@ ; \
fi
@echo "# +-------------------------------------------------+"
@echo "# | SRC = ${SOURCE_PATH}"
@echo "# | PREFIX = ${PREFIX_PATH}"
@echo "# | CFLAGS = $(CFLAGS)"
@echo "# | CPPFLAGS = $(CPPFLAGS)"
@echo "# | CXXFLAGS = $(CXXFLAGS)"
@echo "# | LDFLAGS = $(LDFLAGS)"
@echo "# +-------------------------------------------------+"
# +-----------------------+
# | OBTAIN THE SOURCES: |
# | - FROM PACKAGE |
# | - FROM GIT |
# | - FROM CVS |
# +-----------------------+
define make-untar-target
$($1_UNTAR): ${QUARANTINE_FLAG}
@if [ ! -d ${$1_DIR} ] ; then \
if [ -e ${$1_TAR} ] ; then \
if [[ "${$1_TAR}" =~ "tgz" ]] || [[ "${$1_TAR}" =~ "tar.gz" ]] ; then \
${GTAR} -zxf ${$1_TAR} --directory=${SOURCE_DIR} ; \
else \
if [[ "${$1_TAR}" =~ "bz2" ]] ; then \
${GTAR} -xjf ${$1_TAR} --directory=${SOURCE_DIR} ; \
fi ; \
fi ; \
else \
if [ "$(USE_CVS)" == "yes" ] ; then \
cvs co -P -r ${$1_CVS_TAG} -d ${$1_DIR} ${$1_CVS} ; \
else \
if [ "$(USE_GIT)" == "yes" ] ; then \
if [ -n "${$1_GIT}" ] ; then \
git lfs clone --recurse-submodules --branch ${$1_GIT_TAG} ${$1_GIT} ${$1_DIR}; \
if [ ! -e ${$1_DIR}/.git ] ; then \
echo "Fail to clone source codes from ${$1_GIT}"; \
exit 1; \
fi ; \
cd ${$1_DIR}; \
if [[ "`git describe --tags`" != "${$1_GIT_TAG}" ]] ; then \
echo "Fail to checkout tag to ${$1_GIT_TAG}"; \
exit 1; \
fi ; \
cd -; \
else \
echo "Warning: no git repo for $1" ; \
fi ; \
else \
echo "You need either USE_GIT=yes or USE_CVS=yes" ; \
exit 1; \
fi ; \
fi ; \
fi ; \
if [ -d ${$1_DIR} ] ; then \
touch ${$1_UNTAR} ; \
fi ; \
fi
endef
LIST_ALL = ${LIST_TAR} ${LIST_TGZ} ${LIST_BZ2}
$(foreach element,$(LIST_ALL),$(eval $(call make-untar-target,$(element))))
# +------------------------------------+
# | MAIN LIBRARIES AND CORE PROGRAMS |
# +------------------------------------+
ADNI = $(PREFIX_PATH)/share/mni-models/mni_adni_t1w_tal_nlin_asym.mnc
LIBARGS = $(PREFIX_PATH)/lib/libarguments.a
AVG305VBM = $(PREFIX_PATH)/share/avg305/average_305_mask_1mm.mnc
AUTOREG = $(PREFIX_PATH)/bin/make_model
AVG305 = $(PREFIX_PATH)/share/mni-models/average305_t1_tal_lin.mnc
BRAINVIEW = $(PREFIX_PATH)/bin/brain-view
CAREA = $(PREFIX_PATH)/bin/cortex_area
CIVET = $(PREFIX_PATH)/CIVET$(CIVET_VERS)/CIVET_Processing_Pipeline
CLASP = $(PREFIX_PATH)/bin/expand_from_white
CLASSIFY = $(PREFIX_PATH)/bin/classify
LIBCOIN = $(PREFIX_PATH)/lib/libCoin.$(LIB_EXT)
COLIN27 = $(PREFIX_PATH)/share/mni-models/colin27_t1_tal_lin.mnc
CONGLOMERATE = $(PREFIX_PATH)/bin/volume_object_evaluate
CORTICAL = $(PREFIX_PATH)/bin/deform_surface
MNIDISPLAY = $(PREFIX_PATH)/bin/Display
GGS = $(PREFIX_PATH)/bin/gs
GLIM = $(PREFIX_PATH)/bin/glim_image
ICBM152 = $(PREFIX_PATH)/share/mni-models/icbm_avg_152_pd_tal_lin.mnc
ICBM152NL = $(PREFIX_PATH)/share/mni-models/icbm_avg_152_t1_tal_nlin_symmetric_VI.mnc
ICBM152NL09 = $(PREFIX_PATH)/share/mni-models/mni_icbm152_pd_tal_nlin_asym_09a.mnc
ICBMTEMP = $(PREFIX_PATH)/share/ICBM/icbm_template_1.00mm.mnc
IMAGEMAGICK = $(PREFIX_PATH)/bin/convert
INORM = $(PREFIX_PATH)/bin/headmask
LAPLACE = $(PREFIX_PATH)/bin/laplacian_thickness $(PREFIX_PATH)/bin/normal_thickness
LIBBICINVENTOR = $(PREFIX_PATH)/lib/libbicInventor.a
LIBBICPL = $(PREFIX_PATH)/lib/libbicpl.$(LIB_EXT)
LIBEBTKS = $(PREFIX_PATH)/lib/libEBTKS.a
EMMA = $(PREFIX_PATH)/emma/mireadvar.$(MEX_EXT) $(PREFIX_PATH)/bin/micreateimage
LIBGSL = $(PREFIX_PATH)/lib/libgsl.a
LIBHDF = $(PREFIX_PATH)/lib/libhdf5.a