1 | # =============================================================== # |
---|
2 | # # |
---|
3 | # File : Makefile # |
---|
4 | # # |
---|
5 | # Institute of Microbiology (Technical University Munich) # |
---|
6 | # http://www.arb-home.de/ # |
---|
7 | # # |
---|
8 | # =============================================================== # |
---|
9 | |
---|
10 | # ----------------------------------------------------- |
---|
11 | # The ARB Makefile is aware of the following defines: |
---|
12 | # |
---|
13 | # CC C compiler (should be defined by OS) |
---|
14 | # CXX C++ compiler (should be defined by OS) |
---|
15 | # |
---|
16 | # DEVELOPER=name special compilation (values: ANY,RELEASE,your name) |
---|
17 | # OPENGL=0/1 whether OPENGL is available |
---|
18 | # |
---|
19 | # ----------------------------------------------------- |
---|
20 | # Paths for several libraries may be set from config.makefile by using: |
---|
21 | # |
---|
22 | # export XLIBS=$(shell pkg-config --libs xpm xerces-c) |
---|
23 | # export XINCLUDES=$(shell pkg-config --cflags x11) |
---|
24 | # export XAW_LIBS=$(shell pkg-config --libs xaw7) |
---|
25 | # export XML_INCLUDES=$(shell pkg-config --cflags xerces-c) |
---|
26 | # |
---|
27 | # You make have to explicitely point pkg-config to the *.pc files needed. |
---|
28 | # For example, Xquartz X11 libraries on macOS can be located by adding |
---|
29 | # the following line before those given above: |
---|
30 | # |
---|
31 | # export PKG_CONFIG_PATH=/usr/X11/lib/pkgconfig |
---|
32 | # |
---|
33 | # If you introduce a new variable that is handled as described above, |
---|
34 | # please add to section .@InjectedEnvironment |
---|
35 | # |
---|
36 | # ----------------------------------------------------- |
---|
37 | # ARB Makefile and ARB source code are aware of the following defines: |
---|
38 | # |
---|
39 | # $(MACH) name of the machine (LINUX or DARWIN; see config.makefile) |
---|
40 | # DEBUG compiles the DEBUG sections |
---|
41 | # DEBUG_GRAPHICS all X-graphics are flushed immediately (for debugging) |
---|
42 | # ARB_64=0/1 1=>compile 64 bit version |
---|
43 | # UNIT_TESTS=0/1 1=>compile in unit tests and call them after build |
---|
44 | # COVERAGE=0/1/2 compile in gcov support (useful together with UNIT_TESTS=1) |
---|
45 | # 0=no, 1+2=compile in, 1=show |
---|
46 | # STABS=0/1 force stabs format? (0 = "use default format") |
---|
47 | # SANITIZE=0/#/all use Sanitizer? (defaults to 0, |
---|
48 | # 1=AddressSanitizer+LeakSanitizer, |
---|
49 | # 2=UndefinedBehaviorSanitizer, |
---|
50 | # combine bit-values to activate multiple Sanitizers, |
---|
51 | # specify 'all' to activate all) |
---|
52 | # IGNORE_LEAKS=1 does not abort when leaks are detected (while using SANITIZE=1/all) |
---|
53 | # SHOWTODO=0/1 activate TODO-warnings? (defaults to 0, except for ralf) |
---|
54 | # |
---|
55 | # ----------------------------------------------------- |
---|
56 | # The ARB source code is aware of the following defines: |
---|
57 | # |
---|
58 | # NDEBUG doesn't compile the DEBUG sections |
---|
59 | # DEVEL_$(DEVELOPER) developer-dependent flag (enables you to have private sections in code) |
---|
60 | # DEVELOPER='ANY' (default setting) will be ignored |
---|
61 | # configurable in config.makefile |
---|
62 | # |
---|
63 | # ----------------------------------------------------- |
---|
64 | |
---|
65 | ifndef ARB_ORG_MAKEFLAGS |
---|
66 | ARB_ORG_MAKEFLAGS=$(MAKEFLAGS) |
---|
67 | else |
---|
68 | ifeq ($(ARB_ORG_MAKEFLAGS),) |
---|
69 | ARB_ORG_MAKEFLAGS=$(MAKEFLAGS) |
---|
70 | endif |
---|
71 | endif |
---|
72 | |
---|
73 | # Read configuration |
---|
74 | include config.makefile |
---|
75 | CONFIG_MAKEFILE_FOUND=$(strip $(wildcard config.makefile)) |
---|
76 | |
---|
77 | # strip spaces from values defined in config.makefile |
---|
78 | # (otherwise they easily have spaces appended) |
---|
79 | ifdef DEVELOPER |
---|
80 | DEVELOPER := $(strip $(DEVELOPER)) |
---|
81 | endif |
---|
82 | ifdef OPENGL |
---|
83 | OPENGL := $(strip $(OPENGL)) |
---|
84 | endif |
---|
85 | ifdef ISINA |
---|
86 | ISINA := $(strip $(ISINA)) |
---|
87 | endif |
---|
88 | ifdef DEBUG |
---|
89 | DEBUG := $(strip $(DEBUG)) |
---|
90 | endif |
---|
91 | ifdef UNIT_TESTS |
---|
92 | UNIT_TESTS := $(strip $(UNIT_TESTS)) |
---|
93 | endif |
---|
94 | ifdef COVERAGE |
---|
95 | COVERAGE := $(strip $(COVERAGE)) |
---|
96 | endif |
---|
97 | ifdef SHOWTODO |
---|
98 | SHOWTODO := $(strip $(SHOWTODO)) |
---|
99 | endif |
---|
100 | ifdef STABS |
---|
101 | STABS := $(strip $(STABS)) |
---|
102 | endif |
---|
103 | ifdef TRACESYM |
---|
104 | TRACESYM := $(strip $(TRACESYM)) |
---|
105 | endif |
---|
106 | ifdef DEBUG_GRAPHICS |
---|
107 | DEBUG_GRAPHICS := $(strip $(DEBUG_GRAPHICS)) |
---|
108 | endif |
---|
109 | |
---|
110 | # set defaults for (or strip) variables commented out in config.makefile: |
---|
111 | ifdef SANITIZE |
---|
112 | SANITIZE := $(strip $(SANITIZE)) |
---|
113 | else |
---|
114 | SANITIZE:=0 |
---|
115 | endif |
---|
116 | ifdef IGNORE_LEAKS |
---|
117 | IGNORE_LEAKS := $(strip $(IGNORE_LEAKS)) |
---|
118 | else |
---|
119 | IGNORE_LEAKS:=0 |
---|
120 | endif |
---|
121 | ifndef DARWIN |
---|
122 | DARWIN:=0 |
---|
123 | else |
---|
124 | DARWIN := $(strip $(DARWIN)) |
---|
125 | endif |
---|
126 | ifndef LINUX |
---|
127 | LINUX:=0 |
---|
128 | else |
---|
129 | LINUX := $(strip $(LINUX)) |
---|
130 | endif |
---|
131 | ifndef DEBIAN |
---|
132 | DEBIAN:=0 |
---|
133 | else |
---|
134 | DEBIAN := $(strip $(DEBIAN)) |
---|
135 | endif |
---|
136 | ifndef ARB_64 |
---|
137 | ARB_64=1#default to 64bit |
---|
138 | else |
---|
139 | ARB_64 := $(strip $(ARB_64)) |
---|
140 | endif |
---|
141 | |
---|
142 | # Variables allowed for injection [InjectedEnvironment] |
---|
143 | # (alternatively initialize them with '?=', e.g. done for XLIBS and XINCLUDES) |
---|
144 | # In both cases add them to SOURCE_TOOLS/export2sub |
---|
145 | ifndef XML_INCLUDES |
---|
146 | XML_INCLUDES= |
---|
147 | endif |
---|
148 | ifndef XAW_LIBS |
---|
149 | XAW_LIBS= |
---|
150 | endif |
---|
151 | |
---|
152 | |
---|
153 | ifneq ($(CONFIG_MAKEFILE_FOUND),) |
---|
154 | ifneq ($(DARWIN)$(LINUX),10) |
---|
155 | ifneq ($(DARWIN)$(LINUX),01) |
---|
156 | $(error exactly one of DARWIN=1 or LINUX=1 has to be defined (got:$(DARWIN)$(LINUX))) |
---|
157 | endif |
---|
158 | endif |
---|
159 | endif |
---|
160 | |
---|
161 | # compiler settings: |
---|
162 | ifneq ($(CC),use__A_CC__instead_of__CC) |
---|
163 | A_CC:=$(CC)# compile C |
---|
164 | A_CXX:=$(CXX)# compile C++ |
---|
165 | |
---|
166 | # uncomment to ensure no submakefile uses CC and CXX directly |
---|
167 | override CC:=use__A_CC__instead_of__CC |
---|
168 | override CXX:=use__A_CXX__instead_of__CXX |
---|
169 | endif |
---|
170 | |
---|
171 | export CC CXX A_CC A_CXX |
---|
172 | |
---|
173 | # unconditionally prepend $(ARBHOME)/lib to LD_LIBRARY_PATH if not found |
---|
174 | ifeq ($(findstring $(ARBHOME)/lib,$(LD_LIBRARY_PATH)),) |
---|
175 | LD_LIBRARY_PATH:=${ARBHOME}/lib:$(LD_LIBRARY_PATH) |
---|
176 | endif |
---|
177 | |
---|
178 | # store LD_LIBRARY_PATH to circumvent SIP restrictions: |
---|
179 | ARBBUILD_LIBRARY_PATH:=$(LD_LIBRARY_PATH) |
---|
180 | |
---|
181 | FORCEMASK = umask 002 |
---|
182 | NODIR=--no-print-directory |
---|
183 | |
---|
184 | SED:=$(ARBHOME)/SH/arb_sed |
---|
185 | READLINK:=$(ARBHOME)/SH/arb_readlink |
---|
186 | |
---|
187 | # ---------------------- compiler version detection |
---|
188 | |
---|
189 | # supported gcc versions: |
---|
190 | ALLOWED_gcc_VERSIONS=\ |
---|
191 | 4.4.3 4.4.5 4.4.6 4.4.7 \ |
---|
192 | 4.5.2 \ |
---|
193 | 4.6.1 4.6.2 4.6.3 4.6.4 \ |
---|
194 | 4.7.1 4.7.2 4.7.3 4.7.4 \ |
---|
195 | 4.8.0 4.8.1 4.8.2 4.8.3 4.8.4 4.8.5 \ |
---|
196 | 4.9.0 4.9.1 4.9.2 4.9.3 4.9.4 \ |
---|
197 | 5.1.0 5.2.0 5.3.0 5.4.0 5.5.0 \ |
---|
198 | 6.1.0 6.2.0 6.3.0 6.4.0 6.5.0 \ |
---|
199 | 7.1.0 7.2.0 7.3.0 7.4.0 7.5.0 \ |
---|
200 | 8.1.0 8.2.0 8.3.0 8.4.0 8.5.0 \ |
---|
201 | 9.1.0 9.2.0 9.3.0 9.4.0 9.5.0 \ |
---|
202 | 10.1.0 10.2.0 10.3.0 10.4.0 10.5.0 \ |
---|
203 | |
---|
204 | # Note: starting with version 5, arb silently accepts any subversion number |
---|
205 | # above zero. See SOURCE_TOOLS/arb_compiler_version.pl@acceptSubVersions |
---|
206 | # |
---|
207 | # This may cause problems when manually checking for compiler versions in code |
---|
208 | # (GCC_VERSION_CODE is not affected, GCC_PATCHLEVEL_CODE may cause problems!) |
---|
209 | # ---------------------- |
---|
210 | |
---|
211 | COMPILER_INFO:=$(shell SOURCE_TOOLS/arb_compiler_version.pl $(A_CXX)) |
---|
212 | COMPILER_NAME:=$(word 1,$(COMPILER_INFO)) |
---|
213 | COMPILER_VERSION:=$(word 2,$(COMPILER_INFO)) |
---|
214 | |
---|
215 | USE_CLANG:=0 |
---|
216 | ifneq ($(COMPILER_NAME),gcc) |
---|
217 | ifeq ($(COMPILER_NAME),clang) |
---|
218 | USE_CLANG:=1 |
---|
219 | else |
---|
220 | ifeq ($(COMPILER_VERSION),4.6.4) |
---|
221 | # gcc version 4.6.4 segfaults when dumping symbols for detection (silently accept as gcc) |
---|
222 | COMPILER_NAME:=gcc |
---|
223 | else |
---|
224 | $(error failed to detect COMPILER_NAME (got '$(COMPILER_NAME)', expected 'clang' or 'gcc')) |
---|
225 | endif |
---|
226 | endif |
---|
227 | endif |
---|
228 | |
---|
229 | ifeq ($(USE_CLANG),1) |
---|
230 | # accept all clang versions: |
---|
231 | ALLOWED_COMPILER_VERSIONS=$(COMPILER_VERSION) |
---|
232 | else |
---|
233 | ALLOWED_COMPILER_VERSIONS=$(ALLOWED_gcc_VERSIONS) |
---|
234 | endif |
---|
235 | |
---|
236 | COMPILER_VERSION_ALLOWED=$(strip $(subst ___,,$(foreach version,$(ALLOWED_COMPILER_VERSIONS),$(findstring ___$(version)___,___$(COMPILER_VERSION)___)))) |
---|
237 | |
---|
238 | #---------------------- split gcc version |
---|
239 | |
---|
240 | SPLITTED_VERSION:=$(subst ., ,$(COMPILER_VERSION)) |
---|
241 | |
---|
242 | USE_GCC_MAJOR:=$(word 1,$(SPLITTED_VERSION)) |
---|
243 | USE_GCC_MINOR:=$(word 2,$(SPLITTED_VERSION)) |
---|
244 | USE_GCC_PATCHLEVEL:=$(word 3,$(SPLITTED_VERSION)) |
---|
245 | |
---|
246 | USE_GCC_452_OR_HIGHER:= |
---|
247 | USE_GCC_46_OR_HIGHER:= |
---|
248 | USE_GCC_47_OR_HIGHER:= |
---|
249 | USE_GCC_48_OR_HIGHER:= |
---|
250 | USE_GCC_49_OR_HIGHER:= |
---|
251 | USE_GCC_50_OR_HIGHER:= |
---|
252 | USE_GCC_60_OR_HIGHER:= |
---|
253 | USE_GCC_70_OR_HIGHER:= |
---|
254 | USE_GCC_80_OR_HIGHER:= |
---|
255 | USE_GCC_90_OR_HIGHER:= |
---|
256 | |
---|
257 | ifeq ($(USE_CLANG),0) |
---|
258 | ifeq ($(USE_GCC_MAJOR),4) |
---|
259 | ifeq ($(USE_GCC_MINOR),5) |
---|
260 | ifneq ('$(findstring $(USE_GCC_PATCHLEVEL),23456789)','') |
---|
261 | USE_GCC_452_OR_HIGHER:=yes |
---|
262 | endif |
---|
263 | else |
---|
264 | ifneq ('$(findstring $(USE_GCC_MINOR),6789)','') |
---|
265 | USE_GCC_452_OR_HIGHER:=yes |
---|
266 | USE_GCC_46_OR_HIGHER:=yes |
---|
267 | ifneq ($(USE_GCC_MINOR),6) |
---|
268 | USE_GCC_47_OR_HIGHER:=yes |
---|
269 | ifneq ($(USE_GCC_MINOR),7) |
---|
270 | USE_GCC_48_OR_HIGHER:=yes |
---|
271 | ifneq ($(USE_GCC_MINOR),8) |
---|
272 | USE_GCC_49_OR_HIGHER:=yes |
---|
273 | endif |
---|
274 | endif |
---|
275 | endif |
---|
276 | endif |
---|
277 | endif |
---|
278 | else |
---|
279 | # gcc 5.x or higher |
---|
280 | USE_GCC_452_OR_HIGHER:=yes |
---|
281 | USE_GCC_46_OR_HIGHER:=yes |
---|
282 | USE_GCC_47_OR_HIGHER:=yes |
---|
283 | USE_GCC_48_OR_HIGHER:=yes |
---|
284 | USE_GCC_49_OR_HIGHER:=yes |
---|
285 | USE_GCC_50_OR_HIGHER:=yes |
---|
286 | ifneq ($(USE_GCC_MAJOR),5) |
---|
287 | # gcc 6.x or higher |
---|
288 | USE_GCC_60_OR_HIGHER:=yes |
---|
289 | ifneq ($(USE_GCC_MAJOR),6) |
---|
290 | # gcc 7.x or higher |
---|
291 | USE_GCC_70_OR_HIGHER:=yes |
---|
292 | ifneq ($(USE_GCC_MAJOR),7) |
---|
293 | # gcc 8.x or higher |
---|
294 | USE_GCC_80_OR_HIGHER:=yes |
---|
295 | ifneq ($(USE_GCC_MAJOR),8) |
---|
296 | # gcc 9.x or higher |
---|
297 | USE_GCC_90_OR_HIGHER:=yes |
---|
298 | endif |
---|
299 | endif |
---|
300 | endif |
---|
301 | endif |
---|
302 | endif |
---|
303 | endif |
---|
304 | |
---|
305 | #---------------------- define special directories for non standard builds |
---|
306 | |
---|
307 | ifeq ($(DARWIN),1) |
---|
308 | OSX_FW:=/System/Library/Frameworks |
---|
309 | OSX_FW_OPENGL:=$(OSX_FW)/OpenGL.framework/Versions/A/Libraries |
---|
310 | OSX_FW_GLUT:=$(OSX_FW)/GLUT.framework/Versions/A/Libraries |
---|
311 | OSX_FW_IMAGEIO:=$(OSX_FW)/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources |
---|
312 | endif |
---|
313 | |
---|
314 | #---------------------- SSE vectorization |
---|
315 | # for details about vectorization checks see SOURCE_TOOLS/vectorize.README |
---|
316 | |
---|
317 | DISABLE_VECTORIZE_CHECK:=0# set to 1 to completely disable vectorization checks |
---|
318 | TRACE_MISSED_VECTORIZATIONS:=0# set to 1 to activate detailed output about failed vectorizations |
---|
319 | # (does also show details about successful vectorized loops, which are not optimal) |
---|
320 | VECTORIZATION_CHECK_CANDIDATES:=0# set to 1 to show vectorizations that may be checked |
---|
321 | # (for yet unchecked files) |
---|
322 | # Note: TRACE_MISSED_VECTORIZATIONS and VECTORIZATION_CHECK_CANDIDATES cannot be used together! |
---|
323 | |
---|
324 | #---------------------- Support for OPENMP |
---|
325 | |
---|
326 | USE_OPENMP:=1 |
---|
327 | ifeq ($(DARWIN),1) |
---|
328 | USE_OPENMP:=0 |
---|
329 | endif |
---|
330 | |
---|
331 | #---------------------- |
---|
332 | |
---|
333 | ifeq ($(DARWIN),1) |
---|
334 | LINK_STATIC=1# link static |
---|
335 | else |
---|
336 | LINK_STATIC=0# link dynamically |
---|
337 | # LINK_STATIC=1# link static (testing only) |
---|
338 | endif |
---|
339 | |
---|
340 | shared_cflags :=# flags for shared lib compilation |
---|
341 | onlyC_flags :=# flags only suitable for C (not C++; see cxxflags). |
---|
342 | clflags :=# linker flags (when passed through gcc) |
---|
343 | extended_warnings :=# warning flags for C and C++-compiler |
---|
344 | extended_cpp_warnings :=# warning flags for C++-compiler only |
---|
345 | |
---|
346 | ifeq ($(DEBUG),0) |
---|
347 | dflags := -DNDEBUG# defines |
---|
348 | ifeq ($(USE_CLANG),1) |
---|
349 | cflags := -O3# compiler flags (C and C++) |
---|
350 | else |
---|
351 | clflags += -Wl,-O2# passthrough linker flags |
---|
352 | # ------- standard optimization: |
---|
353 | cflags := -O3# compiler flags (C and C++) |
---|
354 | # ------- test changed optimization (DISABLE_VECTORIZE_CHECK for -O2 or lower): |
---|
355 | # cflags := -O2# do not commit uncommented! |
---|
356 | # DISABLE_VECTORIZE_CHECK:=1 |
---|
357 | endif |
---|
358 | endif |
---|
359 | |
---|
360 | ifeq ($(DEBIAN),1) |
---|
361 | clflags += -Wl,-rpath=/usr/lib/arb/lib -Wl,-z,relro |
---|
362 | endif |
---|
363 | |
---|
364 | ifeq ($(DEBUG),1) |
---|
365 | dflags := -DDEBUG |
---|
366 | |
---|
367 | gdb_common := -g -g3 -ggdb -ggdb3 |
---|
368 | |
---|
369 | DBGOPTI:=-O0 |
---|
370 | ifneq ('$(SANITIZE)','0') |
---|
371 | # sanitizer report several bogus buffer-overflows when arb is build with -O0 (e.g. with gcc 7.5.0) |
---|
372 | DBGOPTI:=-O1 |
---|
373 | endif |
---|
374 | |
---|
375 | ifeq ($(STABS),1) |
---|
376 | $(error STABS no longer supported) |
---|
377 | endif |
---|
378 | |
---|
379 | cflags := $(DBGOPTI) $(gdb_common) |
---|
380 | # cflags := -O2 $(gdb_common) # use this for callgrind (force inlining) |
---|
381 | |
---|
382 | ifeq ($(DARWIN),0) |
---|
383 | clflags += -Wl,-g |
---|
384 | # Note: |
---|
385 | # Previously '-Wl,-noinhibit-exec' was added to 'clflags' here, |
---|
386 | # to fix some issues with launchpad binutils (see [12972]). |
---|
387 | # But that change also caused 'undefined symbols' NOT to be reported as errors |
---|
388 | # at link time, producing executables that fail at runtime :/ |
---|
389 | endif |
---|
390 | |
---|
391 | ifeq ($(DEBUG_GRAPHICS),1) |
---|
392 | dflags += -DDEBUG_GRAPHICS |
---|
393 | endif |
---|
394 | |
---|
395 | endif # DEBUG only |
---|
396 | |
---|
397 | # ------------------------------ POST_COMPILE - control how much you get spammed |
---|
398 | # (please do not change default in SVN) |
---|
399 | POST_COMPILE := 2>&1 | $(ARBHOME)/SOURCE_TOOLS/postcompile.pl |
---|
400 | |
---|
401 | # POST_COMPILE += --original # dont modify compiler output |
---|
402 | # POST_COMPILE += --hide-Noncopyable-advices |
---|
403 | # POST_COMPILE += --show-useless-Weff++ |
---|
404 | # POST_COMPILE += --no-warnings |
---|
405 | # POST_COMPILE += --only-first-error |
---|
406 | # POST_COMPILE += --no-warnings --only-first-error |
---|
407 | |
---|
408 | # always pass used compiler version to postcompile: |
---|
409 | POST_COMPILE += --compiler=$(COMPILER_VERSION) |
---|
410 | |
---|
411 | # ------------------------------ |
---|
412 | |
---|
413 | # Enable extra warnings |
---|
414 | extended_warnings := |
---|
415 | extended_cpp_warnings := |
---|
416 | |
---|
417 | # C and C++ |
---|
418 | extended_warnings += -Wwrite-strings -Wunused -Wno-aggregate-return |
---|
419 | |
---|
420 | ifeq ('$(USE_GCC_50_OR_HIGHER)','yes') |
---|
421 | # disable shadow warnings for gcc 4.8 (and lower) |
---|
422 | # (does e.g. warn if a method-name is used as parameter in another method - even for derived classes. unusable!) |
---|
423 | extended_warnings += -Wshadow |
---|
424 | endif |
---|
425 | |
---|
426 | # C++ only |
---|
427 | extended_cpp_warnings += -Wnon-virtual-dtor -Wreorder -Wpointer-arith -Wdisabled-optimization -Wmissing-format-attribute |
---|
428 | extended_cpp_warnings += -Wctor-dtor-privacy |
---|
429 | # extended_cpp_warnings += -Wfloat-equal |
---|
430 | |
---|
431 | extended_cpp_warnings += -Wmissing-noreturn |
---|
432 | # extended_cpp_warnings += -Wold-style-cast# (warns about 28405 old-style casts) |
---|
433 | extended_cpp_warnings += -Winit-self |
---|
434 | extended_cpp_warnings += -Wstrict-aliasing |
---|
435 | extended_cpp_warnings += -Wextra |
---|
436 | |
---|
437 | # ------- above only warning-options already available in gcc 4.4.3 |
---|
438 | |
---|
439 | # -Weffc++ broken in 4.7.x series |
---|
440 | # gcc 4.7.3 crashes on GenomeImport.cxx when -Weffc++ is active |
---|
441 | # (bug reported https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56923; apparently wont be fixed for 4.7-series) |
---|
442 | # gcc 4.7.4 crashes on DBwriter.cxx when -Weffc++ is active |
---|
443 | WEFFC_BROKEN:=0 |
---|
444 | ifeq ('$(USE_GCC_47_OR_HIGHER)','yes') |
---|
445 | ifneq ('$(USE_GCC_48_OR_HIGHER)','yes') |
---|
446 | WEFFC_BROKEN:=1 |
---|
447 | endif |
---|
448 | endif |
---|
449 | ifeq ('$(WEFFC_BROKEN)','0') |
---|
450 | extended_cpp_warnings += -Weffc++ |
---|
451 | endif |
---|
452 | |
---|
453 | # turn off -Wmaybe-uninitialized in debug mode (gets activated with -Wextra). too many bogus warnings |
---|
454 | ifeq ($(DEBUG),1) |
---|
455 | ifeq ($(USE_CLANG),0) |
---|
456 | extended_cpp_warnings += -Wno-maybe-uninitialized |
---|
457 | endif |
---|
458 | endif |
---|
459 | |
---|
460 | SUGGEST_FINAL:= |
---|
461 | |
---|
462 | ifeq ('$(USE_GCC_452_OR_HIGHER)','yes') |
---|
463 | extended_cpp_warnings += -Wlogical-op# gcc 4.5.2 |
---|
464 | endif |
---|
465 | ifeq ('$(USE_GCC_47_OR_HIGHER)','yes') |
---|
466 | extended_cpp_warnings += -Wzero-as-null-pointer-constant# gcc 4.7 |
---|
467 | endif |
---|
468 | ifeq ('$(USE_GCC_48_OR_HIGHER)','yes') |
---|
469 | extended_cpp_warnings += -Wunused-local-typedefs# available since gcc 4.7 (but fails for each STATIC_ASSERT, so enable only for Cxx11) |
---|
470 | endif |
---|
471 | ifeq ('$(USE_GCC_50_OR_HIGHER)','yes') |
---|
472 | extended_cpp_warnings += -Wswitch-bool |
---|
473 | extended_cpp_warnings += -Wlogical-not-parentheses |
---|
474 | extended_cpp_warnings += -Wsizeof-array-argument |
---|
475 | extended_cpp_warnings += -Wbool-compare |
---|
476 | |
---|
477 | SUGGEST_FINAL:=yes |
---|
478 | endif |
---|
479 | ifeq ('$(USE_GCC_60_OR_HIGHER)','yes') |
---|
480 | extended_cpp_warnings += -Wduplicated-cond |
---|
481 | endif |
---|
482 | ifeq ('$(USE_GCC_80_OR_HIGHER)','yes') |
---|
483 | extended_cpp_warnings += -Wmultistatement-macros |
---|
484 | endif |
---|
485 | |
---|
486 | # switch off final suggestions for 8.3.0 and 8.4.0: |
---|
487 | ifeq ('$(COMPILER_VERSION)','8.3.0') |
---|
488 | SUGGEST_FINAL:=no |
---|
489 | endif |
---|
490 | ifeq ('$(COMPILER_VERSION)','8.4.0') |
---|
491 | SUGGEST_FINAL:=no |
---|
492 | endif |
---|
493 | |
---|
494 | ifeq ($(DEVELOPER),RELEASE) |
---|
495 | # switch off final suggestions in RELEASE: |
---|
496 | SUGGEST_FINAL:=no |
---|
497 | endif |
---|
498 | # suggest final: |
---|
499 | ifeq ('$(SUGGEST_FINAL)','yes') |
---|
500 | extended_cpp_warnings += -Wsuggest-final-types |
---|
501 | extended_cpp_warnings += -Wsuggest-final-methods |
---|
502 | dflags += -DSUGGESTS_FINAL |
---|
503 | endif |
---|
504 | |
---|
505 | #---------------------- turn off clang bogus warnings |
---|
506 | |
---|
507 | ifeq ($(USE_CLANG),1) |
---|
508 | # -Wmismatched-tags warns about struct/class mismatch in forward declarations (which is explicitely allowed) |
---|
509 | # -Wchar-subscripts reports too many bogus warnings for "array['x']" (when 'x' is known to be in range [0..128]) |
---|
510 | # -Wunused-private-field report too many false positives (currently ~ 2 of 3) |
---|
511 | # -Wstring-plus-int warns about common ARB coding practice |
---|
512 | # -Wgnu-static-float-init warns about accepted GNU extension |
---|
513 | extended_cpp_warnings += -Wno-mismatched-tags -Wno-char-subscripts -Wno-unused-private-field -Wno-string-plus-int |
---|
514 | ifeq ('$(COMPILER_VERSION)','4.2.1') |
---|
515 | # jenkins build (doesn't know switch -Wno-gnu-static-float-init) |
---|
516 | extended_cpp_warnings += -Wno-gnu |
---|
517 | else |
---|
518 | extended_cpp_warnings += -Wno-gnu-static-float-init |
---|
519 | endif |
---|
520 | endif |
---|
521 | |
---|
522 | #---------------------- developer |
---|
523 | |
---|
524 | ifneq ($(DEVELOPER),ANY) # ANY=default setting (skip all developer specific code) |
---|
525 | dflags += -DDEVEL_$(DEVELOPER)# activate developer/release specific code |
---|
526 | endif |
---|
527 | |
---|
528 | #---------------------- activate TODO warnings? |
---|
529 | |
---|
530 | ifndef SHOWTODO |
---|
531 | ifeq ($(DEVELOPER),RALF) |
---|
532 | SHOWTODO:=1 |
---|
533 | else |
---|
534 | SHOWTODO:=0 |
---|
535 | endif |
---|
536 | endif |
---|
537 | ifeq ($(SHOWTODO),1) |
---|
538 | dflags += -DWARN_TODO# activate "TODO" warnings |
---|
539 | endif |
---|
540 | |
---|
541 | #---------------------- activate threads? |
---|
542 | # only useful if compiler is able to compile Cxx11 or better |
---|
543 | |
---|
544 | ifeq ('$(USE_GCC_48_OR_HIGHER)','yes') |
---|
545 | # see also ./TEMPLATES/cxxforward.h@USE_Cxx11 |
---|
546 | cflags += -pthread |
---|
547 | clflags += -pthread |
---|
548 | endif |
---|
549 | |
---|
550 | #---------------------- activate Sanitizers? |
---|
551 | |
---|
552 | ASAN_OPTIONS:=handle_segv=0:color=0 |
---|
553 | ifeq ($(IGNORE_LEAKS),1) |
---|
554 | ASAN_OPTIONS+=:detect_leaks=0 # disable leak-detection |
---|
555 | else |
---|
556 | ASAN_OPTIONS+=:detect_leaks=1 # detect leaks (normal setting) |
---|
557 | endif |
---|
558 | ASAN_OPTIONS+=:check_initialization_order=1 |
---|
559 | # ASAN_OPTIONS+=:abort_on_error=1 |
---|
560 | |
---|
561 | # suppressions: SOURCE_TOOLS/arb.leaksan.supp |
---|
562 | LSAN_OPTIONS:=max_leaks=3:suppressions=$(ARBHOME)/SOURCE_TOOLS/arb.leaksan.supp |
---|
563 | |
---|
564 | UBSAN_OPTIONS:=print_stacktrace=1 |
---|
565 | |
---|
566 | SANITIZE_ADDRESS:=0 |
---|
567 | SANITIZE_UNDEFINED:=0 |
---|
568 | |
---|
569 | ifneq ($(SANITIZE),0) |
---|
570 | ifeq ($(SANITIZE),all) |
---|
571 | SANITIZE:=3 |
---|
572 | endif |
---|
573 | |
---|
574 | ifeq ($(SANITIZE),1) |
---|
575 | SANITIZE_ADDRESS:=1 |
---|
576 | else |
---|
577 | ifeq ($(SANITIZE),2) |
---|
578 | SANITIZE_UNDEFINED:=1 |
---|
579 | else |
---|
580 | ifeq ($(SANITIZE),3) |
---|
581 | SANITIZE_ADDRESS:=1 |
---|
582 | SANITIZE_UNDEFINED:=1 |
---|
583 | else |
---|
584 | $(error Unknown value '$(SANITIZE)' specified for SANITIZE in config.makefile) |
---|
585 | endif |
---|
586 | endif |
---|
587 | endif |
---|
588 | endif |
---|
589 | |
---|
590 | ifeq ($(SANITIZE_ADDRESS),1) |
---|
591 | ifneq ('$(USE_GCC_48_OR_HIGHER)','yes') |
---|
592 | $(info AddressSanitizer not usable with gcc $(COMPILER_VERSION) - disabled) |
---|
593 | SANITIZE_ADDRESS:=0 |
---|
594 | else |
---|
595 | ifneq ('$(USE_GCC_49_OR_HIGHER)','yes') |
---|
596 | $(info LeakSanitizer does not work with gcc $(COMPILER_VERSION) - disabled) |
---|
597 | # need to disable AddressSanitizer (otherwise build fails; only affects gcc 4.8.x series) |
---|
598 | SANITIZE_ADDRESS:=0 |
---|
599 | endif |
---|
600 | endif |
---|
601 | endif |
---|
602 | |
---|
603 | ifeq ($(SANITIZE_UNDEFINED),1) |
---|
604 | ifneq ('$(USE_GCC_49_OR_HIGHER)','yes') |
---|
605 | $(info UndefinedBehaviorSanitizer not usable with gcc $(COMPILER_VERSION) - disabled) |
---|
606 | SANITIZE_UNDEFINED:=0 |
---|
607 | endif |
---|
608 | endif |
---|
609 | |
---|
610 | SANITIZE_ANY:=0 |
---|
611 | ifeq ($(SANITIZE_ADDRESS),1) |
---|
612 | SANITIZE_ANY:=1 |
---|
613 | endif |
---|
614 | ifeq ($(SANITIZE_UNDEFINED),1) |
---|
615 | SANITIZE_ANY:=1 |
---|
616 | endif |
---|
617 | |
---|
618 | # vectorization fails if sanitizer active where it normally succeeds -> disable check |
---|
619 | ifeq ($(SANITIZE_ANY),1) |
---|
620 | $(info disabling vectorize checks. would fail with sanitized code) |
---|
621 | DISABLE_VECTORIZE_CHECK:=1 |
---|
622 | else |
---|
623 | $(info no sanitizer enabled. reset: SANITIZE=0) |
---|
624 | SANITIZE:=0 |
---|
625 | endif |
---|
626 | |
---|
627 | # deactivate some bogus warnings occurring when sanitizing NDEBUG version |
---|
628 | # (do not disable for future gcc-version >= 8.x -> test again when available) |
---|
629 | ifeq ($(SANITIZE_ANY),1) |
---|
630 | ifeq ($(DEBUG),0) |
---|
631 | ifneq ('$(USE_GCC_80_OR_HIGHER)','yes') |
---|
632 | extended_cpp_warnings += -Wno-format-overflow |
---|
633 | extended_cpp_warnings += -Wno-maybe-uninitialized |
---|
634 | endif |
---|
635 | endif |
---|
636 | endif |
---|
637 | |
---|
638 | #---------------------- 32 or 64 bit |
---|
639 | |
---|
640 | cross_cflags:= |
---|
641 | cross_lflags:= |
---|
642 | cross_clflags:= |
---|
643 | |
---|
644 | ifeq ($(ARB_64),1) |
---|
645 | dflags += -DARB_64 |
---|
646 | shared_cflags += -fPIC |
---|
647 | CROSS_LIB:=# empty => autodetect below |
---|
648 | ifeq ($(DARWIN),1) |
---|
649 | cross_cflags += -arch x86_64 |
---|
650 | cross_lflags += -arch x86_64 |
---|
651 | cross_clflags += -arch x86_64 |
---|
652 | endif |
---|
653 | else |
---|
654 | CROSS_LIB:=/lib |
---|
655 | endif |
---|
656 | |
---|
657 | cflags += $(cross_cflags) |
---|
658 | clflags += $(cross_clflags) |
---|
659 | |
---|
660 | ifeq ('$(CROSS_LIB)','') |
---|
661 | # autodetect libdir |
---|
662 | ifeq ($(ARB_64),1) |
---|
663 | CROSS_LIB:=$(shell (test -d /lib64 && echo lib64) || echo lib) |
---|
664 | else |
---|
665 | CROSS_LIB:=$(shell (test -d /lib32 && echo lib32) || echo lib) |
---|
666 | endif |
---|
667 | endif |
---|
668 | |
---|
669 | #---------------------- unit tests |
---|
670 | |
---|
671 | ifndef UNIT_TESTS |
---|
672 | UNIT_TESTS=0#default is "no tests" |
---|
673 | endif |
---|
674 | ifeq ($(UNIT_TESTS),1) |
---|
675 | dflags += -DUNIT_TESTS |
---|
676 | UNIT_TESTER_LIB=UNIT_TESTER/UNIT_TESTER.a |
---|
677 | else |
---|
678 | UNIT_TESTER_LIB= |
---|
679 | endif |
---|
680 | |
---|
681 | #---------------------- use gcov |
---|
682 | |
---|
683 | ifndef COVERAGE |
---|
684 | COVERAGE=0#default is "no" |
---|
685 | endif |
---|
686 | ifneq ($(COVERAGE),0) |
---|
687 | GCOV_FLAGS=--coverage |
---|
688 | $(info disabling vectorize checks. would fail with COVERAGE on) |
---|
689 | DISABLE_VECTORIZE_CHECK:=1 |
---|
690 | else |
---|
691 | GCOV_FLAGS= |
---|
692 | endif |
---|
693 | |
---|
694 | cflags += $(GCOV_FLAGS) |
---|
695 | clflags += $(GCOV_FLAGS) |
---|
696 | cross_lflags += $(GCOV_FLAGS) |
---|
697 | |
---|
698 | #---------------------- other flags |
---|
699 | |
---|
700 | dflags += -D$(MACH) # define machine |
---|
701 | |
---|
702 | ifeq ($(DARWIN),1) |
---|
703 | shared_cflags += -fno-common |
---|
704 | else |
---|
705 | dflags += $(shell getconf LFS_CFLAGS) |
---|
706 | endif |
---|
707 | |
---|
708 | cflags += -pipe |
---|
709 | cflags += -fmessage-length=0# dont wrap compiler output |
---|
710 | cflags += -fshow-column# show columns |
---|
711 | cflags += -funit-at-a-time |
---|
712 | cflags += -fPIC |
---|
713 | cflags += -fno-common# link all global data into one namespace |
---|
714 | cflags += -fstrict-aliasing# gcc 3.4 |
---|
715 | |
---|
716 | onlyC_flags += -Werror-implicit-function-declaration |
---|
717 | |
---|
718 | ifeq ('$(USE_GCC_48_OR_HIGHER)','yes') |
---|
719 | cflags += -fno-diagnostics-show-caret#gcc 4.8 (4.7.?) |
---|
720 | endif |
---|
721 | #cflags += -save-temps# uncomment to see preprocessor output |
---|
722 | |
---|
723 | #---------------------- various sanitizers |
---|
724 | # There are some disabled tests in CORE/arb_misc.cxx@sanitizers |
---|
725 | # which trigger sanitizer reports. |
---|
726 | |
---|
727 | ifeq ($(SANITIZE_ANY),1) |
---|
728 | cflags += -ggdb3 -fno-omit-frame-pointer |
---|
729 | endif |
---|
730 | |
---|
731 | SANI_CFLAGS:= |
---|
732 | SANI_CLFLAGS:= |
---|
733 | |
---|
734 | # activate AddressSanitizer+LeakSanitizer? |
---|
735 | ifeq ($(SANITIZE_ADDRESS),1) |
---|
736 | SANI_CFLAGS += -fsanitize=address |
---|
737 | SANI_CLFLAGS += -fsanitize=address |
---|
738 | dflags += -DLEAKS_SANITIZED |
---|
739 | endif |
---|
740 | |
---|
741 | # activate UndefinedBehaviorSanitizer? |
---|
742 | ifeq ($(SANITIZE_UNDEFINED),1) |
---|
743 | SANI_CFLAGS += -fsanitize=undefined |
---|
744 | SANI_CLFLAGS += -fsanitize=undefined |
---|
745 | dflags += -DUNDEF_SANITIZED |
---|
746 | ifeq ('$(USE_GCC_50_OR_HIGHER)','yes') |
---|
747 | # abort on runtime errors |
---|
748 | SANI_CFLAGS += -fno-sanitize-recover=all |
---|
749 | endif |
---|
750 | |
---|
751 | cflags += $(SANI_CFLAGS) |
---|
752 | clflags += $(SANI_CLFLAGS) |
---|
753 | |
---|
754 | # |
---|
755 | # Note: alignment-sanitizer is deactivated for ARBDB and PROBE! |
---|
756 | ifeq ('$(DEBUG)','1') |
---|
757 | ifeq ($(USE_GCC_MAJOR),4) |
---|
758 | ifeq ($(USE_GCC_MINOR),9) |
---|
759 | ifneq ('$(findstring $(USE_GCC_PATCHLEVEL),01)','') |
---|
760 | # workaround https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63531 for 4.9.0 + 4.9.1 |
---|
761 | # (problem is fixed in 4.9.2 release) |
---|
762 | extended_cpp_warnings:=$(subst -Weffc++,,$(extended_cpp_warnings)) |
---|
763 | endif |
---|
764 | endif |
---|
765 | endif |
---|
766 | endif |
---|
767 | endif |
---|
768 | |
---|
769 | #---------------------- X11 location |
---|
770 | |
---|
771 | ifeq ($(DARWIN),1) |
---|
772 | XHOME:=$(PREFIX) |
---|
773 | else |
---|
774 | ifeq ($(DEBIAN),1) |
---|
775 | XHOME:=$(PREFIX) |
---|
776 | else |
---|
777 | XHOME:=/usr/X11R6 |
---|
778 | endif |
---|
779 | endif |
---|
780 | |
---|
781 | XINCLUDES ?= -I$(XHOME)/include |
---|
782 | XLIBS ?= -L$(XHOME)/$(CROSS_LIB) |
---|
783 | ifeq ($(DARWIN),1) |
---|
784 | XINCLUDES += -I$(OSX_FW)/GLUT.framework/Headers -I$(OSX_FW)/OpenGL.framework/Headers -I$(OSX_SDK)/usr/include/krb5 |
---|
785 | |
---|
786 | XLIBS += -lXm -lpng -lz -lXt -lX11 -lXext -lXp -lXmu -lXi |
---|
787 | XLIBS += -Wl,-dylib_file,$(OSX_FW_OPENGL)/libGL.dylib:$(OSX_FW_OPENGL)/libGL.dylib |
---|
788 | XLIBS += -Wl,-dylib_file,$(OSX_FW_OPENGL)/libGLU.dylib:$(OSX_FW_OPENGL)/libGLU.dylib |
---|
789 | else |
---|
790 | XLIBS += -lXm -lXpm -lXt -lXext -lX11 |
---|
791 | endif |
---|
792 | |
---|
793 | #---------------------- open GL |
---|
794 | |
---|
795 | ifeq ($(OPENGL),1) |
---|
796 | cflags += -DARB_OPENGL # activate OPENGL code |
---|
797 | GL := gl # this is the name of the OPENGL base target |
---|
798 | GL_LIB_SYS := -lGL -lGLU |
---|
799 | GL_LIB_ARB := -L$(ARBHOME)/GL/glAW -lglAW |
---|
800 | |
---|
801 | ifeq ($(DARWIN),1) |
---|
802 | GL_LIB_SYS += -lpthread |
---|
803 | endif |
---|
804 | |
---|
805 | GL_PNGLIBS_ARB := -L$(ARBHOME)/GL/glpng -lglpng_arb |
---|
806 | GL_PNGLIBS_SYS := -lpng |
---|
807 | |
---|
808 | GLEWLIB := -lGLEW -lGLw |
---|
809 | GLUTLIB := -lglut |
---|
810 | |
---|
811 | GL_LIBS_SYS := $(GL_LIB_SYS) $(GL_PNGLIBS_SYS) $(GLEWLIB) $(GLUTLIB) |
---|
812 | GL_LIBS_ARB := $(GL_LIB_ARB) $(GL_PNGLIBS_ARB) |
---|
813 | |
---|
814 | RNA3D_LIB := RNA3D/RNA3D.a |
---|
815 | else |
---|
816 | GL_LIBS_SYS:=# no opengl -> no libs |
---|
817 | GL_LIBS_ARB:=# no opengl -> no libs |
---|
818 | GL:=# dont build ARB openGL libs |
---|
819 | |
---|
820 | RNA3D_LIB := |
---|
821 | endif |
---|
822 | |
---|
823 | RNA3D_LIB_4_DEPENDS := RNA3D/RNA3D.a |
---|
824 | |
---|
825 | GL_LIBS:=$(GL_LIBS_ARB) $(GL_LIBS_SYS) |
---|
826 | |
---|
827 | #---------------------- sina: |
---|
828 | |
---|
829 | ifndef ISINA |
---|
830 | # build sina delivered with arb? |
---|
831 | ifeq ($(LINUX),1) |
---|
832 | ifeq ('$(USE_GCC_70_OR_HIGHER)','yes') |
---|
833 | ISINA := 1# default to 'yes' for linux with gcc>=7 |
---|
834 | endif |
---|
835 | endif |
---|
836 | ifndef ISINA |
---|
837 | ISINA := 0# 'no' otherwise |
---|
838 | endif |
---|
839 | endif |
---|
840 | |
---|
841 | #---------------------- tiff lib: |
---|
842 | |
---|
843 | TIFFLIBS := -ltiff |
---|
844 | |
---|
845 | #---------------------- XML lib: |
---|
846 | |
---|
847 | XMLLIBS := -lxerces-c |
---|
848 | |
---|
849 | #---------------------- glib: |
---|
850 | |
---|
851 | ARB_NEEDED_GLIB=glib-2.0 |
---|
852 | |
---|
853 | ARB_GLIB_INCLUDE:=$(strip $(shell pkg-config --cflags $(ARB_NEEDED_GLIB))) |
---|
854 | ARB_GLIB_LIBS:=$(strip $(shell pkg-config --libs $(ARB_NEEDED_GLIB))) |
---|
855 | |
---|
856 | #---------------------- sunrpc lib: |
---|
857 | # Note: sunrpc has been removed from glibc |
---|
858 | # (e.g. in SuSE Leap 15.3 and Fedora 28) |
---|
859 | # see https://fedoraproject.org/wiki/Changes/SunRPCRemoval |
---|
860 | # |
---|
861 | HAVE_LIBTIRPC=$(strip $(shell pkg-config --exists libtirpc && echo libtirpc)) |
---|
862 | ifeq ($(HAVE_LIBTIRPC),) |
---|
863 | ARB_RPC_INCLUDE:= |
---|
864 | ARB_RPC_LIBS:= |
---|
865 | else |
---|
866 | ARB_RPC_INCLUDE:=$(strip $(shell pkg-config --cflags $(HAVE_LIBTIRPC))) |
---|
867 | ARB_RPC_LIBS:=$(strip $(shell pkg-config --libs $(HAVE_LIBTIRPC))) |
---|
868 | endif |
---|
869 | |
---|
870 | #---------------------- basic libs: |
---|
871 | |
---|
872 | ARB_CORE_LIBS:=$(ARB_GLIB_LIBS) $(ARB_RPC_LIBS) |
---|
873 | |
---|
874 | SYSLIBS:= |
---|
875 | ifeq ($(DARWIN),1) |
---|
876 | SYSLIBS += -lstdc++ |
---|
877 | else |
---|
878 | SYSLIBS += -lm $(ARB_CORE_LIBS) |
---|
879 | endif |
---|
880 | |
---|
881 | #---------------------- system dependent commands |
---|
882 | |
---|
883 | ifeq ($(DARWIN),1) |
---|
884 | TIME:=gtime |
---|
885 | else |
---|
886 | TIME:=/usr/bin/time |
---|
887 | endif |
---|
888 | |
---|
889 | #---------------------- SSE vectorizer |
---|
890 | # for details see SOURCE_TOOLS/vectorize.README |
---|
891 | |
---|
892 | ifeq ($(DEBUG),0) |
---|
893 | ifeq ($(USE_GCC_49_OR_HIGHER),yes) |
---|
894 | ifeq ($(DISABLE_VECTORIZE_CHECK),0) |
---|
895 | cflags += -fopt-info-vec |
---|
896 | cflags += -fopt-info-vec-missed |
---|
897 | ifeq ($(TRACE_MISSED_VECTORIZATIONS),1) |
---|
898 | # Shows reasons for unsuccessful vectorization: |
---|
899 | cflags += -ftree-vectorizer-verbose=10 |
---|
900 | POST_COMPILE += --dump-loop-optimization |
---|
901 | ifeq ($(VECTORIZATION_CHECK_CANDIDATES),1) |
---|
902 | $(error TRACE_MISSED_VECTORIZATIONS and VECTORIZATION_CHECK_CANDIDATES may not be used together!) |
---|
903 | endif |
---|
904 | endif |
---|
905 | ifeq ($(VECTORIZATION_CHECK_CANDIDATES),1) |
---|
906 | POST_COMPILE += --loop-optimization-candi |
---|
907 | endif |
---|
908 | POST_COMPILE += --check-loop-optimization |
---|
909 | endif |
---|
910 | else |
---|
911 | ifeq ($(USE_GCC_48_OR_HIGHER),yes) |
---|
912 | # no automatic vectorization-check for gcc<4.9.0 |
---|
913 | # -> uncomment the next 2 lines and grep the spam it will produce for 'vectorized.*loops' |
---|
914 | # cflags += -fopt-info -fopt-info-vec-missed |
---|
915 | # POST_COMPILE += --original |
---|
916 | endif |
---|
917 | endif |
---|
918 | endif |
---|
919 | |
---|
920 | #---------------------- stop early on broken flags/compiler combination |
---|
921 | |
---|
922 | ifeq ($(DEBUG),0) |
---|
923 | ifeq ($(SANITIZE_ANY),1) |
---|
924 | ifeq ('$(COMPILER_VERSION)','4.9.1') |
---|
925 | $(error compiling DEBUG=0 + SANITIZE!=0 crashes with gcc $(COMPILER_VERSION) (gcc 4.9.2 works)) |
---|
926 | endif |
---|
927 | endif |
---|
928 | endif |
---|
929 | |
---|
930 | #---------------------- include symbols? |
---|
931 | |
---|
932 | ifeq ($(TRACESYM),1) |
---|
933 | ifeq ($(USE_CLANG),0) |
---|
934 | cflags += -rdynamic |
---|
935 | clflags += -rdynamic -Wl,--export-dynamic |
---|
936 | endif |
---|
937 | endif |
---|
938 | |
---|
939 | #---------------------- warn about duplicate variable definitions |
---|
940 | |
---|
941 | ifeq ($(DARWIN),1) |
---|
942 | clflags += -Wl,-warn_commons |
---|
943 | else |
---|
944 | clflags += -Wl,--warn-common |
---|
945 | endif |
---|
946 | |
---|
947 | #---------------------- differences between linking executables and shared libs: |
---|
948 | |
---|
949 | # executables: |
---|
950 | ifeq ($(DARWIN),1) |
---|
951 | blflags:=$(clflags) |
---|
952 | else |
---|
953 | blflags:=$(clflags) -Wl,--no-undefined |
---|
954 | endif |
---|
955 | |
---|
956 | # shared libraries |
---|
957 | llflags:=$(clflags) |
---|
958 | |
---|
959 | # dont use clflags below |
---|
960 | clflags:= |
---|
961 | |
---|
962 | # ------------------------------------------------------------------------- |
---|
963 | # Don't put any machine/version/etc conditionals below! |
---|
964 | # (instead define variables above) |
---|
965 | # ------------------------------------------------------------------------- |
---|
966 | |
---|
967 | cflags += -W -Wall $(dflags) $(extended_warnings) |
---|
968 | cxxflags := $(extended_cpp_warnings)# flags only suitable for C++ (not C; see onlyC_flags). |
---|
969 | |
---|
970 | # add CFLAGS + CPPFLAGS from environment for DEBIAN build |
---|
971 | ifeq ($(DEBIAN),1) |
---|
972 | cflags := $(CFLAGS) $(cflags) |
---|
973 | cxxflags += $(CPPFLAGS) |
---|
974 | endif |
---|
975 | |
---|
976 | ifeq ('$(USE_CLANG)','1') |
---|
977 | # none of the following standards works with clang3.3 (under linux) => dont use standard (as done before r15516) |
---|
978 | # cxxflags += -std=gnu++11 |
---|
979 | # cxxflags += -std=gnu++0x |
---|
980 | else |
---|
981 | ifeq ('$(USE_GCC_60_OR_HIGHER)','yes') |
---|
982 | cxxflags += -std=gnu++14# see also TEMPLATES/cxxforward.h@USE_Cxx14 |
---|
983 | else |
---|
984 | ifeq ('$(USE_GCC_47_OR_HIGHER)','yes') |
---|
985 | cxxflags += -std=gnu++11# see also TEMPLATES/cxxforward.h@USE_Cxx11 |
---|
986 | else |
---|
987 | # gcc versions between 4.3 (lowest supported) and <4.7 |
---|
988 | cxxflags += -std=gnu++0x |
---|
989 | endif |
---|
990 | endif |
---|
991 | endif |
---|
992 | |
---|
993 | LINK_STATIC_LIB := $(AR) -csq# link static lib |
---|
994 | LINK_EXECUTABLE := $(A_CXX) $(blflags) -o# link executable (c++) |
---|
995 | |
---|
996 | ifeq ($(LINK_STATIC),1) |
---|
997 | SHARED_LIB_SUFFIX = a# static lib suffix |
---|
998 | LINK_SHARED_LIB := $(LINK_STATIC_LIB) |
---|
999 | else |
---|
1000 | SHARED_LIB_SUFFIX = so# shared lib suffix |
---|
1001 | LINK_SHARED_LIB := $(A_CXX) $(llflags) -shared -o# link shared lib |
---|
1002 | endif |
---|
1003 | |
---|
1004 | ifeq ($(DARWIN),1) |
---|
1005 | lflags4perl:= |
---|
1006 | else |
---|
1007 | lflags4perl:=$(cross_lflags) -shared |
---|
1008 | endif |
---|
1009 | |
---|
1010 | # delete variables unused below |
---|
1011 | blflags:= |
---|
1012 | llflags:= |
---|
1013 | |
---|
1014 | # other used tools |
---|
1015 | MAKEDEPEND_PLAIN = makedepend |
---|
1016 | MAKEDEPEND = $(FORCEMASK);$(MAKEDEPEND_PLAIN) |
---|
1017 | |
---|
1018 | SEPNODATE:=-------------------------------------------------------------------------------- |
---|
1019 | SEP=[`date +%M:%S.%N`] ------------------------------------------------ |
---|
1020 | # to analyse timings run |
---|
1021 | # make -j9 clean; make -j9 all | grep '^\[' | sort |
---|
1022 | # make -j9 "TIMED_TARGET=perl" clean_timed_target | grep '^\[' | sort |
---|
1023 | |
---|
1024 | # ------------------------------------------------------------ DYNLIBDEFS |
---|
1025 | # various dynamic library definitions for linking executables: |
---|
1026 | # |
---|
1027 | # SYSLIBS: system libraries needed by database lib |
---|
1028 | # ARBDB_LIB: database lib |
---|
1029 | # DBSYS_LIBS: executable using database (but no GUI) |
---|
1030 | # GUI_LIBS: executable using database and GUI (arb gui uses database) |
---|
1031 | # |
---|
1032 | # Note: definitions exported to sub-makefiles are described in SOURCE_TOOLS/parent_make.txt |
---|
1033 | |
---|
1034 | CORE_LIB=-lCORE |
---|
1035 | ARBDB_LIB=-lARBDB $(CORE_LIB) |
---|
1036 | DBSYS_LIBS = $(ARBDB_LIB) $(SYSLIBS) |
---|
1037 | |
---|
1038 | GUI_LIBS_PREFIX:= |
---|
1039 | ifeq ($(DARWIN),1) |
---|
1040 | # this seem to be added at wrong place, since opengl is only needed to link EDIT4 |
---|
1041 | GUI_LIBS_PREFIX:=-framework GLUT -framework OpenGL |
---|
1042 | endif |
---|
1043 | |
---|
1044 | GUI_LIBS=$(GUI_LIBS_PREFIX) $(DBSYS_LIBS) -lAWT -lWINDOW $(XLIBS) |
---|
1045 | |
---|
1046 | LIBPATH = -L$(ARBHOME)/lib |
---|
1047 | |
---|
1048 | DEST_LIB = lib |
---|
1049 | DEST_BIN = bin |
---|
1050 | |
---|
1051 | CC_INCLUDES := -I. -I$(ARBHOME)/INCLUDE $(XINCLUDES) $(ARB_GLIB_INCLUDE) $(ARB_RPC_INCLUDE) |
---|
1052 | CXX_INCLUDES := $(CC_INCLUDES) |
---|
1053 | MAKEDEPENDFLAGS := -- -DARB_OPENGL -DUNIT_TESTS -D__cplusplus -I. -Y$(ARBHOME)/INCLUDE |
---|
1054 | |
---|
1055 | # --------------------------------------- |
---|
1056 | # wrap main() |
---|
1057 | |
---|
1058 | use_ARB_main=$(ARBHOME)/SOURCE_TOOLS/arb_main_cpp.o |
---|
1059 | use_ARB_main_C=$(ARBHOME)/SOURCE_TOOLS/arb_main_c.o |
---|
1060 | |
---|
1061 | # ----------------------------------------- |
---|
1062 | # unique build-id |
---|
1063 | # - different for different calls of make |
---|
1064 | # - constant in recursive calls |
---|
1065 | |
---|
1066 | ifndef ARBBID |
---|
1067 | ARBBID:=$(shell SOURCE_TOOLS/uniqueID.sh) |
---|
1068 | endif |
---|
1069 | |
---|
1070 | # ----------------------------------------- |
---|
1071 | # export variables to submakefiles |
---|
1072 | |
---|
1073 | include SOURCE_TOOLS/export2sub |
---|
1074 | |
---|
1075 | # do not define (exported) variables below this point |
---|
1076 | |
---|
1077 | # ------------------------- |
---|
1078 | # Main arb targets: |
---|
1079 | # ------------------------- |
---|
1080 | |
---|
1081 | first_target: |
---|
1082 | $(MAKE) checks |
---|
1083 | @echo $(SEPNODATE) |
---|
1084 | @echo 'Main targets:' |
---|
1085 | @echo '' |
---|
1086 | @echo ' all - Compile ARB + TOOLs + and copy shared libs + link foreign software' |
---|
1087 | @echo ' (That is most likely the target you want)' |
---|
1088 | @echo '' |
---|
1089 | @echo ' clean - remove generated files ("SUBDIR/SUBDIR.clean" to clean only SUBDIR)' |
---|
1090 | @echo ' rebuild - clean + all' |
---|
1091 | @echo ' cleanlinked - remove all binaries' |
---|
1092 | @echo ' relink - cleanlinked + all (=relink all from objects)' |
---|
1093 | @echo '' |
---|
1094 | @echo 'Targets for automated builds:' |
---|
1095 | @echo '' |
---|
1096 | @echo ' ALL, REBUILD, TARFILE + TARFILE_QUICK ' |
---|
1097 | @echo ' - same as all, rebuild, tarfile + tarfile_quick' |
---|
1098 | @echo ' - if errors occur, they are extracted and listed at tail of output' |
---|
1099 | @echo '' |
---|
1100 | @echo $(SEPNODATE) |
---|
1101 | @echo '' |
---|
1102 | @echo 'Development targets:' |
---|
1103 | @echo '' |
---|
1104 | @echo ' depends - create or update dependencies ("SUBDIR/SUBDIR.depends" to update only SUBDIR)' |
---|
1105 | @echo ' proto - create or update prototypes ("SUBDIR/SUBDIR.proto" to update only SUBDIR)' |
---|
1106 | @echo ' tags - create tags for xemacs' |
---|
1107 | @echo ' show - show available shortcuts (AKA subtargets)' |
---|
1108 | @echo ' up - shortcut for depends+proto+tags' |
---|
1109 | ifeq ($(UNIT_TESTS),1) |
---|
1110 | @echo ' ut - only run tests' |
---|
1111 | @echo ' "UNIT=..." oneunit - build one unit and run tests (see also UNIT_TESTER/Makefile.setup.local)' |
---|
1112 | endif |
---|
1113 | ifneq ($(SANITIZE),0) |
---|
1114 | @echo ' sanitize - all + run arb_ntree with sanitizer (test.arb + execute _logged)' |
---|
1115 | endif |
---|
1116 | @echo ' modified - rebuild files modified in svn checkout (does touch)' |
---|
1117 | @echo ' touch - touch files modified in svn checkout' |
---|
1118 | @echo '' |
---|
1119 | @echo 'Some often used sub targets:' |
---|
1120 | @echo '' |
---|
1121 | @echo ' arb - Just compile ARB (but none of the integrated tools)' |
---|
1122 | @echo ' menus - create lib/gde/arb.menu from GDEHELP/ARB_GDEmenus.source' |
---|
1123 | @echo ' perl - Compile the PERL XSUBS into lib/ARB.so and create links in lib to perl' |
---|
1124 | @echo ' binlink - Create all links in the bin directory' |
---|
1125 | @echo '' |
---|
1126 | @echo 'Internal maintenance:' |
---|
1127 | @echo '' |
---|
1128 | @echo ' relinfo - show help on release targets' |
---|
1129 | @echo ' tarfile - make rebuild and create arb version tarfile ("tarfile_quick" to skip rebuild)' |
---|
1130 | @echo ' save - save all basic ARB sources into arbsrc_DATE ("savetest" to check filelist)' |
---|
1131 | @echo ' patch - save svn diff to patchfile' |
---|
1132 | @echo ' source_doc - create doxygen documentation' |
---|
1133 | @echo ' relocated - rebuild partly (use when you have relocated ARBHOME)' |
---|
1134 | @echo ' check_res - check resource usage' |
---|
1135 | @echo ' dep_graph - Build dependency graphs' |
---|
1136 | @echo ' clean_cov - Clean coverage results' |
---|
1137 | @echo '' |
---|
1138 | @echo ' clean_opengl_changed - clean after changing OPENGL setting in config.Makefile' |
---|
1139 | @echo ' clean_checked_vect - clean units containing vectorization checks' |
---|
1140 | @echo ' cleanRelinkable - similar to cleanlinked (but skips raxml8 to avoid rebuild)' |
---|
1141 | @echo '' |
---|
1142 | @echo ' post_commit_check - Checks whether' |
---|
1143 | @echo ' * main make targets work,' |
---|
1144 | @echo ' * dependencies and prototypes are up to date,' |
---|
1145 | @echo ' * SVN-controlled files remain unaffected by called targets and' |
---|
1146 | @echo ' * all generated files are ignored.' |
---|
1147 | @echo ' (has to be called in a clean SVN checkout)' |
---|
1148 | @echo $(SEPNODATE) |
---|
1149 | @echo '' |
---|
1150 | |
---|
1151 | relinfo: |
---|
1152 | @echo '' |
---|
1153 | @echo $(SEPNODATE) |
---|
1154 | @echo 'Release targets:' |
---|
1155 | @echo '' |
---|
1156 | @echo ' inc_candi - increase RC candidate-number (only possible in "rc" branch, not needed for RC1)' |
---|
1157 | @echo ' inc_patch - increase release patchlevel (only possible in "stable" branch)' |
---|
1158 | @echo ' inc_minor - increase minor version number (only possible in "trunk")' |
---|
1159 | @echo ' inc_major - increase MAJOR version number (only possible in "trunk")' |
---|
1160 | @echo '' |
---|
1161 | @echo ' show_version - show version tag' |
---|
1162 | @echo '' |
---|
1163 | @echo $(SEPNODATE) |
---|
1164 | @echo '' |
---|
1165 | |
---|
1166 | # auto-generate config.makefile: |
---|
1167 | |
---|
1168 | config.makefile : config.makefile.template |
---|
1169 | @echo -------------------------------------------------------------------------------- |
---|
1170 | ifeq ($(CONFIG_MAKEFILE_FOUND),) |
---|
1171 | @cp $< $@ |
---|
1172 | @echo '$(ARBHOME)/$@:1: has been generated.' |
---|
1173 | @echo 'Please edit $@ to configure your system!' |
---|
1174 | @echo -------------------------------------------------------------------------------- |
---|
1175 | @false |
---|
1176 | else |
---|
1177 | @echo '$(ARBHOME)/$<:1: is more recent than' |
---|
1178 | @echo '$(ARBHOME)/$@:1:' |
---|
1179 | @ls -al config.makefile* |
---|
1180 | @echo -------------------------------------------------------------------------------- |
---|
1181 | @echo "Updating $@ (if this fails, check manually)" |
---|
1182 | SOURCE_TOOLS/update_config_makefile.pl |
---|
1183 | @echo "Sucessfully updated $@" |
---|
1184 | @echo -------------------------------------------------------------------------------- |
---|
1185 | @ls -al config.makefile* |
---|
1186 | @echo -------------------------------------------------------------------------------- |
---|
1187 | @echo "Diff to your old config.makefile:" |
---|
1188 | @echo -------------------------------------------------------------------------------- |
---|
1189 | -diff $@.bak $@ |
---|
1190 | @echo -------------------------------------------------------------------------------- |
---|
1191 | endif |
---|
1192 | |
---|
1193 | # check if everything is configured correctly |
---|
1194 | |
---|
1195 | check_DEVELOPER: |
---|
1196 | ifndef DEVELOPER |
---|
1197 | @echo 'config.makefile:1: DEVELOPER not defined' |
---|
1198 | @false |
---|
1199 | endif |
---|
1200 | |
---|
1201 | check_DEBUG: |
---|
1202 | ifndef dflags |
---|
1203 | @echo 'config.makefile:1: DEBUG has to be defined. Valid values are 0 and 1' |
---|
1204 | @false |
---|
1205 | endif |
---|
1206 | |
---|
1207 | check_ARB_64: |
---|
1208 | ifndef ARB_64 |
---|
1209 | @echo 'config.makefile:1: ARB_64 has to be defined. Valid values are 0 and 1' |
---|
1210 | @false |
---|
1211 | endif |
---|
1212 | |
---|
1213 | # ---------------------------------------- check gcc version |
---|
1214 | |
---|
1215 | COMPILER_BROKEN:=0 |
---|
1216 | |
---|
1217 | ifeq ('$(COMPILER_VERSION_ALLOWED)', '4.6.4') |
---|
1218 | COMPILER_BROKEN:=1 |
---|
1219 | endif |
---|
1220 | ifeq ('$(COMPILER_VERSION_ALLOWED)', '4.8.0') |
---|
1221 | COMPILER_BROKEN:=1 |
---|
1222 | endif |
---|
1223 | |
---|
1224 | check_same_GCC_VERSION: |
---|
1225 | $(ARBHOME)/SOURCE_TOOLS/check_same_compiler_version.pl $(COMPILER_NAME) $(COMPILER_VERSION_ALLOWED) |
---|
1226 | |
---|
1227 | check_GCC_VERSION: |
---|
1228 | @echo 'Compiler version check:' |
---|
1229 | # see .@ALLOWED_gcc_VERSIONS |
---|
1230 | ifeq ('$(COMPILER_VERSION_ALLOWED)', '') |
---|
1231 | @echo " - Your compiler is '$(COMPILER_NAME)' version '$(COMPILER_VERSION)'" |
---|
1232 | @echo ' This version is not in the list of supported $(COMPILER_NAME)-versions:' |
---|
1233 | @$(foreach version,$(ALLOWED_COMPILER_VERSIONS),echo ' * $(version)';) |
---|
1234 | @echo ' - You may either ..' |
---|
1235 | @echo ' - add your version to ALLOWED_$(COMPILER_NAME)_VERSIONS in the Makefile and try it out or' |
---|
1236 | @echo ' - switch to one of the allowed versions (see arb_README_gcc.txt for installing' |
---|
1237 | @echo ' a different version of gcc)' |
---|
1238 | $(error Unsupported compiler '$(COMPILER_NAME)' version '$(COMPILER_VERSION)') |
---|
1239 | else |
---|
1240 | ifeq ($(COMPILER_BROKEN),1) |
---|
1241 | $(error compilation refused for $(COMPILER_NAME) version '$(COMPILER_VERSION_ALLOWED)'. Refer to http://bugs.arb-home.de/wiki/GccVersionInfo for details.) |
---|
1242 | else |
---|
1243 | @echo " - Supported $(COMPILER_NAME) version '$(COMPILER_VERSION_ALLOWED)' detected - fine!" |
---|
1244 | @echo '' |
---|
1245 | ifeq ($(USE_CLANG),1) |
---|
1246 | @echo "Dump clang version:" |
---|
1247 | $(A_CXX) -v |
---|
1248 | endif |
---|
1249 | $(MAKE) check_same_GCC_VERSION |
---|
1250 | endif |
---|
1251 | endif |
---|
1252 | |
---|
1253 | #---------------------- check ARBHOME |
---|
1254 | |
---|
1255 | # use arb_INSTALL.txt to determine whether ARBHOME points to correct directory |
---|
1256 | ARB_INSTALL_FOUND=$(wildcard $(ARBHOME)/arb_INSTALL.txt) |
---|
1257 | |
---|
1258 | check_ARBHOME: |
---|
1259 | ifeq ($(strip $(ARB_INSTALL_FOUND)),) |
---|
1260 | @echo ------------------------------------------------------------ |
---|
1261 | @echo "ARBHOME is set to '$(ARBHOME)'" |
---|
1262 | @echo "The environment variable ARBHOME has to point to the top arb source directory." |
---|
1263 | @echo "If you use bash enter:" |
---|
1264 | @echo " export ARBHOME='`pwd`'" |
---|
1265 | @echo ------------------------------------------------------------ |
---|
1266 | @false |
---|
1267 | endif |
---|
1268 | |
---|
1269 | ARB_PATH_SET=$(findstring $(ARBHOME)/bin,$(PATH)) |
---|
1270 | |
---|
1271 | check_PATH: check_ARBHOME |
---|
1272 | ifeq ($(strip $(ARB_PATH_SET)),) |
---|
1273 | @echo ------------------------------------------------------------ |
---|
1274 | @echo "The environment variable PATH has to contain $(ARBHOME)/bin" |
---|
1275 | @echo "If you use bash enter:" |
---|
1276 | @echo ' export PATH=$$ARBHOME/bin:$$PATH' |
---|
1277 | @echo ------------------------------------------------------------ |
---|
1278 | @false |
---|
1279 | endif |
---|
1280 | |
---|
1281 | check_TOOLS: |
---|
1282 | @util/arb_check_build_env.pl \ |
---|
1283 | "$(A_CC)" \ |
---|
1284 | "$(A_CXX)" \ |
---|
1285 | "$(LINK_SHARED_LIB)" \ |
---|
1286 | |
---|
1287 | have_makedepend: |
---|
1288 | @util/arb_check_build_env.pl --check-only "$(MAKEDEPEND_PLAIN)" |
---|
1289 | |
---|
1290 | check_ENVIRONMENT : check_PATH check_TOOLS |
---|
1291 | @echo "-------------------- Environment [start]" |
---|
1292 | @echo "ARBHOME='$(ARBHOME)'" |
---|
1293 | @echo "PATH='$(PATH)'" |
---|
1294 | @echo "LD_LIBRARY_PATH='$(LD_LIBRARY_PATH)'" |
---|
1295 | @echo "-------------------- Environment [end]" |
---|
1296 | |
---|
1297 | check_tabs: check_setup |
---|
1298 | ifeq ($(DEBUG),1) |
---|
1299 | @SOURCE_TOOLS/tabBrake.pl |
---|
1300 | endif |
---|
1301 | |
---|
1302 | force_tab_check: |
---|
1303 | @touch -t 198001010000 SOURCE_TOOLS/stamp.tabBrake |
---|
1304 | @$(MAKE) check_tabs |
---|
1305 | |
---|
1306 | |
---|
1307 | # --------------------- |
---|
1308 | |
---|
1309 | check_setup: check_ENVIRONMENT check_DEBUG check_ARB_64 check_DEVELOPER check_GCC_VERSION |
---|
1310 | @echo Your setup seems to be ok. |
---|
1311 | |
---|
1312 | checks: check_setup check_tabs |
---|
1313 | @rm -f SOURCE_TOOLS/postcompile.sav |
---|
1314 | |
---|
1315 | |
---|
1316 | # end test section ------------------------------ |
---|
1317 | |
---|
1318 | # --------------------------------------- |
---|
1319 | # List of standard top level directories |
---|
1320 | # |
---|
1321 | # sub-makefiles have to define the targets |
---|
1322 | # - 'depends' and |
---|
1323 | # - 'clean' |
---|
1324 | # |
---|
1325 | # when adding new libraries/subdirs here, also add a dependency vs 'links' or 'links_non_perl' in .@DD_links_non_perl |
---|
1326 | |
---|
1327 | TL_ARCHIVES = \ |
---|
1328 | AISC/AISC.a \ |
---|
1329 | ARB_GDE/ARB_GDE.a \ |
---|
1330 | AWTC/AWTC.a \ |
---|
1331 | AWTI/AWTI.a \ |
---|
1332 | CONSENSUS_TREE/CONSENSUS_TREE.a \ |
---|
1333 | CONVERTALN/CONVERTALN.a \ |
---|
1334 | DBSERVER/DBSERVER.a \ |
---|
1335 | DIST/DIST.a \ |
---|
1336 | EDIT4/EDIT4.a \ |
---|
1337 | EISPACK/EISPACK.a \ |
---|
1338 | GENOM/GENOM.a \ |
---|
1339 | GENOM_IMPORT/GENOM_IMPORT.a \ |
---|
1340 | ISLAND_HOPPING/ISLAND_HOPPING.a \ |
---|
1341 | MERGE/MERGE.a \ |
---|
1342 | MULTI_PROBE/MULTI_PROBE.a \ |
---|
1343 | NALIGNER/NALIGNER.a \ |
---|
1344 | NAMES/NAMES.a \ |
---|
1345 | NAMES_COM/server.a \ |
---|
1346 | NTREE/NTREE.a \ |
---|
1347 | PARSIMONY/PARSIMONY.a \ |
---|
1348 | PHYLO/PHYLO.a \ |
---|
1349 | PRIMER_DESIGN/PRIMER_DESIGN.a \ |
---|
1350 | PROBE/PROBE.a \ |
---|
1351 | PROBE_COM/server.a \ |
---|
1352 | PROBE_DESIGN/PROBE_DESIGN.a \ |
---|
1353 | $(RNA3D_LIB) \ |
---|
1354 | RNACMA/RNACMA.a \ |
---|
1355 | SECEDIT/SECEDIT.a \ |
---|
1356 | SEQ_QUALITY/SEQ_QUALITY.a \ |
---|
1357 | SERVERCNTRL/SERVERCNTRL.a \ |
---|
1358 | STAT/STAT.a \ |
---|
1359 | TREEGEN/TREEGEN.a \ |
---|
1360 | WETC/WETC.a \ |
---|
1361 | XML/XML.a \ |
---|
1362 | |
---|
1363 | TL_SHARED_ARCHIVES = \ |
---|
1364 | ARBDB/libARBDB.so \ |
---|
1365 | CORE/libCORE.so \ |
---|
1366 | AWT/libAWT.so \ |
---|
1367 | WINDOW/libWINDOW.so \ |
---|
1368 | |
---|
1369 | TL_ARCHIV_COLLECTIONS = \ |
---|
1370 | SL/SL.archColl \ |
---|
1371 | |
---|
1372 | TL_TOOLS_COLLECTIONS = \ |
---|
1373 | AISC_MKPTPS/AISC_MKPTPS.toolColl \ |
---|
1374 | TOOLS/TOOLS.toolColl \ |
---|
1375 | PERLTOOLS/PERLTOOLS.toolColl \ |
---|
1376 | PROBE_SET/PROBE_SET.toolColl \ |
---|
1377 | READSEQ/READSEQ.toolColl \ |
---|
1378 | |
---|
1379 | RECURSIVE_SUBS = \ |
---|
1380 | GDE/GDE.sub \ |
---|
1381 | UNIT_TESTER/UNIT_TESTER.sub \ |
---|
1382 | |
---|
1383 | SUBDIRS = \ |
---|
1384 | $(RECURSIVE_SUBS) \ |
---|
1385 | $(TL_ARCHIVES:.a=.sub) \ |
---|
1386 | $(TL_SHARED_ARCHIVES:.so=.sub) \ |
---|
1387 | $(TL_ARCHIV_COLLECTIONS:.archColl=.sub) \ |
---|
1388 | $(TL_TOOLS_COLLECTIONS:.toolColl=.sub) \ |
---|
1389 | |
---|
1390 | # sub directories inside TL_ARCHIV_COLLECTIONS |
---|
1391 | CL_ARCH_DIRS = $(foreach coll,$(TL_ARCHIV_COLLECTIONS),$(shell find $(dir $(coll)) -maxdepth 1 -mindepth 1 -type d)) |
---|
1392 | |
---|
1393 | # archives inside CL_ARCH_DIRS: |
---|
1394 | CL_ARCHIVES = $(foreach adir,$(CL_ARCH_DIRS),$(dir $(adir))$(notdir $(adir))/$(notdir $(adir)).a) |
---|
1395 | |
---|
1396 | # ----------------------- |
---|
1397 | # library packets |
---|
1398 | |
---|
1399 | ARCHS_CLIENT_PROBE = PROBE_COM/client.a |
---|
1400 | ARCHS_CLIENT_NAMES = NAMES_COM/client.a |
---|
1401 | |
---|
1402 | ARCHS_MAKEBIN = AISC_MKPTPS/AISC_MKPTPS.a AISC/AISC.a |
---|
1403 | |
---|
1404 | # communication libs need aisc and aisc_mkpts: |
---|
1405 | |
---|
1406 | AISC/AISC.dummy: proto_tools |
---|
1407 | |
---|
1408 | comtools: AISC/AISC.dummy |
---|
1409 | |
---|
1410 | ARCHS_SEQUENCE = \ |
---|
1411 | SL/SEQUENCE/SEQUENCE.a \ |
---|
1412 | SL/ALIVIEW/ALIVIEW.a \ |
---|
1413 | SL/PRONUC/PRONUC.a \ |
---|
1414 | |
---|
1415 | ARCHS_TREE = \ |
---|
1416 | SL/ARB_TREE/ARB_TREE.a \ |
---|
1417 | SL/FILTER/FILTER.a \ |
---|
1418 | $(ARCHS_SEQUENCE) \ |
---|
1419 | |
---|
1420 | # parsimony tree (used by NTREE, PARSIMONY, STAT(->EDIT4), DIST(obsolete!)) |
---|
1421 | ARCHS_AP_TREE = \ |
---|
1422 | SL/AP_TREE/AP_TREE.a \ |
---|
1423 | $(ARCHS_TREE) \ |
---|
1424 | |
---|
1425 | # -------------------------------------------------------------------------------- |
---|
1426 | # dependencies for linking shared libs |
---|
1427 | |
---|
1428 | link_core: core |
---|
1429 | link_db: db link_core |
---|
1430 | link_aw: aw link_db |
---|
1431 | link_awt: awt link_aw |
---|
1432 | |
---|
1433 | #*************************************************************************************** |
---|
1434 | # Individual_Programs_Section |
---|
1435 | #*************************************************************************************** |
---|
1436 | |
---|
1437 | arbmainwrapper: |
---|
1438 | $(MAKE) -C SOURCE_TOOLS -r mainwrapper |
---|
1439 | |
---|
1440 | |
---|
1441 | #*********************************** arb_ntree ************************************** |
---|
1442 | NTREE = bin/arb_ntree |
---|
1443 | ARCHS_NTREE = \ |
---|
1444 | NTREE/NTREE.a \ |
---|
1445 | ARB_GDE/ARB_GDE.a \ |
---|
1446 | SL/GROUP_SEARCH/GROUP_SEARCH.a \ |
---|
1447 | SL/SAICALC/SAICALC.a \ |
---|
1448 | SL/DB_UI/DB_UI.a \ |
---|
1449 | AWTC/AWTC.a \ |
---|
1450 | AWTI/AWTI.a \ |
---|
1451 | CONSENSUS_TREE/CONSENSUS_TREE.a \ |
---|
1452 | GENOM_IMPORT/GENOM_IMPORT.a \ |
---|
1453 | GENOM/GENOM.a \ |
---|
1454 | MERGE/MERGE.a \ |
---|
1455 | MULTI_PROBE/MULTI_PROBE.a \ |
---|
1456 | PRIMER_DESIGN/PRIMER_DESIGN.a \ |
---|
1457 | PROBE_DESIGN/PROBE_DESIGN.a \ |
---|
1458 | SEQ_QUALITY/SEQ_QUALITY.a \ |
---|
1459 | SERVERCNTRL/SERVERCNTRL.a \ |
---|
1460 | SL/ALILINK/ALILINK.a \ |
---|
1461 | SL/AW_NAME/AW_NAME.a \ |
---|
1462 | SL/CONSENSUS/CONSENSUS.a \ |
---|
1463 | SL/DB_SCANNER/DB_SCANNER.a \ |
---|
1464 | SL/DB_QUERY/DB_QUERY.a \ |
---|
1465 | SL/QUERY/QUERY.a \ |
---|
1466 | SL/SEQIO/SEQIO.a \ |
---|
1467 | STAT/STAT.a \ |
---|
1468 | SL/GUI_ALIVIEW/GUI_ALIVIEW.a \ |
---|
1469 | SL/HELIX/HELIX.a \ |
---|
1470 | SL/REGEXPR/REGEXPR.a \ |
---|
1471 | SL/REFENTRIES/REFENTRIES.a \ |
---|
1472 | SL/NDS/NDS.a \ |
---|
1473 | SL/ITEM_SHADER/ITEM_SHADER.a \ |
---|
1474 | SL/ITEMS/ITEMS.a \ |
---|
1475 | SL/INSDEL/INSDEL.a \ |
---|
1476 | SL/LOCATION/LOCATION.a \ |
---|
1477 | SL/MACROS/MACROS.a \ |
---|
1478 | SL/PVP/PVP.a \ |
---|
1479 | SL/TRANSLATE/TRANSLATE.a \ |
---|
1480 | SL/TREEDISP/TREEDISP.a \ |
---|
1481 | SL/TREE_ADMIN/TREE_ADMIN.a \ |
---|
1482 | SL/TREE_READ/TREE_READ.a \ |
---|
1483 | SL/TREE_WRITE/TREE_WRITE.a \ |
---|
1484 | SL/XFERGUI/XFERGUI.a \ |
---|
1485 | SL/XFERSET/XFERSET.a \ |
---|
1486 | XML/XML.a \ |
---|
1487 | $(ARCHS_AP_TREE) \ |
---|
1488 | |
---|
1489 | ARCHS_NTREE_ALL = $(ARCHS_NTREE) $(ARCHS_CLIENT_PROBE) $(GUI_LIBS) $(XMLLIBS) |
---|
1490 | |
---|
1491 | $(NTREE): $(ARCHS_NTREE:.a=.dummy) link_awt |
---|
1492 | @SOURCE_TOOLS/binuptodate.pl $@ $(use_ARB_main) $(ARCHS_NTREE_ALL) || ( \ |
---|
1493 | echo "$(SEP) Link $@"; \ |
---|
1494 | echo "$(LINK_EXECUTABLE) $@ $(use_ARB_main) $(LIBPATH) $(ARCHS_NTREE_ALL)" ; \ |
---|
1495 | $(LINK_EXECUTABLE) $@ $(use_ARB_main) $(LIBPATH) $(ARCHS_NTREE_ALL) && \ |
---|
1496 | echo "$(SEP) Link $@ [done]"; \ |
---|
1497 | ) |
---|
1498 | |
---|
1499 | #*********************************** arb_edit4 ************************************** |
---|
1500 | EDIT4 = bin/arb_edit4 |
---|
1501 | |
---|
1502 | ARCHS_EDIT4 := \ |
---|
1503 | EDIT4/EDIT4.a \ |
---|
1504 | ARB_GDE/ARB_GDE.a \ |
---|
1505 | SL/FAST_ALIGNER/FAST_ALIGNER.a \ |
---|
1506 | AWTC/AWTC.a \ |
---|
1507 | ISLAND_HOPPING/ISLAND_HOPPING.a \ |
---|
1508 | SECEDIT/SECEDIT.a \ |
---|
1509 | SERVERCNTRL/SERVERCNTRL.a \ |
---|
1510 | SL/AW_HELIX/AW_HELIX.a \ |
---|
1511 | SL/AW_NAME/AW_NAME.a \ |
---|
1512 | SL/CONSENSUS/CONSENSUS.a \ |
---|
1513 | SL/ITEMS/ITEMS.a \ |
---|
1514 | STAT/STAT.a \ |
---|
1515 | SL/GUI_ALIVIEW/GUI_ALIVIEW.a \ |
---|
1516 | SL/HELIX/HELIX.a \ |
---|
1517 | SL/TRANSLATE/TRANSLATE.a \ |
---|
1518 | SL/MACROS/MACROS.a \ |
---|
1519 | SL/NDS/NDS.a \ |
---|
1520 | $(ARCHS_AP_TREE) \ |
---|
1521 | XML/XML.a \ |
---|
1522 | |
---|
1523 | ifeq ($(OPENGL),1) |
---|
1524 | ARCHS_EDIT4 += RNA3D/RNA3D.a |
---|
1525 | endif |
---|
1526 | |
---|
1527 | ARCHS_EDIT4_ALL = $(ARCHS_EDIT4) $(ARCHS_CLIENT_NAMES) $(GUI_LIBS) $(LIBS_EDIT4) |
---|
1528 | |
---|
1529 | LIBS_EDIT4 := $(GL_LIBS) |
---|
1530 | |
---|
1531 | $(EDIT4): $(ARCHS_EDIT4:.a=.dummy) link_awt |
---|
1532 | @SOURCE_TOOLS/binuptodate.pl $@ $(use_ARB_main) $(ARCHS_EDIT4_ALL) || ( \ |
---|
1533 | echo "$(SEP) Link $@"; \ |
---|
1534 | echo "$(LINK_EXECUTABLE) $@ $(use_ARB_main) $(LIBPATH) $(ARCHS_EDIT4_ALL)" ; \ |
---|
1535 | $(LINK_EXECUTABLE) $@ $(use_ARB_main) $(LIBPATH) $(ARCHS_EDIT4_ALL) && \ |
---|
1536 | echo "$(SEP) Link $@ [done]"; \ |
---|
1537 | ) |
---|
1538 | |
---|
1539 | #*********************************** arb_rnacma ************************************** |
---|
1540 | RNACMA = bin/arb_rnacma |
---|
1541 | ARCHS_RNACMA = \ |
---|
1542 | RNACMA/RNACMA.a \ |
---|
1543 | |
---|
1544 | ARCHS_RNACMA_ALL = $(ARCHS_RNACMA) $(DBSYS_LIBS) |
---|
1545 | |
---|
1546 | $(RNACMA) : $(ARCHS_RNACMA:.a=.dummy) link_db |
---|
1547 | @SOURCE_TOOLS/binuptodate.pl $@ $(ARCHS_RNACMA_ALL) || ( \ |
---|
1548 | echo "$(SEP) Link $@"; \ |
---|
1549 | echo "$(LINK_EXECUTABLE) $@ $(use_ARB_main) $(LIBPATH) $(ARCHS_RNACMA_ALL)"; \ |
---|
1550 | $(LINK_EXECUTABLE) $@ $(use_ARB_main) $(LIBPATH) $(ARCHS_RNACMA_ALL) && \ |
---|
1551 | echo "$(SEP) Link $@ [done]"; \ |
---|
1552 | ) |
---|
1553 | |
---|
1554 | #*********************************** arb_wetc ************************************** |
---|
1555 | WETC = bin/arb_wetc |
---|
1556 | ARCHS_WETC = \ |
---|
1557 | WETC/WETC.a \ |
---|
1558 | SL/HELIX/HELIX.a \ |
---|
1559 | SL/FILTER/FILTER.a \ |
---|
1560 | XML/XML.a \ |
---|
1561 | |
---|
1562 | ARCHS_WETC_ALL = $(ARCHS_WETC) $(GUI_LIBS) |
---|
1563 | |
---|
1564 | $(WETC): $(ARCHS_WETC:.a=.dummy) link_awt |
---|
1565 | @SOURCE_TOOLS/binuptodate.pl $@ $(use_ARB_main) $(ARCHS_WETC_ALL) || ( \ |
---|
1566 | echo "$(SEP) Link $@"; \ |
---|
1567 | echo "$(LINK_EXECUTABLE) $@ $(use_ARB_main) $(LIBPATH) $(ARCHS_WETC_ALL)" ; \ |
---|
1568 | $(LINK_EXECUTABLE) $@ $(use_ARB_main) $(LIBPATH) $(ARCHS_WETC_ALL) && \ |
---|
1569 | echo "$(SEP) Link $@ [done]"; \ |
---|
1570 | ) |
---|
1571 | |
---|
1572 | #*********************************** arb_dist ************************************** |
---|
1573 | DIST = bin/arb_dist |
---|
1574 | ARCHS_DIST = \ |
---|
1575 | DIST/DIST.a \ |
---|
1576 | CONSENSUS_TREE/CONSENSUS_TREE.a \ |
---|
1577 | EISPACK/EISPACK.a \ |
---|
1578 | SERVERCNTRL/SERVERCNTRL.a \ |
---|
1579 | SL/GUI_ALIVIEW/GUI_ALIVIEW.a \ |
---|
1580 | SL/HELIX/HELIX.a \ |
---|
1581 | SL/MATRIX/MATRIX.a \ |
---|
1582 | SL/MACROS/MACROS.a \ |
---|
1583 | SL/NDS/NDS.a \ |
---|
1584 | SL/ITEMS/ITEMS.a \ |
---|
1585 | SL/NEIGHBOURJOIN/NEIGHBOURJOIN.a \ |
---|
1586 | XML/XML.a \ |
---|
1587 | $(ARCHS_AP_TREE) \ |
---|
1588 | |
---|
1589 | ARCHS_DIST_ALL = $(ARCHS_DIST) $(ARCHS_CLIENT_PROBE) $(GUI_LIBS) |
---|
1590 | |
---|
1591 | $(DIST): $(ARCHS_DIST:.a=.dummy) link_awt |
---|
1592 | @SOURCE_TOOLS/binuptodate.pl $@ $(use_ARB_main) $(ARCHS_DIST_ALL) || ( \ |
---|
1593 | echo "$(SEP) Link $@"; \ |
---|
1594 | echo "$(LINK_EXECUTABLE) $@ $(use_ARB_main) $(LIBPATH) $(ARCHS_DIST_ALL)" ; \ |
---|
1595 | $(LINK_EXECUTABLE) $@ $(use_ARB_main) $(LIBPATH) $(ARCHS_DIST_ALL) && \ |
---|
1596 | echo "$(SEP) Link $@ [done]"; \ |
---|
1597 | ) |
---|
1598 | |
---|
1599 | #*********************************** arb_pars ************************************** |
---|
1600 | PARSIMONY = bin/arb_pars |
---|
1601 | ARCHS_PARSIMONY = \ |
---|
1602 | PARSIMONY/PARSIMONY.a \ |
---|
1603 | SERVERCNTRL/SERVERCNTRL.a \ |
---|
1604 | SL/AW_NAME/AW_NAME.a \ |
---|
1605 | SL/GUI_ALIVIEW/GUI_ALIVIEW.a \ |
---|
1606 | SL/HELIX/HELIX.a \ |
---|
1607 | SL/MACROS/MACROS.a \ |
---|
1608 | SL/NDS/NDS.a \ |
---|
1609 | SL/ITEMS/ITEMS.a \ |
---|
1610 | SL/TRANSLATE/TRANSLATE.a \ |
---|
1611 | SL/TREEDISP/TREEDISP.a \ |
---|
1612 | XML/XML.a \ |
---|
1613 | $(ARCHS_AP_TREE) \ |
---|
1614 | |
---|
1615 | ARCHS_PARSIMONY_ALL = $(ARCHS_PARSIMONY) $(ARCHS_CLIENT_NAMES) $(GUI_LIBS) |
---|
1616 | |
---|
1617 | $(PARSIMONY): $(ARCHS_PARSIMONY:.a=.dummy) link_awt |
---|
1618 | @SOURCE_TOOLS/binuptodate.pl $@ $(use_ARB_main) $(ARCHS_PARSIMONY_ALL) || ( \ |
---|
1619 | echo "$(SEP) Link $@"; \ |
---|
1620 | echo "$(LINK_EXECUTABLE) $@ $(use_ARB_main) $(LIBPATH) $(ARCHS_PARSIMONY_ALL)" ; \ |
---|
1621 | $(LINK_EXECUTABLE) $@ $(use_ARB_main) $(LIBPATH) $(ARCHS_PARSIMONY_ALL) && \ |
---|
1622 | echo "$(SEP) Link $@ [done]"; \ |
---|
1623 | ) |
---|
1624 | |
---|
1625 | #*********************************** arb_convert_aln ************************************** |
---|
1626 | CONVERT_ALN = bin/arb_convert_aln |
---|
1627 | ARCHS_CONVERT_ALN = \ |
---|
1628 | CONVERTALN/CONVERTALN.a \ |
---|
1629 | |
---|
1630 | ARCHS_CONVERT_ALN_ALL = $(ARCHS_CONVERT_ALN) $(DBSYS_LIBS) |
---|
1631 | |
---|
1632 | $(CONVERT_ALN) : $(ARCHS_CONVERT_ALN:.a=.dummy) link_db |
---|
1633 | @SOURCE_TOOLS/binuptodate.pl $@ $(use_ARB_main) $(ARCHS_CONVERT_ALN_ALL) || ( \ |
---|
1634 | echo "$(SEP) Link $@"; \ |
---|
1635 | echo "$(LINK_EXECUTABLE) $@ $(use_ARB_main) $(LIBPATH) $(ARCHS_CONVERT_ALN_ALL)"; \ |
---|
1636 | $(LINK_EXECUTABLE) $@ $(use_ARB_main) $(LIBPATH) $(ARCHS_CONVERT_ALN_ALL) && \ |
---|
1637 | echo "$(SEP) Link $@ [done]"; \ |
---|
1638 | ) |
---|
1639 | |
---|
1640 | #*********************************** arb_treegen ************************************** |
---|
1641 | |
---|
1642 | TREEGEN = bin/arb_treegen |
---|
1643 | ARCHS_TREEGEN = \ |
---|
1644 | TREEGEN/TREEGEN.a \ |
---|
1645 | |
---|
1646 | ARCHS_TREEGEN_ALL = $(ARCHS_TREEGEN) |
---|
1647 | |
---|
1648 | $(TREEGEN) : $(ARCHS_TREEGEN:.a=.dummy) |
---|
1649 | @SOURCE_TOOLS/binuptodate.pl $@ $(use_ARB_main_C) $(ARCHS_TREEGEN_ALL) || ( \ |
---|
1650 | echo "$(SEP) Link $@"; \ |
---|
1651 | echo "$(LINK_EXECUTABLE) $@ $(use_ARB_main_C) $(LIBPATH) $(ARCHS_TREEGEN_ALL)" ; \ |
---|
1652 | $(LINK_EXECUTABLE) $@ $(use_ARB_main_C) $(LIBPATH) $(ARCHS_TREEGEN_ALL) && \ |
---|
1653 | echo "$(SEP) Link $@ [done]"; \ |
---|
1654 | ) |
---|
1655 | |
---|
1656 | #*********************************** arb_naligner ************************************** |
---|
1657 | NALIGNER = bin/arb_naligner |
---|
1658 | ARCHS_NALIGNER = \ |
---|
1659 | NALIGNER/NALIGNER.a \ |
---|
1660 | SERVERCNTRL/SERVERCNTRL.a \ |
---|
1661 | SL/HELIX/HELIX.a \ |
---|
1662 | |
---|
1663 | ARCHS_NALIGNER_ALL = $(ARCHS_NALIGNER) $(ARCHS_CLIENT_PROBE) $(DBSYS_LIBS) |
---|
1664 | |
---|
1665 | $(NALIGNER): $(ARCHS_NALIGNER:.a=.dummy) link_db |
---|
1666 | @SOURCE_TOOLS/binuptodate.pl $@ $(use_ARB_main) $(ARCHS_NALIGNER_ALL) || ( \ |
---|
1667 | echo "$(SEP) Link $@"; \ |
---|
1668 | echo "$(LINK_EXECUTABLE) $@ $(use_ARB_main) $(LIBPATH) $(ARCHS_NALIGNER_ALL)" ; \ |
---|
1669 | $(LINK_EXECUTABLE) $@ $(use_ARB_main) $(LIBPATH) $(ARCHS_NALIGNER_ALL) && \ |
---|
1670 | echo "$(SEP) Link $@ [done]"; \ |
---|
1671 | ) |
---|
1672 | |
---|
1673 | #*********************************** arb_phylo ************************************** |
---|
1674 | PHYLO = bin/arb_phylo |
---|
1675 | ARCHS_PHYLO = \ |
---|
1676 | PHYLO/PHYLO.a \ |
---|
1677 | SL/HELIX/HELIX.a \ |
---|
1678 | SL/FILTER/FILTER.a \ |
---|
1679 | SL/MACROS/MACROS.a \ |
---|
1680 | XML/XML.a \ |
---|
1681 | |
---|
1682 | ARCHS_PHYLO_ALL = $(ARCHS_PHYLO) $(GUI_LIBS) |
---|
1683 | |
---|
1684 | $(PHYLO): $(ARCHS_PHYLO:.a=.dummy) link_awt |
---|
1685 | @SOURCE_TOOLS/binuptodate.pl $@ $(use_ARB_main) $(ARCHS_PHYLO_ALL) || ( \ |
---|
1686 | echo "$(SEP) Link $@"; \ |
---|
1687 | echo "$(LINK_EXECUTABLE) $@ $(use_ARB_main) $(LIBPATH) $(ARCHS_PHYLO_ALL)" ; \ |
---|
1688 | $(LINK_EXECUTABLE) $@ $(use_ARB_main) $(LIBPATH) $(ARCHS_PHYLO_ALL) && \ |
---|
1689 | echo "$(SEP) Link $@ [done]"; \ |
---|
1690 | ) |
---|
1691 | |
---|
1692 | #*************************************************************************************** |
---|
1693 | # SERVER SECTION |
---|
1694 | #*************************************************************************************** |
---|
1695 | |
---|
1696 | #*********************************** arb_db_server ************************************** |
---|
1697 | DBSERVER = bin/arb_db_server |
---|
1698 | ARCHS_DBSERVER = \ |
---|
1699 | DBSERVER/DBSERVER.a \ |
---|
1700 | SERVERCNTRL/SERVERCNTRL.a \ |
---|
1701 | |
---|
1702 | ARCHS_DBSERVER_ALL = $(ARCHS_DBSERVER) $(ARBDB_LIB) $(ARCHS_CLIENT_PROBE) $(SYSLIBS) |
---|
1703 | |
---|
1704 | $(DBSERVER): $(ARCHS_DBSERVER:.a=.dummy) link_db |
---|
1705 | @SOURCE_TOOLS/binuptodate.pl $@ $(use_ARB_main) $(ARCHS_DBSERVER_ALL) || ( \ |
---|
1706 | echo "$(SEP) Link $@"; \ |
---|
1707 | echo "$(LINK_EXECUTABLE) $@ $(use_ARB_main) $(LIBPATH) $(ARCHS_DBSERVER_ALL)" ; \ |
---|
1708 | $(LINK_EXECUTABLE) $@ $(use_ARB_main) $(LIBPATH) $(ARCHS_DBSERVER_ALL) && \ |
---|
1709 | echo "$(SEP) Link $@ [done]"; \ |
---|
1710 | ) |
---|
1711 | |
---|
1712 | #*********************************** arb_pt_server ************************************** |
---|
1713 | PROBE = bin/arb_pt_server |
---|
1714 | |
---|
1715 | ARCHS_PROBE_DEPEND = \ |
---|
1716 | PROBE/PROBE.a \ |
---|
1717 | SL/PTCLEAN/PTCLEAN.a \ |
---|
1718 | SERVERCNTRL/SERVERCNTRL.a \ |
---|
1719 | SL/HELIX/HELIX.a \ |
---|
1720 | |
---|
1721 | ARCHS_PROBE_ALL = $(ARCHS_PROBE_DEPEND) $(ARCHS_CLIENT_PROBE) $(ARBDB_LIB) $(SYSLIBS) |
---|
1722 | |
---|
1723 | $(PROBE): $(ARCHS_PROBE_DEPEND:.a=.dummy) link_db |
---|
1724 | @SOURCE_TOOLS/binuptodate.pl $@ $(use_ARB_main) config.makefile $(ARCHS_PROBE_ALL) || ( \ |
---|
1725 | echo "$(SEP) Link $@"; \ |
---|
1726 | echo "$(LINK_EXECUTABLE) $@ $(use_ARB_main) $(LIBPATH) $(ARCHS_PROBE_ALL)" ; \ |
---|
1727 | $(LINK_EXECUTABLE) $@ $(use_ARB_main) $(LIBPATH) $(ARCHS_PROBE_ALL) && \ |
---|
1728 | echo "$(SEP) Link $@ [done]"; \ |
---|
1729 | ) |
---|
1730 | |
---|
1731 | #*********************************** arb_name_server ************************************** |
---|
1732 | NAMES = bin/arb_name_server |
---|
1733 | ARCHS_NAMES = \ |
---|
1734 | NAMES/NAMES.a \ |
---|
1735 | SERVERCNTRL/SERVERCNTRL.a \ |
---|
1736 | |
---|
1737 | ARCHS_NAMES_ALL = $(ARCHS_NAMES) $(ARBDB_LIB) $(ARCHS_CLIENT_NAMES) NAMES_COM/server.a $(SYSLIBS) |
---|
1738 | |
---|
1739 | $(NAMES): $(ARCHS_NAMES:.a=.dummy) link_db |
---|
1740 | @SOURCE_TOOLS/binuptodate.pl $@ $(use_ARB_main) $(ARCHS_NAMES_ALL) || ( \ |
---|
1741 | echo "$(SEP) Link $@"; \ |
---|
1742 | echo "$(LINK_EXECUTABLE) $@ $(use_ARB_main) $(LIBPATH) $(ARCHS_NAMES_ALL)" ; \ |
---|
1743 | $(LINK_EXECUTABLE) $@ $(use_ARB_main) $(LIBPATH) $(ARCHS_NAMES_ALL) && \ |
---|
1744 | echo "$(SEP) Link $@ [done]"; \ |
---|
1745 | ) |
---|
1746 | |
---|
1747 | #*********************************** SHARED LIBRARIES SECTION ************************************** |
---|
1748 | |
---|
1749 | prepare_libdir: addlibs |
---|
1750 | |
---|
1751 | addlibs: |
---|
1752 | (perl $(ARBHOME)/SOURCE_TOOLS/provide_libs.pl \ |
---|
1753 | "arbhome=$(ARBHOME)" \ |
---|
1754 | "opengl=$(OPENGL)" \ |
---|
1755 | "link_static=$(LINK_STATIC)" \ |
---|
1756 | ) |
---|
1757 | |
---|
1758 | #*************************************************************************************** |
---|
1759 | # Recursive calls to sub-makefiles |
---|
1760 | #*************************************************************************************** |
---|
1761 | |
---|
1762 | %.depends: have_makedepend |
---|
1763 | @cp -p $(@D)/Makefile $(@D)/Makefile.old # save old Makefile |
---|
1764 | @$(MAKE) -C $(@D) -r \ |
---|
1765 | "AUTODEPENDS=1" \ |
---|
1766 | "MAIN=nothing" \ |
---|
1767 | "cflags=noCflagsHere_use_MAKEDEPENDFLAGS" \ |
---|
1768 | "cxxflags=noCxxflagsHere_use_MAKEDEPENDFLAGS" \ |
---|
1769 | depends |
---|
1770 | @grep "^# DO NOT DELETE" $(@D)/Makefile >/dev/null |
---|
1771 | @cat $(@D)/Makefile \ |
---|
1772 | | SOURCE_TOOLS/fix_depends.pl "(from main)" \ |
---|
1773 | >$(@D)/Makefile.2 |
---|
1774 | @mv $(@D)/Makefile.old $(@D)/Makefile # restore old Makefile |
---|
1775 | @$(ARBHOME)/SOURCE_TOOLS/mv_if_diff $(@D)/Makefile.2 $(@D)/Makefile # update Makefile if changed |
---|
1776 | |
---|
1777 | %.proto: |
---|
1778 | @($(MAKE) -C $(@D) \ |
---|
1779 | "AUTODEPENDS=0" \ |
---|
1780 | "MAIN=nothing" \ |
---|
1781 | "cflags=noCflags" \ |
---|
1782 | "cxxflags=noCxxflags" \ |
---|
1783 | proto 2>&1 ) | $(ARBHOME)/SOURCE_TOOLS/asan2msg.pl |
---|
1784 | |
---|
1785 | %.clean: |
---|
1786 | @$(MAKE) -C $(@D) \ |
---|
1787 | "AUTODEPENDS=0" \ |
---|
1788 | "MAIN=nothing" \ |
---|
1789 | "cflags=noCflags" \ |
---|
1790 | "cxxflags=noCxxflags" \ |
---|
1791 | clean |
---|
1792 | |
---|
1793 | |
---|
1794 | # stop wrong targets: |
---|
1795 | target_is_missing_lib_prefix: |
---|
1796 | @echo "Error: Denied to build shared library target with missing 'lib'-prefix" |
---|
1797 | false |
---|
1798 | |
---|
1799 | ARBDB/ARBDB.dummy: target_is_missing_lib_prefix |
---|
1800 | CORE/CORE.dummy: target_is_missing_lib_prefix |
---|
1801 | AWT/AWT.dummy: target_is_missing_lib_prefix |
---|
1802 | WINDOW/WINDOW.dummy: target_is_missing_lib_prefix |
---|
1803 | |
---|
1804 | # rule to generate main target (normally a library): |
---|
1805 | # @@@ check effect of setting LANG=C below |
---|
1806 | %.dummy: |
---|
1807 | @( export ID=$$$$; LANG=C; \ |
---|
1808 | (( \ |
---|
1809 | echo "$(SEP) Make $(@D)"; \ |
---|
1810 | $(MAKE) -C $(@D) -r \ |
---|
1811 | "AUTODEPENDS=1" \ |
---|
1812 | "MAIN=$(@F:.dummy=.a)" \ |
---|
1813 | "cflags=$(cflags) -DIN_ARB_$(subst /,_,$(@D))" \ |
---|
1814 | && \ |
---|
1815 | echo "$(SEP) Make $(@D) [done]"; \ |
---|
1816 | ) >$(@D).$$ID.log 2>&1 && (cat $(@D).$$ID.log;rm $(@D).$$ID.log)) || (cat $(@D).$$ID.log;rm $(@D).$$ID.log;false)) |
---|
1817 | |
---|
1818 | # Additional dependencies for subtargets: |
---|
1819 | |
---|
1820 | PROBE_COM/PROBE_COM.dummy : comtools |
---|
1821 | NAMES_COM/NAMES_COM.dummy : comtools |
---|
1822 | |
---|
1823 | com: PROBE_COM/PROBE_COM.dummy NAMES_COM/NAMES_COM.dummy |
---|
1824 | |
---|
1825 | # stop wrong more targets: |
---|
1826 | PROBE_COM/server.dummy: |
---|
1827 | @echo Unwanted request to make target $< |
---|
1828 | false |
---|
1829 | |
---|
1830 | PROBE_COM/client.dummy: |
---|
1831 | @echo Unwanted request to make target $< |
---|
1832 | false |
---|
1833 | |
---|
1834 | NAMES_COM/server.dummy: |
---|
1835 | @echo Unwanted request to make target $< |
---|
1836 | false |
---|
1837 | |
---|
1838 | NAMES_COM/client.dummy: |
---|
1839 | @echo Unwanted request to make target $< |
---|
1840 | false |
---|
1841 | |
---|
1842 | |
---|
1843 | ARBDB/libARBDB.dummy: links |
---|
1844 | CORE/libCORE.dummy: links |
---|
1845 | |
---|
1846 | PERLTOOLS/PERLTOOLS.dummy: core db |
---|
1847 | |
---|
1848 | # all subdirs perl not depends on go here (ADD_links_non_perl) |
---|
1849 | AWT/libAWT.dummy: links_non_perl |
---|
1850 | AWTI/AWTI.dummy: links_non_perl |
---|
1851 | CONSENSUS_TREE/CONSENSUS_TREE.dummy: links_non_perl |
---|
1852 | CONVERTALN/CONVERTALN.dummy: links_non_perl |
---|
1853 | DBSERVER/DBSERVER.dummy: links_non_perl |
---|
1854 | DIST/DIST.dummy: links_non_perl |
---|
1855 | EDIT4/EDIT4.dummy: links_non_perl com |
---|
1856 | EISPACK/EISPACK.dummy: links_non_perl |
---|
1857 | GDE/GDE.dummy: links_non_perl |
---|
1858 | GENOM/GENOM.dummy: links_non_perl |
---|
1859 | GENOM_IMPORT/GENOM_IMPORT.dummy: links_non_perl |
---|
1860 | ISLAND_HOPPING/ISLAND_HOPPING.dummy: links_non_perl |
---|
1861 | MERGE/MERGE.dummy: links_non_perl |
---|
1862 | NTREE/NTREE.dummy: links_non_perl |
---|
1863 | PARSIMONY/PARSIMONY.dummy: links_non_perl |
---|
1864 | PHYLO/PHYLO.dummy: links_non_perl |
---|
1865 | PRIMER_DESIGN/PRIMER_DESIGN.dummy: links_non_perl |
---|
1866 | PROBE_SET/PROBE_SET.dummy: links_non_perl link_db |
---|
1867 | READSEQ/READSEQ.dummy: links_non_perl |
---|
1868 | RNACMA/RNACMA.dummy: links_non_perl header_libs |
---|
1869 | SECEDIT/SECEDIT.dummy: links_non_perl |
---|
1870 | SEQ_QUALITY/SEQ_QUALITY.dummy: links_non_perl |
---|
1871 | SERVERCNTRL/SERVERCNTRL.dummy: links_non_perl com |
---|
1872 | SL/ALILINK/ALILINK.dummy: links_non_perl |
---|
1873 | SL/ALIVIEW/ALIVIEW.dummy: links_non_perl |
---|
1874 | SL/AP_TREE/AP_TREE.dummy: links_non_perl |
---|
1875 | SL/ARB_TREE/ARB_TREE.dummy: links_non_perl |
---|
1876 | SL/AW_HELIX/AW_HELIX.dummy: links_non_perl |
---|
1877 | SL/CONSENSUS/CONSENSUS.dummy: links_non_perl |
---|
1878 | SL/DB_QUERY/DB_QUERY.dummy: links_non_perl |
---|
1879 | SL/DB_SCANNER/DB_SCANNER.dummy: links_non_perl |
---|
1880 | SL/DB_UI/DB_UI.dummy: links_non_perl |
---|
1881 | SL/FAST_ALIGNER/FAST_ALIGNER.dummy: links_non_perl |
---|
1882 | SL/FILTER/FILTER.dummy: links_non_perl |
---|
1883 | SL/FILTSEQEXP/FILTSEQEXP.dummy: links_non_perl |
---|
1884 | SL/GROUP_SEARCH/GROUP_SEARCH.dummy: links_non_perl |
---|
1885 | SL/GUI_ALIVIEW/GUI_ALIVIEW.dummy: links_non_perl |
---|
1886 | SL/HEADERTESTS/HEADERTESTS.dummy: links_non_perl |
---|
1887 | SL/HELIX/HELIX.dummy: links_non_perl |
---|
1888 | SL/INSDEL/INSDEL.dummy: links_non_perl |
---|
1889 | SL/ITEM_SHADER/ITEM_SHADER.dummy: links_non_perl |
---|
1890 | SL/ITEMS/ITEMS.dummy: links_non_perl |
---|
1891 | SL/LOCATION/LOCATION.dummy: links_non_perl |
---|
1892 | SL/MACROS/MACROS.dummy: links_non_perl |
---|
1893 | SL/MATRIX/MATRIX.dummy: links_non_perl |
---|
1894 | SL/NDS/NDS.dummy: links_non_perl |
---|
1895 | SL/NEIGHBOURJOIN/NEIGHBOURJOIN.dummy: links_non_perl |
---|
1896 | SL/PRONUC/PRONUC.dummy: links_non_perl |
---|
1897 | SL/PTCLEAN/PTCLEAN.dummy: links_non_perl link_db |
---|
1898 | SL/PVP/PVP.dummy: links_non_perl |
---|
1899 | SL/QUERY/QUERY.dummy: links_non_perl link_db |
---|
1900 | SL/REFENTRIES/REFENTRIES.dummy: links_non_perl |
---|
1901 | SL/REGEXPR/REGEXPR.dummy: links_non_perl |
---|
1902 | SL/SAICALC/SAICALC.dummy: links_non_perl |
---|
1903 | SL/SEQIO/SEQIO.dummy: links_non_perl |
---|
1904 | SL/SEQUENCE/SEQUENCE.dummy: links_non_perl |
---|
1905 | SL/TRANSLATE/TRANSLATE.dummy: links_non_perl |
---|
1906 | SL/TREE_ADMIN/TREE_ADMIN.dummy: links_non_perl |
---|
1907 | SL/TREE_READ/TREE_READ.dummy: links_non_perl |
---|
1908 | SL/TREE_WRITE/TREE_WRITE.dummy: links_non_perl |
---|
1909 | SL/TREEDISP/TREEDISP.dummy: links_non_perl |
---|
1910 | SL/XFERGUI/XFERGUI.dummy: links_non_perl |
---|
1911 | SL/XFERSET/XFERSET.dummy: links_non_perl |
---|
1912 | STAT/STAT.dummy: links_non_perl |
---|
1913 | TREEGEN/TREEGEN.dummy: links_non_perl |
---|
1914 | WETC/WETC.dummy: links_non_perl |
---|
1915 | WINDOW/libWINDOW.dummy: links_non_perl |
---|
1916 | XML/XML.dummy: links_non_perl |
---|
1917 | |
---|
1918 | ifeq ($(OPENGL),1) |
---|
1919 | GL/glAW/glAW.dummy: links_non_perl |
---|
1920 | GL/glpng/glpng.dummy: links_non_perl |
---|
1921 | GL/GL.dummy: GL/glAW/glAW.dummy GL/glpng/glpng.dummy |
---|
1922 | RNA3D/RNA3D.dummy: links_non_perl gl |
---|
1923 | endif |
---|
1924 | |
---|
1925 | UNIT_TESTER/UNIT_TESTER.dummy: link_db \ |
---|
1926 | SERVERCNTRL/SERVERCNTRL.dummy \ |
---|
1927 | |
---|
1928 | # see also TOOLS/Makefile@TOOLSLIBDEPENDS |
---|
1929 | TOOLS/TOOLS.dummy : links_non_perl link_db \ |
---|
1930 | CONSENSUS_TREE/CONSENSUS_TREE.dummy \ |
---|
1931 | SERVERCNTRL/SERVERCNTRL.dummy \ |
---|
1932 | SL/FILTER/FILTER.dummy \ |
---|
1933 | SL/FILTSEQEXP/FILTSEQEXP.dummy \ |
---|
1934 | SL/INSDEL/INSDEL.dummy \ |
---|
1935 | SL/REGEXPR/REGEXPR.dummy \ |
---|
1936 | SL/SEQIO/SEQIO.dummy \ |
---|
1937 | SL/TREE_READ/TREE_READ.dummy \ |
---|
1938 | SL/TREE_WRITE/TREE_WRITE.dummy \ |
---|
1939 | XML/XML.dummy \ |
---|
1940 | |
---|
1941 | AWTC/AWTC.dummy : com |
---|
1942 | |
---|
1943 | NAMES/NAMES.dummy : com |
---|
1944 | SL/AW_NAME/AW_NAME.dummy : com |
---|
1945 | |
---|
1946 | PROBE/PROBE.dummy : com |
---|
1947 | MULTI_PROBE/MULTI_PROBE.dummy : com |
---|
1948 | PROBE_DESIGN/PROBE_DESIGN.dummy : com |
---|
1949 | NALIGNER/NALIGNER.dummy : com |
---|
1950 | |
---|
1951 | ARB_GDE/ARB_GDE.dummy : proto_tools menus |
---|
1952 | |
---|
1953 | compile_compatibility: SOURCE_TOOLS/COMPILE_COMPAT/COMPILE_COMPAT.dummy |
---|
1954 | |
---|
1955 | #*************************************************************************************** |
---|
1956 | # Short aliases to make targets |
---|
1957 | #*************************************************************************************** |
---|
1958 | |
---|
1959 | show: |
---|
1960 | @echo $(SEP) |
---|
1961 | @echo 'Aliases for often needed targets:' |
---|
1962 | @echo '' |
---|
1963 | @echo ' executables:' |
---|
1964 | @echo '' |
---|
1965 | @echo ' nt arb_ntree' |
---|
1966 | @echo ' e4 arb_edit4 (includes secedit)' |
---|
1967 | @echo ' di arb_dist' |
---|
1968 | @echo ' ph arb_phylo' |
---|
1969 | @echo ' pa arb_parsimony' |
---|
1970 | @echo ' tg arb_treegen' |
---|
1971 | @echo ' ds arb_dbserver' |
---|
1972 | @echo ' pt arb_pt_server' |
---|
1973 | @echo ' na arb_name_server' |
---|
1974 | @echo '' |
---|
1975 | @echo ' libraries:' |
---|
1976 | @echo '' |
---|
1977 | @echo ' com communication libraries' |
---|
1978 | @echo ' db ARB database' |
---|
1979 | @echo ' aw GUI lib' |
---|
1980 | @echo ' awt GUI toolkit' |
---|
1981 | @echo ' awtc general purpose library' |
---|
1982 | @echo ' awti import/export library' |
---|
1983 | @echo ' mp multi probe library' |
---|
1984 | @echo ' ge genome library' |
---|
1985 | @echo ' pd probe design lib' |
---|
1986 | @echo ' prd primer design lib' |
---|
1987 | @echo '' |
---|
1988 | @echo ' other targets:' |
---|
1989 | @echo '' |
---|
1990 | @echo ' help recompile help files' |
---|
1991 | @echo ' tools make small tools used by arb' |
---|
1992 | @echo '' |
---|
1993 | @echo ' foreign targets:' |
---|
1994 | @echo '' |
---|
1995 | @echo ' gde GDE' |
---|
1996 | @echo ' agde ARB_GDE' |
---|
1997 | @echo '' |
---|
1998 | @echo 'for other targets inspect $(ARBHOME)/Makefile' |
---|
1999 | @echo '' |
---|
2000 | @echo $(SEP) |
---|
2001 | |
---|
2002 | source_doc: |
---|
2003 | @echo "Remove some links (doxygen crashes otherwise):" |
---|
2004 | find . \( -name "AISC" -o -name "C" -o -name "GDEHELP" \) -type l -exec rm {} \; |
---|
2005 | doxygen 2>&1 1>/dev/null |
---|
2006 | $(MAKE) forcelinks |
---|
2007 | |
---|
2008 | dep_graph: |
---|
2009 | @echo "Building some dependency graphs" |
---|
2010 | SOURCE_TOOLS/dependency_graphs.pl |
---|
2011 | |
---|
2012 | help: HELP_SOURCE/HELP_SOURCE.dummy |
---|
2013 | |
---|
2014 | HELP_SOURCE/HELP_SOURCE.dummy: link_core xml menus |
---|
2015 | |
---|
2016 | db: ARBDB/libARBDB.dummy |
---|
2017 | core: CORE/libCORE.dummy |
---|
2018 | aw: WINDOW/libWINDOW.dummy |
---|
2019 | awt: AWT/libAWT.dummy |
---|
2020 | awtc: AWTC/AWTC.dummy |
---|
2021 | awti: AWTI/AWTI.dummy |
---|
2022 | |
---|
2023 | mp: MULTI_PROBE/MULTI_PROBE.dummy |
---|
2024 | mg: MERGE/MERGE.dummy |
---|
2025 | ge: GENOM/GENOM.dummy |
---|
2026 | prd: PRIMER_DESIGN/PRIMER_DESIGN.dummy |
---|
2027 | |
---|
2028 | nt: menus $(NTREE) |
---|
2029 | |
---|
2030 | nal: $(NALIGNER) |
---|
2031 | |
---|
2032 | di: $(DIST) |
---|
2033 | ph: $(PHYLO) |
---|
2034 | pa: $(PARSIMONY) |
---|
2035 | tg: $(TREEGEN) |
---|
2036 | |
---|
2037 | ifeq ($(OPENGL),1) |
---|
2038 | 3d: RNA3D/RNA3D.dummy |
---|
2039 | gl: GL/GL.dummy |
---|
2040 | else |
---|
2041 | noopengl: |
---|
2042 | @echo "invalid target for OPENGL=0" |
---|
2043 | 3d: noopengl |
---|
2044 | gl: noopengl |
---|
2045 | endif |
---|
2046 | |
---|
2047 | SL/SL.dummy: com |
---|
2048 | |
---|
2049 | ds: $(DBSERVER) |
---|
2050 | pt: $(PROBE) |
---|
2051 | pst: PROBE_SET/PROBE_SET.dummy |
---|
2052 | pd: PROBE_DESIGN/PROBE_DESIGN.dummy |
---|
2053 | na: $(NAMES) |
---|
2054 | sq: SEQ_QUALITY/SEQ_QUALITY.dummy |
---|
2055 | cma: $(RNACMA) |
---|
2056 | |
---|
2057 | sec: SECEDIT/SECEDIT.dummy |
---|
2058 | |
---|
2059 | e4: $(EDIT4) readseq menus |
---|
2060 | |
---|
2061 | gi: GENOM_IMPORT/GENOM_IMPORT.dummy |
---|
2062 | wetc: $(WETC) |
---|
2063 | |
---|
2064 | xml: XML/XML.dummy |
---|
2065 | stat: STAT/STAT.dummy $(NTREE) $(EDIT4) |
---|
2066 | fa: SL/FAST_ALIGNER/FAST_ALIGNER.dummy |
---|
2067 | |
---|
2068 | #******************************************************************************** |
---|
2069 | |
---|
2070 | up_by_remake: depends proto vectorize_checks |
---|
2071 | |
---|
2072 | up: up_by_remake tags valgrind_update |
---|
2073 | |
---|
2074 | #******************************************************************************** |
---|
2075 | |
---|
2076 | touch: |
---|
2077 | SOURCE_TOOLS/touch_modified.pl |
---|
2078 | |
---|
2079 | modified: touch |
---|
2080 | $(MAKE) all |
---|
2081 | |
---|
2082 | #******************************************************************************** |
---|
2083 | |
---|
2084 | libdepends: |
---|
2085 | $(MAKE) -C "SOURCE_TOOLS" \ |
---|
2086 | "RNA3D_LIB=$(RNA3D_LIB_4_DEPENDS)" \ |
---|
2087 | libdepends |
---|
2088 | |
---|
2089 | #******************************************************************************** |
---|
2090 | |
---|
2091 | # create generated headers: |
---|
2092 | genheaders: TEMPLATES/TEMPLATES.dummy |
---|
2093 | |
---|
2094 | clrdotdepends: |
---|
2095 | rm PROBE_COM/.depends || true |
---|
2096 | rm NAMES_COM/.depends || true |
---|
2097 | rm PERL2ARB/.depends || true |
---|
2098 | |
---|
2099 | comdepends: comtools clrdotdepends have_makedepend |
---|
2100 | @echo "$(SEP) Partially build com interface" |
---|
2101 | $(MAKE) PROBE_COM/PROBE_COM.depends NAMES_COM/NAMES_COM.depends |
---|
2102 | $(MAKE) PROBE_COM/server.depends NAMES_COM/server.depends |
---|
2103 | |
---|
2104 | depends: genheaders comdepends vectorize_checks have_makedepend |
---|
2105 | @echo "$(SEP) Updating other dependencies" |
---|
2106 | $(MAKE) $(subst NAMES_COM/server.depends,,$(subst PROBE_COM/server.depends,,$(SUBDIRS:.sub=.depends))) \ |
---|
2107 | HELP_SOURCE/HELP_SOURCE.depends \ |
---|
2108 | SOURCE_TOOLS/COMPILE_COMPAT/COMPILE_COMPAT.depends \ |
---|
2109 | |
---|
2110 | $(MAKE) libdepends |
---|
2111 | |
---|
2112 | depend: depends |
---|
2113 | |
---|
2114 | # ------------------------------------------------------------ |
---|
2115 | # dependency generation tests for AISC code |
---|
2116 | #(all should work w/o creating wrong dependencies; |
---|
2117 | # neither in XXX_COM/Makefile nor in code using AISC interface) |
---|
2118 | dependstest1: silent_clean |
---|
2119 | $(MAKE) depends |
---|
2120 | dependstest2: silent_clean |
---|
2121 | $(MAKE) com |
---|
2122 | dependstest3: silent_clean |
---|
2123 | $(MAKE) aw |
---|
2124 | dependstest4: silent_clean |
---|
2125 | $(MAKE) pt |
---|
2126 | dependstest5: silent_clean |
---|
2127 | $(MAKE) na |
---|
2128 | dependstest6: silent_clean |
---|
2129 | $(MAKE) nt |
---|
2130 | dependstest7: silent_clean |
---|
2131 | $(MAKE) all |
---|
2132 | # ------------------------------------------------------------ |
---|
2133 | |
---|
2134 | vectorize_checks: |
---|
2135 | $(MAKE) -C SOURCE_TOOLS -r vectorize_checks |
---|
2136 | |
---|
2137 | clean_checked_vect: lib/lib.clean |
---|
2138 | SOURCE_TOOLS/clean_checked_vectorizations.sh |
---|
2139 | |
---|
2140 | # ------------------------------------------------------------ |
---|
2141 | |
---|
2142 | AISC_MKPTPS/AISC_MKPTPS.dummy: links |
---|
2143 | |
---|
2144 | proto_tools: AISC_MKPTPS/AISC_MKPTPS.dummy |
---|
2145 | |
---|
2146 | proto: proto_tools |
---|
2147 | @echo $(SEP) Updating prototypes |
---|
2148 | $(MAKE) \ |
---|
2149 | ARBDB/ARBDB.proto \ |
---|
2150 | AISC_COM/AISC_COM.proto \ |
---|
2151 | ARB_GDE/ARB_GDE.proto \ |
---|
2152 | CORE/CORE.proto \ |
---|
2153 | CONVERTALN/CONVERTALN.proto \ |
---|
2154 | NTREE/NTREE.proto \ |
---|
2155 | MERGE/MERGE.proto \ |
---|
2156 | PROBE/PROBE.proto \ |
---|
2157 | SERVERCNTRL/SERVERCNTRL.proto \ |
---|
2158 | SL/SL.proto \ |
---|
2159 | |
---|
2160 | #******************************************************************************** |
---|
2161 | |
---|
2162 | valgrind_update: links |
---|
2163 | @echo $(SEP) Updating for valgrind |
---|
2164 | $(MAKE) -C SOURCE_TOOLS valgrind_update |
---|
2165 | |
---|
2166 | #******************************************************************************** |
---|
2167 | |
---|
2168 | TAGFILE=TAGS |
---|
2169 | UTAGS=TAGS.$(ARBBID) |
---|
2170 | TAGFILE_TMP=$(UTAGS).tmp |
---|
2171 | |
---|
2172 | TAG_SOURCE_HEADERS=$(UTAGS).headers.tmp |
---|
2173 | TAG_SOURCE_CODE=$(UTAGS).codefiles.tmp |
---|
2174 | TAG_SOURCE_LISTS=$(TAG_SOURCE_HEADERS) $(TAG_SOURCE_CODE) |
---|
2175 | |
---|
2176 | ETAGS_IGNORE_LIST=SOURCE_TOOLS/etags_ignore.lst |
---|
2177 | |
---|
2178 | ETAGS=ctags -e -I @$(ETAGS_IGNORE_LIST) --sort=no --if0=no --extra=q |
---|
2179 | ETAGS_TYPES=--C-kinds=cgnsut --C++-kinds=cgnsut |
---|
2180 | ETAGS_FUN =--C-kinds=fm --C++-kinds=fm |
---|
2181 | ETAGS_REST =--C-kinds=dev --C++-kinds=dev |
---|
2182 | |
---|
2183 | FILTER_TAGS_SOURCES= \ |
---|
2184 | $(SED) -e 's/^.\///g' | \ |
---|
2185 | grep -vi '^HEADERLIBS\|^GDE/\|/GEN[CH]/' |
---|
2186 | |
---|
2187 | $(TAG_SOURCE_HEADERS): links |
---|
2188 | @find . \( -name '*.hxx' -o -name "*.h" \) -type f | $(FILTER_TAGS_SOURCES) > $@ |
---|
2189 | |
---|
2190 | $(TAG_SOURCE_CODE): links |
---|
2191 | @find . \( -name '*.cxx' -o -name "*.c" \) -type f | $(FILTER_TAGS_SOURCES) > $@ |
---|
2192 | |
---|
2193 | $(UTAGS).1.tmp: $(TAG_SOURCE_HEADERS) |
---|
2194 | @$(ETAGS) -f $@ $(ETAGS_TYPES) -L $< |
---|
2195 | $(UTAGS).2.tmp: $(TAG_SOURCE_HEADERS) |
---|
2196 | @$(ETAGS) -f $@ $(ETAGS_FUN) -L $< |
---|
2197 | $(UTAGS).3.tmp: $(TAG_SOURCE_HEADERS) |
---|
2198 | @$(ETAGS) -f $@ $(ETAGS_REST) -L $< |
---|
2199 | $(UTAGS).4.tmp: $(TAG_SOURCE_CODE) |
---|
2200 | @$(ETAGS) -f $@ $(ETAGS_TYPES) -L $< |
---|
2201 | $(UTAGS).5.tmp: $(TAG_SOURCE_CODE) |
---|
2202 | @$(ETAGS) -f $@ $(ETAGS_FUN) -L $< |
---|
2203 | $(UTAGS).6.tmp: $(TAG_SOURCE_CODE) |
---|
2204 | @$(ETAGS) -f $@ $(ETAGS_REST) -L $< |
---|
2205 | |
---|
2206 | TAGS_ALL_PARTS=$(UTAGS).1.tmp $(UTAGS).2.tmp $(UTAGS).3.tmp $(UTAGS).4.tmp $(UTAGS).5.tmp $(UTAGS).6.tmp |
---|
2207 | |
---|
2208 | $(TAGFILE_TMP) : $(TAGS_ALL_PARTS) |
---|
2209 | @cat $(TAGS_ALL_PARTS) > $@ |
---|
2210 | @rm $(TAGS_ALL_PARTS) $(TAG_SOURCE_LISTS) |
---|
2211 | |
---|
2212 | cleanOldTags: |
---|
2213 | @find $(ARBHOME) -name 'TAGS.*.tmp' -ctime +2 -exec rm {} \; |
---|
2214 | |
---|
2215 | tags: $(TAGFILE_TMP) cleanOldTags |
---|
2216 | @mv_if_diff $(TAGFILE_TMP) $(TAGFILE) |
---|
2217 | |
---|
2218 | #******************************************************************************** |
---|
2219 | |
---|
2220 | LINKSTAMP=SOURCE_TOOLS/stamp.generate_all_links |
---|
2221 | |
---|
2222 | links: checks $(LINKSTAMP) arbmainwrapper |
---|
2223 | links_no_checks: $(LINKSTAMP) arbmainwrapper |
---|
2224 | |
---|
2225 | forcelinks: |
---|
2226 | -rm $(LINKSTAMP) |
---|
2227 | $(MAKE) links |
---|
2228 | |
---|
2229 | $(LINKSTAMP): SOURCE_TOOLS/generate_all_links.sh genheaders |
---|
2230 | +SOURCE_TOOLS/generate_all_links.sh |
---|
2231 | touch $(LINKSTAMP) |
---|
2232 | |
---|
2233 | clean_links: |
---|
2234 | # avoid to delete linked pts, nas or arb_tcp.dat: |
---|
2235 | find . -path './lib' -prune -o -type l -exec rm {} \; |
---|
2236 | # removed obsolete file - refuses to disappear due to 'prune' above |
---|
2237 | @rm -f lib/help/GDEHELP |
---|
2238 | @rm -f $(LINKSTAMP) lib/inputMasks/format.readme |
---|
2239 | |
---|
2240 | redo_links: clean_links |
---|
2241 | $(MAKE) links_no_checks |
---|
2242 | |
---|
2243 | #******************************************************************************** |
---|
2244 | |
---|
2245 | header_libs: |
---|
2246 | @(( \ |
---|
2247 | echo "$(SEP) Make HEADERLIBS"; \ |
---|
2248 | $(MAKE) -C HEADERLIBS all && \ |
---|
2249 | echo "$(SEP) Make HEADERLIBS [done]"; \ |
---|
2250 | ) > HEADERLIBS.log 2>&1 && (cat HEADERLIBS.log;rm HEADERLIBS.log)) || (cat HEADERLIBS.log;rm HEADERLIBS.log;false) |
---|
2251 | |
---|
2252 | #******************************************************************************** |
---|
2253 | |
---|
2254 | gde: GDE/GDE.dummy |
---|
2255 | GDE: gde |
---|
2256 | agde: ARB_GDE/ARB_GDE.dummy |
---|
2257 | tools: TOOLS/TOOLS.dummy |
---|
2258 | convert: $(CONVERT_ALN) |
---|
2259 | readseq: READSEQ/READSEQ.dummy |
---|
2260 | |
---|
2261 | #*************************************************************************************** |
---|
2262 | # Some user commands |
---|
2263 | #*************************************************************************************** |
---|
2264 | |
---|
2265 | menus: binlink links |
---|
2266 | @(( \ |
---|
2267 | echo "$(SEP) Make GDEHELP"; \ |
---|
2268 | $(MAKE) -C GDEHELP -r all && \ |
---|
2269 | echo "$(SEP) Make GDEHELP [done]"; \ |
---|
2270 | ) > GDEHELP.log 2>&1 && (cat GDEHELP.log;rm GDEHELP.log)) || (cat GDEHELP.log;rm GDEHELP.log;false) |
---|
2271 | |
---|
2272 | ifeq ($(DEBUG),1) |
---|
2273 | BIN_TARGET=develall |
---|
2274 | else |
---|
2275 | BIN_TARGET=all |
---|
2276 | endif |
---|
2277 | |
---|
2278 | |
---|
2279 | binlink: |
---|
2280 | $(MAKE) -C bin $(BIN_TARGET) |
---|
2281 | |
---|
2282 | check_bin_dep: binlink |
---|
2283 | SOURCE_TOOLS/check_bin_dependencies.pl |
---|
2284 | |
---|
2285 | fig_cure: |
---|
2286 | SOURCE_TOOLS/sortfig.pl doit |
---|
2287 | |
---|
2288 | preplib: |
---|
2289 | (cd lib;$(MAKE) all) |
---|
2290 | |
---|
2291 | # -------------------------------------------------------------------------------- |
---|
2292 | # This section is quite tricky: |
---|
2293 | # |
---|
2294 | # make 'perl' is a BIG target, so when it has to be made, it has to be started |
---|
2295 | # as early as possible to reduce overall compile time. Since 'make' does not |
---|
2296 | # provide any priorities, i force it to build all 'perl'-prerequisites early, by |
---|
2297 | # adding artificial dependencies to these prerequisites |
---|
2298 | # |
---|
2299 | # That behavior is likely to be system-dependent. |
---|
2300 | # My goal was only to make it work on my current development system, |
---|
2301 | # where this saves about 20% of overall build time. |
---|
2302 | |
---|
2303 | ifeq ($(WITHPERL),1) |
---|
2304 | links_non_perl: PERLTOOLS/PERLTOOLS.dummy |
---|
2305 | perltools: links_non_perl |
---|
2306 | perl: realperl |
---|
2307 | else |
---|
2308 | links_non_perl: links |
---|
2309 | perl: links |
---|
2310 | $(MAKE) "WITHPERL=1" perl |
---|
2311 | endif |
---|
2312 | |
---|
2313 | # ---------------------------------------- perl |
---|
2314 | |
---|
2315 | realperl: perltools |
---|
2316 | (( \ |
---|
2317 | echo "$(SEP) Make PERL2ARB" ; \ |
---|
2318 | $(TIME) $(MAKE) -C PERL2ARB -r -f Makefile.main \ |
---|
2319 | "AUTODEPENDS=1" \ |
---|
2320 | "dflags=$(dflags)" \ |
---|
2321 | "cflags4perl=$(cflags) $(cxxflags) $(dflags)" \ |
---|
2322 | "lflags4perl=$(lflags4perl)" \ |
---|
2323 | "COMPILER_VERSION=$(COMPILER_VERSION)" \ |
---|
2324 | all && \ |
---|
2325 | $(MAKE) -C PERL_SCRIPTS/test test && \ |
---|
2326 | echo "$(SEP) Make PERL2ARB [done]" ; \ |
---|
2327 | ) > PERL2ARB.log 2>&1 && (cat PERL2ARB.log;rm PERL2ARB.log)) || (cat PERL2ARB.log;rm PERL2ARB.log;false) |
---|
2328 | |
---|
2329 | perl_clean: |
---|
2330 | @$(MAKE) -C PERL2ARB -r -f Makefile.main \ |
---|
2331 | "AUTODEPENDS=0" \ |
---|
2332 | clean |
---|
2333 | |
---|
2334 | PERL2ARB/PERL2ARB.clean: |
---|
2335 | $(MAKE) perl_clean |
---|
2336 | $(MAKE) -C PERL_SCRIPTS/test clean |
---|
2337 | |
---|
2338 | # ---------------------------------------- bindings to script languages |
---|
2339 | |
---|
2340 | bindings: lib/libCORE.so lib/libARBDB.so |
---|
2341 | $(MAKE) -C BINDINGS all ARBDEPENDS="$(^:%=../%)" DFLAGS="$(dflags)" |
---|
2342 | |
---|
2343 | bindings_clean: |
---|
2344 | $(MAKE) -C BINDINGS clean |
---|
2345 | |
---|
2346 | # ---------------------------------------- check resources |
---|
2347 | |
---|
2348 | check_res: |
---|
2349 | $(ARBHOME)/SOURCE_TOOLS/check_resources.pl |
---|
2350 | |
---|
2351 | # ---------------------------------------- cleaning |
---|
2352 | |
---|
2353 | rmbak: |
---|
2354 | @echo "[cleanup backup/core files]" |
---|
2355 | @find . \( -name '*%' \ |
---|
2356 | -o -name '*.bak' \ |
---|
2357 | -o -name '*~' \) \ |
---|
2358 | -o \( -name 'core' -a \! -type d \) \ |
---|
2359 | -exec rm -v {} \; || \ |
---|
2360 | echo "Warning: target 'rmbak' reported problems when removing misc. backup files (ignored)" |
---|
2361 | @echo "[cleanup done]" |
---|
2362 | |
---|
2363 | bin_reinit: |
---|
2364 | $(MAKE) bin/bin.clean |
---|
2365 | $(MAKE) -C "bin" all |
---|
2366 | |
---|
2367 | clean_directories: |
---|
2368 | -rm -rf \ |
---|
2369 | $(ARBHOME)/PROBE_SET/bin \ |
---|
2370 | $(ARBHOME)/INCLUDE \ |
---|
2371 | |
---|
2372 | libclean: |
---|
2373 | -find $(ARBHOME) -type f \( -name '*.a' ! -type l \) -exec rm -f {} \; |
---|
2374 | -find $(ARBHOME) -type f \( -name 'lib*.so' ! -type l \) -exec rm -f {} \; |
---|
2375 | |
---|
2376 | objclean: |
---|
2377 | -find $(ARBHOME) -type f \( -name '*.o' ! -type l \) -exec rm -f {} \; |
---|
2378 | |
---|
2379 | # bin.clean and HELP_SOURCE.clean interfere |
---|
2380 | clean3: |
---|
2381 | $(MAKE) bin/bin.clean |
---|
2382 | $(MAKE) HELP_SOURCE/HELP_SOURCE.clean |
---|
2383 | |
---|
2384 | |
---|
2385 | # delete all binaries (similar to 'cleanlinked') |
---|
2386 | cleanRelinkable: libclean UNIT_TESTER/UNIT_TESTER.clean |
---|
2387 | $(MAKE) -C bin cleanbinariesRelinkable |
---|
2388 | $(MAKE) -C PROBE_SET cleanLinked |
---|
2389 | |
---|
2390 | |
---|
2391 | clean2: $(SUBDIRS:.sub=.clean) \ |
---|
2392 | clean3 \ |
---|
2393 | rmbak \ |
---|
2394 | libclean \ |
---|
2395 | objclean \ |
---|
2396 | lib/lib.clean \ |
---|
2397 | GDEHELP/GDEHELP.clean \ |
---|
2398 | HEADERLIBS/HEADERLIBS.clean \ |
---|
2399 | SOURCE_TOOLS/SOURCE_TOOLS.clean \ |
---|
2400 | SOURCE_TOOLS/COMPILE_COMPAT/COMPILE_COMPAT.clean \ |
---|
2401 | UNIT_TESTER/UNIT_TESTER.clean \ |
---|
2402 | TEMPLATES/TEMPLATES.clean \ |
---|
2403 | perl_clean \ |
---|
2404 | clean_directories \ |
---|
2405 | |
---|
2406 | rm -f *.last_gcc *.last_compiler config.makefile.bak |
---|
2407 | |
---|
2408 | # links are needed for cleanup |
---|
2409 | clean: redo_links motif_xpm_hack_clean |
---|
2410 | $(MAKE) clean2 |
---|
2411 | $(MAKE) clean_cov_all clean_links |
---|
2412 | |
---|
2413 | silent_clean: |
---|
2414 | $(MAKE) clean >/dev/null |
---|
2415 | |
---|
2416 | # 'relocated' is about 50% faster than 'rebuild' |
---|
2417 | reloc_clean: links |
---|
2418 | @echo "---------------------------------------- Relocation cleanup" |
---|
2419 | $(MAKE) \ |
---|
2420 | perl_clean \ |
---|
2421 | GDEHELP/GDEHELP.clean \ |
---|
2422 | HELP_SOURCE/genhelp/genhelp.clean \ |
---|
2423 | bin/bin.clean \ |
---|
2424 | libclean \ |
---|
2425 | objclean |
---|
2426 | |
---|
2427 | relocated: links |
---|
2428 | $(MAKE) reloc_clean |
---|
2429 | @echo "---------------------------------------- and remake" |
---|
2430 | $(MAKE) build |
---|
2431 | |
---|
2432 | # ----------------------------------- |
---|
2433 | # some stress tests |
---|
2434 | # (helpful to reveal race conditions with -j) |
---|
2435 | |
---|
2436 | rebuild4ever: rebuild |
---|
2437 | $(MAKE) rebuild4ever |
---|
2438 | |
---|
2439 | build4ever: build |
---|
2440 | $(MAKE) build4ever |
---|
2441 | |
---|
2442 | clean4ever: clean |
---|
2443 | $(MAKE) clean4ever |
---|
2444 | |
---|
2445 | test4ever: ut |
---|
2446 | $(MAKE) test4ever |
---|
2447 | |
---|
2448 | perl4ever: clean |
---|
2449 | $(MAKE) links |
---|
2450 | $(MAKE) perl |
---|
2451 | $(MAKE) perl4ever |
---|
2452 | |
---|
2453 | help4ever: clean |
---|
2454 | $(MAKE) help |
---|
2455 | $(MAKE) help4ever |
---|
2456 | |
---|
2457 | # ----------------------------------- |
---|
2458 | |
---|
2459 | cleanlinked: bin/bin.clean libclean |
---|
2460 | |
---|
2461 | relink: cleanlinked |
---|
2462 | $(MAKE) all |
---|
2463 | |
---|
2464 | # -------------------------------------------------------------------------------- |
---|
2465 | # source related targets |
---|
2466 | |
---|
2467 | CLOC=cloc |
---|
2468 | CLOCFLAGS=--no3 --quiet --progress-rate=0 |
---|
2469 | CLOCARB=--exclude-dir=GDE . |
---|
2470 | CLOCEXT=GDE |
---|
2471 | CLOCCODE=--force-lang-def=$(ARBHOME)/SOURCE_TOOLS/arb.cloc.code.def |
---|
2472 | CLOCREST=--force-lang-def=$(ARBHOME)/SOURCE_TOOLS/arb.cloc.rest.def |
---|
2473 | CLOCFILT=tail --lines=+4 |
---|
2474 | |
---|
2475 | cloc: |
---|
2476 | @echo 'Arb code:' |
---|
2477 | @$(CLOC) $(CLOCFLAGS) $(CLOCCODE) $(CLOCARB) | $(CLOCFILT) |
---|
2478 | @echo 'Arb rest:' |
---|
2479 | @$(CLOC) $(CLOCFLAGS) $(CLOCREST) $(CLOCARB) | $(CLOCFILT) |
---|
2480 | @echo 'External code:' |
---|
2481 | @$(CLOC) $(CLOCFLAGS) $(CLOCCODE) $(CLOCEXT) | $(CLOCFILT) |
---|
2482 | @echo 'External rest:' |
---|
2483 | @$(CLOC) $(CLOCFLAGS) $(CLOCREST) $(CLOCEXT) | $(CLOCFILT) |
---|
2484 | |
---|
2485 | |
---|
2486 | # patch generation |
---|
2487 | patch: |
---|
2488 | SOURCE_TOOLS/arb_create_patch.sh arbPatch --svn |
---|
2489 | |
---|
2490 | # source tarball generation |
---|
2491 | save: sourcetarfile |
---|
2492 | |
---|
2493 | sourcetarfile: rmbak |
---|
2494 | util/arb_save |
---|
2495 | |
---|
2496 | # test early whether save will work |
---|
2497 | savetest: |
---|
2498 | @util/arb_srclst.pl >/dev/null |
---|
2499 | |
---|
2500 | testsave: savetest |
---|
2501 | |
---|
2502 | save2: rmbak |
---|
2503 | util/arb_save ignore |
---|
2504 | |
---|
2505 | save_test: rmbak |
---|
2506 | @echo "Testing source list.." |
---|
2507 | @util/arb_srclst.pl > /dev/null |
---|
2508 | |
---|
2509 | save_test_no_error: |
---|
2510 | @-$(MAKE) save_test |
---|
2511 | |
---|
2512 | # -------------------------------------------------------------------------------- |
---|
2513 | # version management |
---|
2514 | |
---|
2515 | inc_candi: |
---|
2516 | touch SOURCE_TOOLS/inc_candi.stamp |
---|
2517 | $(MAKE) do_version_update |
---|
2518 | |
---|
2519 | inc_patch: |
---|
2520 | touch SOURCE_TOOLS/inc_patch.stamp |
---|
2521 | $(MAKE) do_version_update |
---|
2522 | |
---|
2523 | inc_minor: |
---|
2524 | touch SOURCE_TOOLS/inc_minor.stamp |
---|
2525 | $(MAKE) do_version_update |
---|
2526 | |
---|
2527 | inc_major: |
---|
2528 | touch SOURCE_TOOLS/inc_major.stamp |
---|
2529 | $(MAKE) do_version_update |
---|
2530 | |
---|
2531 | do_version_update: |
---|
2532 | @echo Incrementing version information |
---|
2533 | $(MAKE) savetest |
---|
2534 | $(MAKE) genheaders # auto upgrades version early |
---|
2535 | |
---|
2536 | show_version: |
---|
2537 | $(MAKE) genheaders # updates version info |
---|
2538 | @echo "$(SEP) ARB version info" |
---|
2539 | @grep ARB_VERSION TEMPLATES/arb_build.h |
---|
2540 | @echo "$(SEP)" |
---|
2541 | |
---|
2542 | # -------------------------------------------------------------------------------- |
---|
2543 | # special cleanups |
---|
2544 | |
---|
2545 | clean_opengl_changed: RNA3D/RNA3D.clean EDIT4/EDIT4.clean WINDOW/WINDOW.clean GL/GL.clean |
---|
2546 | |
---|
2547 | # -------------------------------------------------------------------------------- |
---|
2548 | |
---|
2549 | arbapplications: nt pa e4 wetc pt na nal di ph ds wetc cma |
---|
2550 | |
---|
2551 | arb_external: convert tools gde readseq tg pst |
---|
2552 | |
---|
2553 | arb_no_perl: arbapplications help arb_external |
---|
2554 | |
---|
2555 | arb: motif_xpm_hack |
---|
2556 | $(MAKE) "WITHPERL=1" perl arb_no_perl |
---|
2557 | |
---|
2558 | motif_xpm_hack: |
---|
2559 | $(MAKE) -r -C "lib/motifHack" all |
---|
2560 | |
---|
2561 | motif_xpm_hack_clean: |
---|
2562 | $(MAKE) -r -C "lib/motifHack" clean |
---|
2563 | |
---|
2564 | # -------------------------------------------------------------------------------- |
---|
2565 | # special targets for SOURCE_TOOLS/remake_after_change.pl |
---|
2566 | |
---|
2567 | rac_arb_dist: di |
---|
2568 | rac_arb_edit4: e4 |
---|
2569 | rac_arb_ntree: nt |
---|
2570 | rac_arb_pars: pa |
---|
2571 | rac_arb_phylo: ph |
---|
2572 | rac_arb_wetc: wetc |
---|
2573 | rac_arb_naligner: nal |
---|
2574 | rac_arb_pt_server: pt |
---|
2575 | rac_arb_db_server: ds |
---|
2576 | rac_arb_name_server: na |
---|
2577 | rac_arb_convert_aln: convert |
---|
2578 | rac_arb_treegen: tg |
---|
2579 | rac_arb_rnacma: cma |
---|
2580 | rac_arb_help2xml: help |
---|
2581 | |
---|
2582 | rac_arb_a2ps: tools |
---|
2583 | rac_arb_consensus_tree: tools |
---|
2584 | rac_arb_dnarates: tools |
---|
2585 | rac_arb_export_rates: tools |
---|
2586 | rac_arb_export_tree: tools |
---|
2587 | rac_arb_gene_probe: tools |
---|
2588 | rac_arb_message: tools |
---|
2589 | rac_arb_primer: tools |
---|
2590 | rac_arb_probe: tools |
---|
2591 | rac_arb_read_tree: tools |
---|
2592 | |
---|
2593 | # -------------------------------------------------------------------------------- |
---|
2594 | # unit testing |
---|
2595 | # @@@ work in progress |
---|
2596 | # |
---|
2597 | # goal is to automatically test all libraries/executables using TESTED_UNITS_AUTO |
---|
2598 | # currently not all test executables link w/o error. |
---|
2599 | # therefor units are organized in three sets: |
---|
2600 | # |
---|
2601 | # TESTED_UNITS = testable and contain tests |
---|
2602 | # UNTESTED_UNITS = testable, but no tests written yet |
---|
2603 | # UNTESTABLE_UNITS = not testable |
---|
2604 | |
---|
2605 | # always define OPENGL units manually: |
---|
2606 | OPENGL_TESTS := |
---|
2607 | ifeq ($(OPENGL),1) |
---|
2608 | OPENGL_TESTS += \ |
---|
2609 | $(subst .a,.test,$(RNA3D_LIB)) \ |
---|
2610 | GL/glAW/libglAW.test \ |
---|
2611 | GL/glpng/libglpng_arb.test \ |
---|
2612 | |
---|
2613 | endif |
---|
2614 | |
---|
2615 | UNITS_NOT_AUTODETECTED = \ |
---|
2616 | HELP_SOURCE/HELP_SOURCE.tooltests |
---|
2617 | |
---|
2618 | TESTED_UNITS_AUTO = \ |
---|
2619 | $(OPENGL_TESTS) \ |
---|
2620 | $(TL_ARCHIVES:.a=.test) \ |
---|
2621 | $(TL_SHARED_ARCHIVES:.so=.test) \ |
---|
2622 | $(CL_ARCHIVES:.a=.test) \ |
---|
2623 | $(TL_TOOLS_COLLECTIONS:.toolColl=.tooltests) \ |
---|
2624 | $(UNITS_NOT_AUTODETECTED) \ |
---|
2625 | |
---|
2626 | UNTESTED_UNITS = \ |
---|
2627 | $(OPENGL_TESTS) \ |
---|
2628 | EISPACK/EISPACK.test \ |
---|
2629 | GENOM/GENOM.test \ |
---|
2630 | ISLAND_HOPPING/ISLAND_HOPPING.test \ |
---|
2631 | NALIGNER/NALIGNER.test \ |
---|
2632 | NAMES/NAMES.test \ |
---|
2633 | PHYLO/PHYLO.test \ |
---|
2634 | PRIMER_DESIGN/PRIMER_DESIGN.test \ |
---|
2635 | READSEQ/READSEQ.tooltests \ |
---|
2636 | SECEDIT/SECEDIT.test \ |
---|
2637 | SEQ_QUALITY/SEQ_QUALITY.test \ |
---|
2638 | SERVERCNTRL/SERVERCNTRL.test \ |
---|
2639 | SL/ALIVIEW/ALIVIEW.test \ |
---|
2640 | SL/AP_TREE/AP_TREE.test \ |
---|
2641 | SL/ARB_TREE/ARB_TREE.test \ |
---|
2642 | SL/AW_HELIX/AW_HELIX.test \ |
---|
2643 | SL/AW_NAME/AW_NAME.test \ |
---|
2644 | SL/DB_SCANNER/DB_SCANNER.test \ |
---|
2645 | SL/DB_UI/DB_UI.test \ |
---|
2646 | SL/GUI_ALIVIEW/GUI_ALIVIEW.test \ |
---|
2647 | SL/HELIX/HELIX.test \ |
---|
2648 | SL/QUERY/QUERY.test \ |
---|
2649 | SL/REFENTRIES/REFENTRIES.test \ |
---|
2650 | SL/SEQUENCE/SEQUENCE.test \ |
---|
2651 | SL/TREE_ADMIN/TREE_ADMIN.test \ |
---|
2652 | SL/TREE_WRITE/TREE_WRITE.test \ |
---|
2653 | SL/XFERGUI/XFERGUI.test \ |
---|
2654 | STAT/STAT.test \ |
---|
2655 | TREEGEN/TREEGEN.test \ |
---|
2656 | WETC/WETC.test \ |
---|
2657 | XML/XML.test \ |
---|
2658 | |
---|
2659 | # untestable units |
---|
2660 | |
---|
2661 | UNTESTABLE_UNITS = \ |
---|
2662 | AISC/AISC.test \ |
---|
2663 | NAMES_COM/server.test \ |
---|
2664 | PROBE_COM/server.test \ |
---|
2665 | |
---|
2666 | # -------------------- |
---|
2667 | # put all units containing tests into the following 4 sections (see also TESTED_UNITS below) |
---|
2668 | |
---|
2669 | # recent development |
---|
2670 | UNITS_TESTED_FIRST = \ |
---|
2671 | SL/MATRIX/MATRIX.test \ |
---|
2672 | AWTI/AWTI.test \ |
---|
2673 | SL/FILTSEQEXP/FILTSEQEXP.test \ |
---|
2674 | SL/GROUP_SEARCH/GROUP_SEARCH.test \ |
---|
2675 | SL/PVP/PVP.test \ |
---|
2676 | SL/SAICALC/SAICALC.test \ |
---|
2677 | SL/TRANSLATE/TRANSLATE.test \ |
---|
2678 | SL/XFERSET/XFERSET.test \ |
---|
2679 | |
---|
2680 | # start units with long duration early |
---|
2681 | UNITS_RUNNING_LONG = \ |
---|
2682 | ARBDB/libARBDB.test \ |
---|
2683 | AWTC/AWTC.test \ |
---|
2684 | TOOLS/TOOLS.tooltests \ |
---|
2685 | |
---|
2686 | # plain test-libaries that are not linked anywhere |
---|
2687 | TEST_SANDBOXES = \ |
---|
2688 | SL/CB/CB.test \ |
---|
2689 | SL/HEADERTESTS/HEADERTESTS.test \ |
---|
2690 | |
---|
2691 | UNITS_TESTED = \ |
---|
2692 | AISC_MKPTPS/AISC_MKPTPS.tooltests \ |
---|
2693 | ARB_GDE/ARB_GDE.test \ |
---|
2694 | AWT/libAWT.test \ |
---|
2695 | CONSENSUS_TREE/CONSENSUS_TREE.test \ |
---|
2696 | CONVERTALN/CONVERTALN.test \ |
---|
2697 | CORE/libCORE.test \ |
---|
2698 | DBSERVER/DBSERVER.test \ |
---|
2699 | DIST/DIST.test \ |
---|
2700 | EDIT4/EDIT4.test \ |
---|
2701 | GENOM_IMPORT/GENOM_IMPORT.test \ |
---|
2702 | HELP_SOURCE/HELP_SOURCE.tooltests \ |
---|
2703 | MERGE/MERGE.test \ |
---|
2704 | MULTI_PROBE/MULTI_PROBE.test \ |
---|
2705 | NTREE/NTREE.test \ |
---|
2706 | PARSIMONY/PARSIMONY.test \ |
---|
2707 | PERLTOOLS/PERLTOOLS.tooltests \ |
---|
2708 | PROBE/PROBE.test \ |
---|
2709 | PROBE_DESIGN/PROBE_DESIGN.test \ |
---|
2710 | PROBE_SET/PROBE_SET.tooltests \ |
---|
2711 | RNACMA/RNACMA.test \ |
---|
2712 | SL/ALILINK/ALILINK.test \ |
---|
2713 | SL/CONSENSUS/CONSENSUS.test \ |
---|
2714 | SL/DB_QUERY/DB_QUERY.test \ |
---|
2715 | SL/FAST_ALIGNER/FAST_ALIGNER.test \ |
---|
2716 | SL/FILTER/FILTER.test \ |
---|
2717 | SL/INSDEL/INSDEL.test \ |
---|
2718 | SL/ITEM_SHADER/ITEM_SHADER.test \ |
---|
2719 | SL/ITEMS/ITEMS.test \ |
---|
2720 | SL/LOCATION/LOCATION.test \ |
---|
2721 | SL/MACROS/MACROS.test \ |
---|
2722 | SL/NDS/NDS.test \ |
---|
2723 | SL/NEIGHBOURJOIN/NEIGHBOURJOIN.test \ |
---|
2724 | SL/PRONUC/PRONUC.test \ |
---|
2725 | SL/PTCLEAN/PTCLEAN.test \ |
---|
2726 | SL/REGEXPR/REGEXPR.test \ |
---|
2727 | SL/SEQIO/SEQIO.test \ |
---|
2728 | SL/TREE_READ/TREE_READ.test \ |
---|
2729 | SL/TREEDISP/TREEDISP.test \ |
---|
2730 | WINDOW/libWINDOW.test \ |
---|
2731 | |
---|
2732 | TESTED_UNITS = \ |
---|
2733 | $(UNITS_TESTED_FIRST) \ |
---|
2734 | $(UNITS_RUNNING_LONG) \ |
---|
2735 | $(TEST_SANDBOXES) \ |
---|
2736 | $(UNITS_TESTED) \ |
---|
2737 | |
---|
2738 | # ---------------------------------------- |
---|
2739 | |
---|
2740 | ifeq ($(DEVELOPER),RALF) |
---|
2741 | |
---|
2742 | DEFINED_TEST_UNITS = \ |
---|
2743 | $(TESTED_UNITS) \ |
---|
2744 | $(UNTESTED_UNITS) \ |
---|
2745 | $(UNTESTABLE_UNITS) \ |
---|
2746 | |
---|
2747 | list_undefined_units: |
---|
2748 | @UNIT_TESTER/list_undefined_units.pl $(DEFINED_TEST_UNITS) -- $(TESTED_UNITS_AUTO) |
---|
2749 | |
---|
2750 | else |
---|
2751 | |
---|
2752 | list_undefined_units: |
---|
2753 | |
---|
2754 | endif |
---|
2755 | |
---|
2756 | # ---------------------------------------- |
---|
2757 | |
---|
2758 | TEST_LOG_DIR = UNIT_TESTER/logs |
---|
2759 | TEST_RUN_SUITE=$(MAKE) $(NODIR) -C UNIT_TESTER -f Makefile.suite -r |
---|
2760 | # -> UNIT_TESTER/Makefile.suite |
---|
2761 | TEST_MAKE_FLAGS= |
---|
2762 | TEST_POST_CLEAN= |
---|
2763 | ifeq ($(COVERAGE),1) |
---|
2764 | TEST_POST_CLEAN=$(MAKE) clean_cov |
---|
2765 | TEST_MAKE_FLAGS+=-j1 |
---|
2766 | endif |
---|
2767 | |
---|
2768 | |
---|
2769 | %.test: |
---|
2770 | -@( export ID=$$$$; mkdir -p $(TEST_LOG_DIR); \ |
---|
2771 | ( \ |
---|
2772 | echo "take[1]: Entering directory \`$(ARBHOME)/UNIT_TESTER'"; \ |
---|
2773 | $(MAKE) -C UNIT_TESTER -f Makefile.test -r \ |
---|
2774 | "UNITDIR=$(@D)" \ |
---|
2775 | "UNITLIBNAME=$(@F:.test=)" \ |
---|
2776 | "COVERAGE=$(COVERAGE)" \ |
---|
2777 | "ARB_PID=$(ARB_PID)_$(@F)" \ |
---|
2778 | runtest; \ |
---|
2779 | echo "take[1]: Leaving directory \`$(ARBHOME)/UNIT_TESTER'"; \ |
---|
2780 | $(TEST_POST_CLEAN) \ |
---|
2781 | ) >$(TEST_LOG_DIR)/$(@F).log 2>&1; \ |
---|
2782 | UNIT_TESTER/log_result.pl $(TEST_LOG_DIR)/$(@F).log ) |
---|
2783 | |
---|
2784 | %.notest: |
---|
2785 | -@( export ID=$$$$; mkdir -p $(TEST_LOG_DIR); \ |
---|
2786 | ( \ |
---|
2787 | echo "take[4]: Entering directory \`$(ARBHOME)/UNIT_TESTER'"; \ |
---|
2788 | $(MAKE) -C UNIT_TESTER -f Makefile.test -r \ |
---|
2789 | "UNITDIR=$(@D)" \ |
---|
2790 | "UNITLIBNAME=$(@F:.notest=)" \ |
---|
2791 | "COVERAGE=0" \ |
---|
2792 | "ARB_PID=$(ARB_PID)_$(@F)" \ |
---|
2793 | check_no_test; \ |
---|
2794 | echo "take[4]: Leaving directory \`$(ARBHOME)/UNIT_TESTER'" \ |
---|
2795 | ) >$(TEST_LOG_DIR)/$(@F).log 2>&1 ) |
---|
2796 | |
---|
2797 | |
---|
2798 | # tool test aliases (used to test one or multiple executable(s) in a single subdir): |
---|
2799 | %.tooltests: |
---|
2800 | $(error please define an explicit tooltest alias for $@) |
---|
2801 | |
---|
2802 | AISC_MKPTPS/AISC_MKPTPS.tooltests : AISC_MKPTPS/mkptypes.test |
---|
2803 | @echo "aliasing $@ -> $^" |
---|
2804 | PERLTOOLS/PERLTOOLS.tooltests : PERLTOOLS/arb_proto_2_xsub.test |
---|
2805 | @echo "aliasing $@ -> $^" |
---|
2806 | PROBE_SET/PROBE_SET.tooltests : PROBE_SET/fb_test.test |
---|
2807 | @echo "aliasing $@ -> $^" |
---|
2808 | HELP_SOURCE/HELP_SOURCE.tooltests : HELP_SOURCE/arb_help2xml.test |
---|
2809 | @echo "aliasing $@ -> $^" |
---|
2810 | TOOLS/TOOLS.tooltests : TOOLS/arb_consensus_tree.test TOOLS/arb_probe.test TOOLS/arb_test.test |
---|
2811 | @echo "aliasing $@ -> $^" |
---|
2812 | |
---|
2813 | # aliases for tools w/o tests: |
---|
2814 | READSEQ/READSEQ.tooltests: |
---|
2815 | @echo "Note: no tests for $@" |
---|
2816 | |
---|
2817 | |
---|
2818 | test_base: $(UNIT_TESTER_LIB:.a=.dummy) $(subst .test,.dummy,$(TEST_SANDBOXES)) |
---|
2819 | |
---|
2820 | clean_cov: |
---|
2821 | find . \( -name "*.gcda" -o -name "*.gcov" -o -name "*.cov" \) -exec rm {} \; |
---|
2822 | |
---|
2823 | clean_cov_all: clean_cov |
---|
2824 | find . \( -name "*.gcno" \) -exec rm {} \; |
---|
2825 | |
---|
2826 | cleanup_faked_arbpids: |
---|
2827 | @rm ~/.arb_tmp/tmp/arb_pids_${USER}_${ARB_PID}_* || true |
---|
2828 | |
---|
2829 | cleanup_faked_arbpids_and_fail: cleanup_faked_arbpids |
---|
2830 | @false |
---|
2831 | |
---|
2832 | NOTESTS_IN_UNTESTED = $(subst .test,.notest,$(UNTESTED_UNITS)) |
---|
2833 | |
---|
2834 | run_tests_faked_arbpid: |
---|
2835 | +@$(TEST_RUN_SUITE) init |
---|
2836 | @echo "take[2]: Entering directory \`$(ARBHOME)/UNIT_TESTER'" |
---|
2837 | @$(MAKE) $(TEST_MAKE_FLAGS) $(NODIR) $(TESTED_UNITS) $(NOTESTS_IN_UNTESTED) || $(MAKE) cleanup_faked_arbpids_and_fail |
---|
2838 | @echo "take[2]: Leaving directory \`$(ARBHOME)/UNIT_TESTER'" |
---|
2839 | +@$(TEST_RUN_SUITE) cleanup || $(MAKE) cleanup_faked_arbpids_and_fail |
---|
2840 | @$(MAKE) clean_cov >/dev/null |
---|
2841 | @$(MAKE) cleanup_faked_arbpids |
---|
2842 | |
---|
2843 | # @@@ instead of only running UNIT, this should as well run all tests this unit depends on? according to 'needs_libs' |
---|
2844 | # @@@ 'run_tests_faked_arbpid' does not work for UNIT=ARBDB/libARBDB or UNIT=PARS/PARS -> could be solved via extra suffix, e.g. ARBDB/libARBDB.unit |
---|
2845 | |
---|
2846 | run_onetest_faked_arbpid: |
---|
2847 | +@$(TEST_RUN_SUITE) init |
---|
2848 | @echo "take[3]: Entering directory \`$(ARBHOME)/UNIT_TESTER'" |
---|
2849 | test -n "$(UNIT)" || (echo "Error: UNIT has to be defined for target 'run_onetest_faked_arbpid'!"; false) |
---|
2850 | $(MAKE) $(TEST_MAKE_FLAGS) $(NODIR) $(UNIT).test || $(MAKE) cleanup_faked_arbpids_and_fail |
---|
2851 | @echo "take[3]: Leaving directory \`$(ARBHOME)/UNIT_TESTER'" |
---|
2852 | +@$(TEST_RUN_SUITE) cleanup || $(MAKE) cleanup_faked_arbpids_and_fail |
---|
2853 | @$(MAKE) clean_cov >/dev/null |
---|
2854 | @$(MAKE) cleanup_faked_arbpids |
---|
2855 | |
---|
2856 | run_tests: test_base clean_cov |
---|
2857 | $(MAKE) "ARB_PID=UT_$$$$" run_tests_faked_arbpid list_undefined_units |
---|
2858 | |
---|
2859 | run_oneunitstests: test_base |
---|
2860 | $(MAKE) "ARB_PID=UT_$$$$" run_onetest_faked_arbpid |
---|
2861 | |
---|
2862 | |
---|
2863 | ut: |
---|
2864 | ifeq ($(UNIT_TESTS),1) |
---|
2865 | @echo $(MAKE) run_tests |
---|
2866 | @$(MAKE) run_tests |
---|
2867 | else |
---|
2868 | @echo "Not compiled with unit tests" |
---|
2869 | endif |
---|
2870 | |
---|
2871 | |
---|
2872 | aut: |
---|
2873 | +@$(TEST_RUN_SUITE) unskip |
---|
2874 | $(MAKE) ut |
---|
2875 | |
---|
2876 | # -------------------------------------------------------------------------------- |
---|
2877 | |
---|
2878 | TIMELOG=$(ARBHOME)/arb_time.log |
---|
2879 | TIMEARGS=--append --output=$(TIMELOG) --format=" * %E(%S+%U) %P [%C]" |
---|
2880 | TIMECMD=$(TIME) $(TIMEARGS) |
---|
2881 | |
---|
2882 | time_one: |
---|
2883 | ifeq ($(ONE_TIMED_TARGET),) |
---|
2884 | @echo "Error: You have to pass ONE_TIMED_TARGET to $@" |
---|
2885 | false |
---|
2886 | else |
---|
2887 | @echo "$(SEP) $(MAKE) $(ONE_TIMED_TARGET)" |
---|
2888 | @$(TIMECMD) $(MAKE) $(ONE_TIMED_TARGET) |
---|
2889 | @echo "$(SEP) $(MAKE) $(ONE_TIMED_TARGET) [done]" |
---|
2890 | endif |
---|
2891 | |
---|
2892 | timed_target: |
---|
2893 | ifeq ($(TIMED_TARGET),) |
---|
2894 | @echo "Error: You have to pass TIMED_TARGET to $@" |
---|
2895 | false |
---|
2896 | else |
---|
2897 | @echo "Build time:" > $(TIMELOG) |
---|
2898 | $(MAKE) "ONE_TIMED_TARGET=$(TIMED_TARGET)" time_one |
---|
2899 | @cat $(TIMELOG) |
---|
2900 | @rm $(TIMELOG) |
---|
2901 | endif |
---|
2902 | |
---|
2903 | timed_target_tested: |
---|
2904 | ifeq ($(TIMED_TARGET),) |
---|
2905 | @echo "Error: You have to pass TIMED_TARGET to $@" |
---|
2906 | false |
---|
2907 | else |
---|
2908 | @echo "Build time:" > $(TIMELOG) |
---|
2909 | $(MAKE) "ONE_TIMED_TARGET=$(TIMED_TARGET)" time_one |
---|
2910 | $(MAKE) "ONE_TIMED_TARGET=ut" time_one |
---|
2911 | @cat $(TIMELOG) |
---|
2912 | @rm $(TIMELOG) |
---|
2913 | endif |
---|
2914 | |
---|
2915 | clean_timed_target: |
---|
2916 | ifeq ($(TIMED_TARGET),) |
---|
2917 | @echo "Error: You have to pass TIMED_TARGET to $@" |
---|
2918 | false |
---|
2919 | else |
---|
2920 | @echo "Build time:" > $(TIMELOG) |
---|
2921 | $(MAKE) "ONE_TIMED_TARGET=clean" time_one |
---|
2922 | $(MAKE) "ONE_TIMED_TARGET=$(TIMED_TARGET)" time_one |
---|
2923 | @cat $(TIMELOG) |
---|
2924 | @rm $(TIMELOG) |
---|
2925 | endif |
---|
2926 | |
---|
2927 | # -------------------------------------------------------------------------------- |
---|
2928 | |
---|
2929 | CHECKOUT_MODIFIED=0# set to 1 to temporarily skip test for modifications (do not check in if set to 1) |
---|
2930 | |
---|
2931 | check_svn_does_not_contain_generated: |
---|
2932 | ifeq ($(CHECKOUT_MODIFIED),0) |
---|
2933 | @echo "Testing that build does not modify files in SVN" |
---|
2934 | @test 0 = `svn status | wc -l` || ( \ |
---|
2935 | echo "The checkout is not/no longer clean:"; \ |
---|
2936 | svn status; \ |
---|
2937 | echo "- if this fails instantly, your checkout is not clean"; \ |
---|
2938 | echo "- if this fails after other targets, these targets modify checked in data"; \ |
---|
2939 | echo " (a common cause may be that depends are not up to date)"; \ |
---|
2940 | false) |
---|
2941 | else |
---|
2942 | grep -Hn 'CHECKOUT_MODIFIED' Makefile |
---|
2943 | endif |
---|
2944 | |
---|
2945 | check_svn_ignores_generated: |
---|
2946 | @test 0 = `svn status | grep '^\?' | wc -l` || ( \ |
---|
2947 | echo "There are svn-unignored files:"; \ |
---|
2948 | svn status | grep '^\?'; \ |
---|
2949 | echo "(all generated files should be svn-ignored)"; \ |
---|
2950 | false) |
---|
2951 | |
---|
2952 | check_svn_state: check_svn_does_not_contain_generated |
---|
2953 | $(MAKE) check_svn_ignores_generated |
---|
2954 | $(MAKE) savetest |
---|
2955 | |
---|
2956 | things_that_always_should_work: depends proto |
---|
2957 | |
---|
2958 | post_commit_check: |
---|
2959 | @echo "---------------------------------------- [Initial]" |
---|
2960 | $(MAKE) check_svn_state |
---|
2961 | |
---|
2962 | $(MAKE) clean |
---|
2963 | @echo "---------------------------------------- [After 'make clean']" |
---|
2964 | $(MAKE) check_svn_state |
---|
2965 | |
---|
2966 | $(MAKE) things_that_always_should_work |
---|
2967 | @echo "---------------------------------------- [After 'make things_that_always_should_work']" |
---|
2968 | $(MAKE) check_svn_state |
---|
2969 | |
---|
2970 | $(MAKE) all |
---|
2971 | @echo "---------------------------------------- [After 'make all']" |
---|
2972 | $(MAKE) check_svn_state |
---|
2973 | |
---|
2974 | $(MAKE) things_that_always_should_work |
---|
2975 | @echo "---------------------------------------- [Final]" |
---|
2976 | $(MAKE) check_svn_state |
---|
2977 | |
---|
2978 | # -------------------------------------------------------------------------------- |
---|
2979 | # sanitize arb_ntree; also works for clients (arb_edit4, ...) started from there. |
---|
2980 | |
---|
2981 | sanitize: all |
---|
2982 | ( \ |
---|
2983 | export "LSAN_OPTIONS=max_leaks=30:suppressions=$(ARBHOME)/SOURCE_TOOLS/arb.leaksan.supp"; \ |
---|
2984 | echo "sake[1]: Entering directory \`$(ARBHOME)'"; \ |
---|
2985 | $(ARBHOME)/bin/arb_ntree --execute _logged ~/data/test.arb 2>&1 ; \ |
---|
2986 | echo "sake[1]: Leaving directory \`$(ARBHOME)'" \ |
---|
2987 | ) | $(ARBHOME)/SOURCE_TOOLS/asan2msg.pl |
---|
2988 | |
---|
2989 | # -------------------------------------------------------------------------------- |
---|
2990 | # build and test one unit: |
---|
2991 | |
---|
2992 | build_oneunit: |
---|
2993 | $(MAKE) "WITHPERL=1" $(UNIT).dummy |
---|
2994 | |
---|
2995 | oneunit: |
---|
2996 | ifndef UNIT |
---|
2997 | @echo "Please define UNIT, e.g. using" |
---|
2998 | @echo " make \"UNIT=ARBDB/libARBDB\" oneunit" |
---|
2999 | @echo " make \"UNIT=SL/TREEDISP/TREEDISP\" oneunit" |
---|
3000 | @echo "(Note: 1st is a shared library, 2nd isn't)" |
---|
3001 | false |
---|
3002 | else |
---|
3003 | @echo "Build time" > $(TIMELOG) |
---|
3004 | @echo "$(SEP) $(MAKE) build_oneunit" |
---|
3005 | @$(TIMECMD) $(MAKE) build_oneunit |
---|
3006 | ifeq ($(UNIT_TESTS),1) |
---|
3007 | @echo "$(SEP) $(MAKE) run_oneunitstests" |
---|
3008 | @$(TIMECMD) $(MAKE) run_oneunitstests |
---|
3009 | endif |
---|
3010 | @cat $(TIMELOG) |
---|
3011 | @rm $(TIMELOG) |
---|
3012 | endif |
---|
3013 | |
---|
3014 | # -------------------------------------------------------------------------------- |
---|
3015 | # Main targets: |
---|
3016 | |
---|
3017 | tarfile: rebuild |
---|
3018 | $(MAKE) prepare_libdir |
---|
3019 | util/arb_compress |
---|
3020 | |
---|
3021 | tarfile_quick: all |
---|
3022 | $(MAKE) prepare_libdir |
---|
3023 | util/arb_compress |
---|
3024 | |
---|
3025 | # ----------------------------------- |
---|
3026 | |
---|
3027 | build: arb |
---|
3028 | $(MAKE) check_bin_dep preplib compile_compatibility fig_cure |
---|
3029 | |
---|
3030 | all: |
---|
3031 | @echo "Build time" > $(TIMELOG) |
---|
3032 | # $(MAKE) clean_checked_vect # uncomment to rebuild sources where expected vectorization gets tested |
---|
3033 | @echo "$(SEP) $(MAKE) all" |
---|
3034 | @$(TIMECMD) $(MAKE) build |
---|
3035 | @echo $(SEP) |
---|
3036 | @echo "made 'all' with success." |
---|
3037 | @echo "to start arb enter 'arb'" |
---|
3038 | ifeq ($(UNIT_TESTS),1) |
---|
3039 | @echo "$(SEP) $(MAKE) run_tests" |
---|
3040 | @$(TIMECMD) $(MAKE) run_tests |
---|
3041 | endif |
---|
3042 | @echo "$(SEP) $(MAKE) all [done]" |
---|
3043 | ifeq ($(DEBUG),1) |
---|
3044 | @$(MAKE) save_test_no_error >/dev/null # just show hints |
---|
3045 | endif |
---|
3046 | @cat $(TIMELOG) |
---|
3047 | @rm $(TIMELOG) |
---|
3048 | |
---|
3049 | rebuild: clean |
---|
3050 | $(MAKE) all |
---|
3051 | |
---|
3052 | # -------------------------------------------------------------------------------- |
---|
3053 | # special targets showing obvious error at bottom |
---|
3054 | # (intended to be used from automated builds) |
---|
3055 | |
---|
3056 | BUILD_LOG=build.log |
---|
3057 | SHELL=bash |
---|
3058 | REDIRECT_KEEP_EXITCODE = tee $(BUILD_LOG) ; exit "$${PIPESTATUS[0]}" |
---|
3059 | EXTRACT_ERROR_SUMMARY = (./SOURCE_TOOLS/short_error_summary.pl $(BUILD_LOG); false) |
---|
3060 | |
---|
3061 | ALL: |
---|
3062 | @(($(MAKE) all 2>&1) | $(REDIRECT_KEEP_EXITCODE)) || $(EXTRACT_ERROR_SUMMARY) |
---|
3063 | |
---|
3064 | REBUILD: |
---|
3065 | @(($(MAKE) rebuild 2>&1) | $(REDIRECT_KEEP_EXITCODE)) || $(EXTRACT_ERROR_SUMMARY) |
---|
3066 | |
---|
3067 | TARFILE: |
---|
3068 | @(($(MAKE) tarfile 2>&1) | $(REDIRECT_KEEP_EXITCODE)) || $(EXTRACT_ERROR_SUMMARY) |
---|
3069 | |
---|
3070 | TARFILE_QUICK: |
---|
3071 | @(($(MAKE) tarfile_quick 2>&1) | $(REDIRECT_KEEP_EXITCODE)) || $(EXTRACT_ERROR_SUMMARY) |
---|
3072 | |
---|