source: tags/arb-6.0-rc1/GDE/MrBAYES/Makefile

Last change on this file was 11821, checked in by westram, 11 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
File size: 1.2 KB
Line 
1# MrBayes Makefile for ARB
2# by Arne Boeckmann (2013)
3
4PROG   = MrBAYES
5SUB    = mrbayes_3.2.1
6FOLDER =$(ARBHOME)/GDE/MrBAYES/$(SUB)
7
8LOCBIN=$(FOLDER)/mb
9LOCDEPS=$(FOLDER)/Makefile $(wildcard $(FOLDER)/*.c) $(wildcard $(FOLDER)/*.h)
10
11INSTBIN=$(ARBHOME)/bin/mb
12
13# ARBs standard target
14$(MAIN) : $(INSTBIN)
15
16clean :
17        rm -f $(INSTBIN)
18        cd $(FOLDER) && make clean
19
20$(INSTBIN) : $(LOCBIN)
21        cp $(LOCBIN) $(INSTBIN)
22
23$(LOCBIN): $(LOCDEPS)
24        +cd $(FOLDER) && $(MAKE) mb
25
26depends: $(SUB)/$(SUB).depend
27
28%.depend:
29        @cp -p $(@D)/Makefile $(@D)/Makefile.old # save old Makefile
30        @$(MAKE) -C $(@D) -r depends
31        @grep "^# DO NOT DELETE" $(@D)/Makefile >/dev/null || \
32                (echo "$(@D)/Makefile:666: Error: No dependencies in $(@D)/Makefile"; false) # check whether sub Makefile has dependencies
33        @$(ARBHOME)/SOURCE_TOOLS/fix_depends.pl "(from GDE/MrBayes)" < $(@D)/Makefile > $(@D)/Makefile.2
34        @mv $(@D)/Makefile.old $(@D)/Makefile # restore old Makefile
35        @$(ARBHOME)/SOURCE_TOOLS/mv_if_diff $(@D)/Makefile.2 $(@D)/Makefile # update Makefile if changed
36
37.PHONY : clean depends
38
39# DO NOT DELETE
40
41# Do not add dependencies manually - use 'make depend' in $ARBHOME
42# For formatting issues see SOURCE_TOOLS/fix_depends.pl (from GDE)
Note: See TracBrowser for help on using the repository browser.