source: tags/ms_ra2q1/Makefile

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