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