1 | # -------------------------------------------------------------------------------- |
---|
2 | |
---|
3 | ifeq ($(ISINA),1) |
---|
4 | ARCH_SINA_NO_DEPENDS = SINA/SINA.dummy |
---|
5 | else |
---|
6 | ARCH_SINA_NO_DEPENDS = |
---|
7 | endif |
---|
8 | |
---|
9 | # -------------------------------------------------------------------------------- |
---|
10 | |
---|
11 | ARCHS_COMMON_DEPENDS = \ |
---|
12 | CLUSTAL/CLUSTAL.dummy \ |
---|
13 | SUPPORT/SUPPORT.dummy \ |
---|
14 | AxML/AxML.dummy \ |
---|
15 | |
---|
16 | ARCHS_COMMON_NO_DEPENDS = \ |
---|
17 | PHYML20130708/PHYML20130708.dummy \ |
---|
18 | RAxML8/RAxML8.dummy \ |
---|
19 | SATIVA/SATIVA.dummy \ |
---|
20 | $(ARCH_SINA_NO_DEPENDS) \ |
---|
21 | |
---|
22 | # -------------------------------------------------------------------------------- |
---|
23 | # If a package is available as debian package it should go here |
---|
24 | # |
---|
25 | # Note: I'm not sure whether this is a good idea. Due to limited manpower it often takes |
---|
26 | # longer until ARB works with newer (incompatible) versions of these tools. --ralf |
---|
27 | |
---|
28 | ARCHS_NON_DEBIAN_DEPENDS = \ |
---|
29 | CLUSTALW/CLUSTALW.dummy \ |
---|
30 | FASTDNAML/FASTDNAML.dummy \ |
---|
31 | MrBAYES/MrBAYES.dummy \ |
---|
32 | PHYLIP/PHYLIP.dummy \ |
---|
33 | PHYML/PHYML.dummy \ |
---|
34 | RAxML/RAxML.dummy \ |
---|
35 | TREEPUZZLE/TREEPUZZLE.dummy \ |
---|
36 | |
---|
37 | ARCHS_NON_DEBIAN_NO_DEPENDS = \ |
---|
38 | FASTTREE/FASTTREE.dummy \ |
---|
39 | MAFFT/MAFFT.dummy \ |
---|
40 | MUSCLE/MUSCLE.dummy \ |
---|
41 | PROBCONS/PROBCONS.dummy \ |
---|
42 | |
---|
43 | # -------------------------------------------------------------------------------- |
---|
44 | |
---|
45 | ifeq ($(DEBIAN),1) |
---|
46 | ARCHS_DEPENDS = $(ARCHS_COMMON_DEPENDS) |
---|
47 | ARCHS_NO_DEPENDS = $(ARCHS_COMMON_NO_DEPENDS) |
---|
48 | else |
---|
49 | ARCHS_DEPENDS = $(ARCHS_COMMON_DEPENDS) $(ARCHS_NON_DEBIAN_DEPENDS) |
---|
50 | ARCHS_NO_DEPENDS = $(ARCHS_COMMON_NO_DEPENDS) $(ARCHS_NON_DEBIAN_NO_DEPENDS) |
---|
51 | endif |
---|
52 | |
---|
53 | ARCHS=$(ARCHS_DEPENDS) $(ARCHS_NO_DEPENDS) |
---|
54 | |
---|
55 | # Allow disabling build of packages individually via environment variable |
---|
56 | ARB_BUILD_SKIP_PKGS?="" |
---|
57 | ARCHS:=$(filter-out $(patsubst %,%/%.dummy,$(ARB_BUILD_SKIP_PKGS)), $(ARCHS)) |
---|
58 | |
---|
59 | # -------------------------------------------------------------------------------- |
---|
60 | # modify cflags for submakefiles |
---|
61 | |
---|
62 | RAISE_WARNINGS=1# raise warnings in this subtree |
---|
63 | |
---|
64 | sub_cflags:=$(cflags) |
---|
65 | |
---|
66 | ifeq ('$(RAISE_WARNINGS)','0') |
---|
67 | sub_cflags:=$(subst -W -Wall,-w,$(sub_cflags)) |
---|
68 | $(warning Warning: All compiler warnings were disabled in subtree GDE. Doing so is not recommended!) |
---|
69 | else |
---|
70 | # standard mode: uses standard warnings only |
---|
71 | sub_cflags:=$(subst -Wall,,$(sub_cflags)) |
---|
72 | endif |
---|
73 | |
---|
74 | UNIT_TESTS=0# dont run tests in this subtree - there are none. |
---|
75 | |
---|
76 | ifeq ('$(UNIT_TESTS)','0') |
---|
77 | sub_cflags:=$(subst -DUNIT_TESTS,,$(sub_cflags)) |
---|
78 | endif |
---|
79 | |
---|
80 | # skip vectorization info |
---|
81 | sub_cflags:=$(subst -fopt-info-vec-missed , ,$(sub_cflags)) |
---|
82 | sub_cflags:=$(subst -fopt-info-vec , ,$(sub_cflags)) |
---|
83 | sub_cflags:=$(subst -fopt-info , ,$(sub_cflags)) |
---|
84 | |
---|
85 | # skip coverage support |
---|
86 | sub_cflags:=$(subst -ftest-coverage , ,$(sub_cflags)) |
---|
87 | sub_cflags:=$(subst -fprofile-arcs , ,$(sub_cflags)) |
---|
88 | |
---|
89 | # note the above substs do not affect ALL subdirs. see also manual changes to: |
---|
90 | # - MrBAYES/mrbayes_3.2.1/Makefile |
---|
91 | # - PROBCONS/probcons/Makefile |
---|
92 | # - FASTTREE/Makefile |
---|
93 | # - SATIVA/Makefile |
---|
94 | # - MAFFT/Makefile |
---|
95 | |
---|
96 | # -------------------------------------------------------------------------------- |
---|
97 | |
---|
98 | $(MAIN): $(ARCHS) |
---|
99 | |
---|
100 | depends: $(ARCHS_DEPENDS:.dummy=.depend) |
---|
101 | |
---|
102 | clean: $(ARCHS:.dummy=.clean) |
---|
103 | |
---|
104 | %.depend: |
---|
105 | @cp -p $(@D)/Makefile $(@D)/Makefile.old # save old Makefile |
---|
106 | @$(MAKE) -C $(@D) -r depends |
---|
107 | @grep "^# DO NOT DELETE" $(@D)/Makefile >/dev/null || \ |
---|
108 | (echo "$(@D)/Makefile:666: Error: No dependencies in $(@D)/Makefile"; false) # check whether sub Makefile has dependencies |
---|
109 | @$(ARBHOME)/SOURCE_TOOLS/fix_depends.pl "(from GDE)" < $(@D)/Makefile > $(@D)/Makefile.2 |
---|
110 | @mv $(@D)/Makefile.old $(@D)/Makefile # restore old Makefile |
---|
111 | @$(ARBHOME)/SOURCE_TOOLS/mv_if_diff $(@D)/Makefile.2 $(@D)/Makefile # update Makefile if changed |
---|
112 | |
---|
113 | %.dummy: |
---|
114 | +@( \ |
---|
115 | (( \ |
---|
116 | echo "$(SEP) Make $(@D)"; \ |
---|
117 | $(MAKE) -C $(@D) -r \ |
---|
118 | "ARB = yes" \ |
---|
119 | "MAIN = $(@F:.dummy=.a)" \ |
---|
120 | "cflags = $(sub_cflags) -DIN_ARB_$(@D:/=)" && \ |
---|
121 | echo "$(SEP) Make $(@D) [done]"; \ |
---|
122 | ) >$(@D).$$ID.log 2>&1 && (cat $(@D).$$ID.log;rm $(@D).$$ID.log)) || (cat $(@D).$$ID.log;rm $(@D).$$ID.log;false)) |
---|
123 | |
---|
124 | %.clean: |
---|
125 | +@$(MAKE) -C $(@D) \ |
---|
126 | "ARB = yes" \ |
---|
127 | clean |
---|
128 | |
---|
129 | %.proto: |
---|
130 | @$(MAKE) -C $(@D) \ |
---|
131 | proto |
---|
132 | |
---|
133 | # the end of the above command avoids that the output of parallel make calls gets mixed up |
---|
134 | |
---|
135 | # DO NOT DELETE |
---|
136 | |
---|
137 | # Do not add dependencies manually - use 'make depend' in $ARBHOME |
---|
138 | # For formatting issues see SOURCE_TOOLS/fix_depends.pl (from main) |
---|