source: trunk/GDE/Makefile

Last change on this file was 19480, checked in by westram, 15 months ago
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.2 KB
Line 
1# --------------------------------------------------------------------------------
2
3ifeq ($(ISINA),1)
4        ARCH_SINA_NO_DEPENDS = SINA/SINA.dummy
5else
6        ARCH_SINA_NO_DEPENDS =
7endif
8
9# --------------------------------------------------------------------------------
10
11ARCHS_COMMON_DEPENDS = \
12        CLUSTAL/CLUSTAL.dummy  \
13        SUPPORT/SUPPORT.dummy \
14        AxML/AxML.dummy \
15
16ARCHS_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
28ARCHS_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
37ARCHS_NON_DEBIAN_NO_DEPENDS = \
38        FASTTREE/FASTTREE.dummy \
39        MAFFT/MAFFT.dummy \
40        MUSCLE/MUSCLE.dummy \
41        PROBCONS/PROBCONS.dummy \
42
43# --------------------------------------------------------------------------------
44
45ifeq ($(DEBIAN),1)
46ARCHS_DEPENDS    = $(ARCHS_COMMON_DEPENDS)
47ARCHS_NO_DEPENDS = $(ARCHS_COMMON_NO_DEPENDS)
48else
49ARCHS_DEPENDS    = $(ARCHS_COMMON_DEPENDS)    $(ARCHS_NON_DEBIAN_DEPENDS)
50ARCHS_NO_DEPENDS = $(ARCHS_COMMON_NO_DEPENDS) $(ARCHS_NON_DEBIAN_NO_DEPENDS)
51endif
52
53ARCHS=$(ARCHS_DEPENDS) $(ARCHS_NO_DEPENDS)
54
55# Allow disabling build of packages individually via environment variable
56ARB_BUILD_SKIP_PKGS?=""
57ARCHS:=$(filter-out $(patsubst %,%/%.dummy,$(ARB_BUILD_SKIP_PKGS)), $(ARCHS))
58
59# --------------------------------------------------------------------------------
60# modify cflags for submakefiles
61
62RAISE_WARNINGS=1# raise warnings in this subtree
63
64sub_cflags:=$(cflags)
65
66ifeq ('$(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!)
69else
70# standard mode: uses standard warnings only
71        sub_cflags:=$(subst -Wall,,$(sub_cflags))
72endif
73
74UNIT_TESTS=0# dont run tests in this subtree - there are none.
75
76ifeq ('$(UNIT_TESTS)','0')
77sub_cflags:=$(subst -DUNIT_TESTS,,$(sub_cflags))
78endif
79
80# skip vectorization info
81sub_cflags:=$(subst -fopt-info-vec-missed , ,$(sub_cflags))
82sub_cflags:=$(subst -fopt-info-vec , ,$(sub_cflags))
83sub_cflags:=$(subst -fopt-info , ,$(sub_cflags))
84
85# skip coverage support
86sub_cflags:=$(subst -ftest-coverage , ,$(sub_cflags))
87sub_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
100depends: $(ARCHS_DEPENDS:.dummy=.depend)
101
102clean: $(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)
Note: See TracBrowser for help on using the repository browser.