-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSUMA_Makefile
110 lines (90 loc) · 3.36 KB
/
SUMA_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
#
ifndef USE_ZLIB
USE_ZLIB = -DHAVE_ZLIB
LZLIB = -lz
endif
#These normally come from AFNI's makefile, if you're running make without using afni's makefile, you need to set some variables
ifndef CEXTRA
CEXTRA = -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE -no-cpp-precomp
WARNOPT = -Wall -Wno-unused-variable
endif
ifndef RANLIB
RANLIB = /usr/bin/ranlib
endif
ifeq ($(CC),gcc)
#if (on safni) CC starts with gcc then it means makefile is executed from afni's makefile
#can't use ndef with CC because it's always defined
else
#add the option -DSUMA_MOTIF_GLXAREA if you want to use libMesaGLwM.a instead of libMesaGLw.a
CC_G5 = -O3 -funroll-loops -fstrict-aliasing -fsched-interblock \
-falign-loops=32 -falign-jumps=16 -falign-functions=16 \
-falign-jumps-max-skip=15 -falign-loops-max-skip=15 -malign-natural \
-ffast-math -mpowerpc-gpopt -force_cpusubtype_ALL \
-mtune=G5 -mcpu=G5 -mpowerpc64 -fPIC
CCDEBS = -DAFNI_DEBUG -DIMSEQ_DEBUG -DDISPLAY_DEBUG -DTHD_DEBUG
CEXTRA = -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE -no-cpp-precomp
#CCFAST = cc $(CC_G5) -DDARWIN $(CEXTRA)
CCFAST = cc -O2 -ffast-math $(CEXTRA)
CC = $(CCFAST)
CCVOL = cc -O2 -ffast-math $(CEXTRA)
CCMIN = cc
CCD = $(CC) $(CCDEBS)
# IFLAGS = -I. -I/usr/include -I/usr/include/sys -I/usr/X11R6/include
IFLAGS = -I. -I/usr/X11R6/include -I/sw/include
LFLAGS = -L. -L/usr/X11R6/lib -L/sw/lib -Wl,-multiply_defined -Wl,suppress
CCSVD = cc -O0 -fPIC -no-cpp-precomp
PLUGIN_SUFFIX = so
PLUGIN_LFLAGS = -flat_namespace -bundle -undefined suppress
PLUGIN_CC = $(CC) -dynamic -fno-common
PLFLAGS = -dynamic -L. -L/usr/X11R6/lib -L/sw/lib -Wl,-multiply_defined -Wl,suppress
SPECIAL = -faltivec -framework Accelerate -DUSE_ALTIVEC
endif
ifndef INSTALLDIR
INSTALLDIR_SUMA = /Users/julia/abin
else
#send suma to one directory back and let Makefile.INCLUDE move it to INSTALLDIR
INSTALLDIR_SUMA = ../
endif
CCOPT =
ifndef SUMA_INCLUDE_PATH
#Don't prepend -Igts/src -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include/ here since only one program needs them
SUMA_INCLUDE_PATH = -I/usr/X11R6/include -I./ -I../ -Igts/src -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include -I/sw/include
endif
ifndef SUMA_LINK_PATH
SUMA_LINK_PATH = -L/usr/lib -L/usr/X11R6/lib -L../ -L/usr/local/lib -L/sw/lib
endif
ifndef SUMA_LINK_LIB
#No need for those unless you are using SUMA_MOTIF_GLXAREA
#-lMesaGLwM lXm
#Don't append -lglib here because it is only needed in one program so far
SUMA_LINK_LIB = -lXm -lGLw -lGLU -lGL -lXmu -lXp -lXt -lXext -lX11 -lmri $(LZLIB) -lm -lmx -lglib -bind_at_load
endif
# for using libmri.so
ifdef MRI_SHARED
SUMA_SHARED_LOPTS = -Wl,-rpath='$$ORIGIN'
endif
ifndef SUMA_BIN_ARCHIVE
SUMA_BIN_ARCHIVE = SUMA_Local.tar
endif
ifndef CP
CP = cp
endif
ifndef MV
MV = /bin/mv
endif
ifndef TAR
TAR = /sw/bin/tar
endif
ifndef RM
RM = /bin/rm -f
endif
ifndef MKDIR
MKDIR = /bin/mkdir
endif
#that one was tried for static linking. Bad idea. Requires libGL.a which crashes with nvidia driver
#for static linking to work (forget about running the program) you need to build Mesa with the
#options --enable-static --without-glide with the ./configure script
# ./configure --prefix=/usr --enable-static --without-glide
#CCOPT = -static
#SUMA_LINK_LIB = -lGLU -lGL -lpthread -lXmu -lXm -lXp -lXext -lXt -lSM -lICE -lX11 -lm
include SUMA_Makefile_NoDev