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