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