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