File: Makefile

package info (click to toggle)
caret 5.6.4~dfsg.1-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 31,904 kB
  • ctags: 28,901
  • sloc: cpp: 378,050; python: 6,718; ansic: 5,507; makefile: 333; sh: 46
file content (266 lines) | stat: -rw-r--r-- 5,915 bytes parent folder | download
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
SHELL	= /bin/sh

PROGS_CMD = caret_command

PROGS_GUI = \
	  caret \
	  caret_edit 

PROGS	= $(PROGS_CMD) \
	  $(PROGS_GUI)

UBUNTULIBS	= \
	  caret_statistics \
	  caret_common \
	  caret_files \
	  caret_brain_set \
	  caret_command_operations \
	  caret_uniformize \
	  caret_widgets \
	  caret_cifti

LIBS = $(UBUNTULIBS) caret_vtk4_classes

DIRS	= $(LIBS) $(PROGS)
DIRS_NO_GUI = $(LIBS) $(PROGS_CMD)
UBUNTUDIRS = $(UBUNTULIBS) $(PROGS)

all:
	@echo ""
	@echo ""
	@echo "Use \"make qmake-debug\"\n     to create the makefiles with static libraries for debug."
	@echo "Use \"make qmake-debug-dynamic\"\n     to create the makefiles with dynamic libraries for debug."
	@echo "Use \"make qmake-profile\"\n     to create the makefiles with static libraries for profiling/debugging."
	@echo "Use \"make qmake-profile-dynamic\" \n     to create the makefiles with dynamic libraries for profiling/debugging."
	@echo "Use \"make qmake-release\"\n     to create the makefiles with static libraries for release."
	@echo "Use \"make qmake-release-dynamic\"\n     to create the makefiles with dynamic libraries for release."
	@echo "Use \"make build\"\n     to build the libraries and executables."
	@echo "Use \"make clean\"\n     to remove executables, libraries, and objects."
	@echo ""
	@echo "Use \"make doc\" to build the Doxygen generated documentation."
	@echo ""

doc:
	doxygen Doxyfile

build:
	@for i in ${DIRS} ; do \
	   echo "making " $$i ; \
	   cd $$i ; \
	   make ; \
	   cd .. ; \
	done

build16:
	@for i in ${DIRS} ; do \
	   echo "making " $$i ; \
	   cd $$i ; \
	   make -j 16; \
	   cd .. ; \
	done

build8:
	@for i in ${DIRS} ; do \
	   echo "making " $$i ; \
	   cd $$i ; \
	   make -j 8; \
	   cd .. ; \
	done

build4:
	@for i in ${DIRS} ; do \
	   echo "making " $$i ; \
	   cd $$i ; \
	   make -j 4; \
	   cd .. ; \
	done

build2:
	@for i in ${DIRS} ; do \
	   echo "making " $$i ; \
	   cd $$i ; \
	   make -j 2; \
	   cd .. ; \
	done



build-no-gui:
	@for i in ${DIRS_NO_GUI} ; do \
	   echo "making " $$i ; \
	   cd $$i ; \
	   make ; \
	   cd .. ; \
	done

build4-no-gui:
	@for i in ${DIRS_NO_GUI} ; do \
	   echo "making " $$i ; \
	   cd $$i ; \
	   make -j 4; \
	   cd .. ; \
	done


clean:
	@for i in ${DIRS} ; do \
	   echo "cleaning " $$i ; \
	   cd $$i ; \
	   make clean ; \
	   cd .. ; \
	done

distclean:
	@for i in ${DIRS} ; do \
	   echo "cleaning " $$i ; \
	   cd $$i ; \
	   make distclean ; \
	   cd .. ; \
	done

qmake-debug:
	@for i in ${LIBS} ; do \
	   echo "creating debug makefile for static libs with qmake for " $$i ; \
	   cd $$i ; \
	   qmake "CONFIG += debug"; \
	   cd .. ; \
	done
	@for i in ${PROGS} ; do \
	   echo "creating debug makefile with qmake for " $$i ; \
	   cd $$i ; \
	   qmake "CONFIG += debug"; \
	   cd .. ; \
	done

