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