source: tags/arb-6.0/GDE/Makefile

Last change on this file was 11821, checked in by westram, 8 years ago
  • prepare MrBayes-32bit compilation
    • pass down ARB_64 into submakefiles
    • generate dependencies in MrBayes Makefile (fixes missing dependency from config.h)
    • pass ARB_64 and DARWIN to gcc and use them to define flags in config.h:
      • ARB_64 → SSE_ENABLED + _64BIT
      • ARB_DARWIN → MAC_VERSION (UNIX_VERSION otherwise)
      • let 32bit-compile fail for now
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.1 KB
Line 
1
2ARCHS_COMMON = \
3        CLUSTAL/CLUSTAL.dummy  \
4        SUPPORT/SUPPORT.dummy \
5        AxML/AxML.dummy \
6        RAxML/RAxML.dummy \
7        PHYML/PHYML.dummy \
8        MrBAYES/MrBAYES.dummy \
9
10ARCHS_NO_DEPENDS = \
11        PHYML20130708/PHYML20130708.dummy \
12        MAFFT/MAFFT.dummy \
13        MUSCLE/MUSCLE.dummy \
14        PROBCONS/PROBCONS.dummy \
15        FASTTREE/FASTTREE.dummy \
16
17# --------------------------------------------------------------------------------
18# If a package is available as debian package it should go here
19#
20# Note: I'm not sure whether this is a good idea. Due to limited manpower it often takes
21# longer until ARB works with newer (incompatible) versions of these tools. --ralf
22
23ARCHS_NON_DEBIAN = \
24        CLUSTALW/CLUSTALW.dummy  \
25        PHYLIP/PHYLIP.dummy \
26        TREEPUZZLE/TREEPUZZLE.dummy \
27        FASTDNAML/FASTDNAML.dummy \
28
29# --------------------------------------------------------------------------------
30
31ifeq ($(DEBIAN),1)
32ARCHS_DEPENDS = $(ARCHS_COMMON)
33else
34ARCHS_DEPENDS = $(ARCHS_COMMON) $(ARCHS_NON_DEBIAN)
35endif
36
37ARCHS=$(ARCHS_DEPENDS) $(ARCHS_NO_DEPENDS)
38
39# --------------------------------------------------------------------------------
40# modify cflags for submakefiles
41
42RAISE_WARNINGS=0# no warnings in this subtree
43UNIT_TESTS=0# no tests in this subtree
44
45sub_cflags:=$(cflags)
46
47ifeq ('$(RAISE_WARNINGS)','0')
48sub_cflags:=$(subst -W -Wall,-w,$(sub_cflags))
49endif
50ifeq ('$(UNIT_TESTS)','0')
51sub_cflags:=$(subst -DUNIT_TESTS,,$(sub_cflags))
52endif
53
54# note the above does not affect all subdirs. see also manual changes to:
55# - MrBAYES/mrbayes_3.2.1/Makefile
56# - PROBCONS/probcons/Makefile
57# - FASTTREE/Makefile
58
59# --------------------------------------------------------------------------------
60
61$(MAIN):
62ifeq ('$(RAISE_WARNINGS)','0')
63        @echo ----------------- non-ARB code: warnings disabled
64endif
65        $(MAKE) $(ARCHS)
66ifeq ('$(RAISE_WARNINGS)','0')
67        @echo ----------------- warnings enabled again
68endif
69
70depends: $(ARCHS_DEPENDS:.dummy=.depend)
71
72clean: $(ARCHS:.dummy=.clean)
73
74%.depend:
75        @cp -p $(@D)/Makefile $(@D)/Makefile.old # save old Makefile
76        @$(MAKE) -C $(@D) -r depends
77        @grep "^# DO NOT DELETE" $(@D)/Makefile >/dev/null || \
78                (echo "$(@D)/Makefile:666: Error: No dependencies in $(@D)/Makefile"; false) # check whether sub Makefile has dependencies
79        @$(ARBHOME)/SOURCE_TOOLS/fix_depends.pl "(from GDE)" < $(@D)/Makefile > $(@D)/Makefile.2
80        @mv $(@D)/Makefile.old $(@D)/Makefile # restore old Makefile
81        @$(ARBHOME)/SOURCE_TOOLS/mv_if_diff $(@D)/Makefile.2 $(@D)/Makefile # update Makefile if changed
82
83%.dummy:
84        +@( \
85        (( \
86            echo "$(SEP) Make $(@D)"; \
87            $(MAKE) -C $(@D) -r \
88                "ARB  = yes" \
89                "MAIN = $(@F:.dummy=.a)" \
90                "cflags = $(sub_cflags) -DIN_ARB_$(@D:/=)" && \
91            echo "$(SEP) Make $(@D) [done]"; \
92        ) >$(@D).$$ID.log 2>&1 && (cat $(@D).$$ID.log;rm $(@D).$$ID.log)) || (cat $(@D).$$ID.log;rm $(@D).$$ID.log;false))
93
94%.clean:
95        +@$(MAKE) -C $(@D) \
96                "ARB  = yes" \
97                clean
98
99%.proto:
100        @$(MAKE) -C $(@D) \
101                proto
102
103# the end of the above command avoids that the output of parallel make calls gets mixed up
104
105# DO NOT DELETE
106
107# Do not add dependencies manually - use 'make depend' in $ARBHOME
108# For formatting issues see SOURCE_TOOLS/fix_depends.pl (from main)
Note: See TracBrowser for help on using the repository browser.