qmake-debug-dynamic:
	@for i in ${LIBS} ; do \
	   echo "creating makefile for static libs with qmake for " $$i ; \
	   cd $$i ; \
	   qmake "CONFIG += debug dll"; \
	   cd .. ; \
	done
	@for i in ${PROGS} ; do \
	   echo "creating makefile with qmake for " $$i ; \
	   cd $$i ; \
	   qmake "CONFIG += debug dll"; \
	   cd .. ; \
	done

qmake-release:
	@for i in ${LIBS} ; do \
	   echo "creating makefile for static libs with qmake for " $$i ; \
	   cd $$i ; \
	   qmake "CONFIG -= debug" "CONFIG += release"; \
	   cd .. ; \
	done
	@for i in ${PROGS} ; do \
	   echo "creating makefile with qmake for " $$i ; \
	   cd $$i ; \
	   qmake "CONFIG -= debug" "CONFIG += release"; \
	   cd .. ; \
	done

qmake-release-dynamic:
	@for i in ${LIBS} ; do \
	   echo "creating makefile for dynamic libs with qmake for " $$i ; \
	   cd $$i ; \
	   qmake "CONFIG -= debug" "CONFIG += release dll" "CONFIG -= staticlib"; \
	   cd .. ; \
	done
	@for i in ${PROGS} ; do \
	   echo "creating makefile with qmake for " $$i ; \
	   cd $$i ; \
	   qmake "CONFIG -= debug" "CONFIG += release dll"; \
	   cd .. ; \
	done

qmake-profile:
	@for i in ${LIBS} ; do \
	   echo "creating makefile for dynamic libs with qmake for " $$i ; \
	   cd $$i ; \
	   qmake "CONFIG += debug profile"; \
	   cd .. ; \
	done
	@for i in ${PROGS} ; do \
	   echo "creating makefile with qmake for " $$i ; \
	   cd $$i ; \
	   qmake "CONFIG += debug profile"; \
	   cd .. ; \
	done
        
qmake-profile-dynamic:
	@for i in ${LIBS} ; do \
	   echo "creating makefile for dynamic libs with qmake for " $$i ; \
	   cd $$i ; \
	   qmake "CONFIG += debug profile dll" "CONFIG -= staticlib"; \
	   cd .. ; \
	done
	@for i in ${PROGS} ; do \
	   echo "creating makefile with qmake for " $$i ; \
	   cd $$i ; \
	   qmake "CONFIG += debug profile dll"; \
	   cd .. ; \
	done

ubuntu:
	@for i in ${UBUNTULIBS} ; do \
	   echo "creating makefile for dynamic libs with qmake for " $$i ; \
	   cd $$i ; \
	   qmake "CONFIG -= debug" "CONFIG += release ubuntu dll"; \
	   cd .. ; \
	done
	@for i in ${PROGS} ; do \
	   echo "creating makefile with qmake for " $$i ; \
	   cd $$i ; \
	   qmake "CONFIG -= debug" "CONFIG += release ubuntu dll"; \
	   cd .. ; \
	done
	
rebuild:
	make qmake-debug
	make build
	
rebuild16:
	make qmake-debug
	make build16

rebuild8:
	make qmake-debug
	make build8
	
rebuild4:
	make qmake-debug
	make build4
	
rebuild2:
	make qmake-debug
	make build2
	
check_env:
	@cnt=""
	@if [ "${VTK_INC_DIR}" == "" ]; then \
          echo "Environment variable VTK_INC_DIR not set" ; \
	  cnt="1" ; \
	fi ;  
	@if [ "${VTK_LIB_DIR}" == "" ]; then \
          echo "Environment variable VTK_LIB_DIR not set" ; \
	  cnt="1" ; \
	fi ;  
	@if [ "${NETCDF_INC_DIR}" == "" ]; then \
          echo "Environment variable NETCDF_INC_DIR not set" ; \
	  cnt="1" ; \
	fi ;  
	@if [ "${NETCDF_LIB_DIR}" == "" ]; then \
          echo "Environment variable NETCDF_LIB_DIR not set" ; \
	  cnt="1" ; \
	fi ;  

#	@if [ "$cnt" != "" ]; then \
#	   echo "Required environment variables are not set" ; \
#	fi ; 

test:
	echo "Testing" ; \
	cd testing ; \
	./run_test.sh ; \
	cd .. ;