source: branches/ali/GDE/SATIVA/Makefile

Last change on this file was 19234, checked in by westram, 2 years ago
File size: 2.0 KB
Line 
1# Wrapper to build RAxML versions
2
3# _PORTABLE_PTHREADS in axml.c to get pthread pinning on linux
4# use approx 1 thread per 500bp
5
6# Versions of RAxML to build
7VERSIONS:=SSE3.PTHREADS PTHREADS
8
9# AVX needs gcc >= 4.6.0
10ifeq ("$(USE_GCC_46_OR_HIGHER)", "yes")
11  VERSIONS+=AVX.PTHREADS
12endif
13
14TARFILE=sativa-RAxML-8.2.3-patched.tar.gz
15
16ifeq ($(DARWIN),1)
17  MAKE_SUFFIX=mac
18else
19  MAKE_SUFFIX=gcc
20endif
21
22RAXML_BIN=$(ARBHOME)/bin/raxmlHPC8-sativa-
23
24## targets called by "upsteam makefile":
25
26all: install
27
28clean_local:
29        rm -rf builddir.*
30        rm -f $(RAXML_BIN)*
31        rm -f unpack.*.stamp
32
33## internal targets
34
35OBSOLETE_MENU=$(ARBHOME)/lib/gde/sativa.menu
36
37install: build
38        cp arb_sativa.pl $(ARBHOME)/bin
39        chmod a+x $(ARBHOME)/bin/arb_sativa.pl
40        cp arb_raxml8_sativa.sh $(ARBHOME)/bin
41        chmod a+x $(ARBHOME)/bin/arb_raxml8_sativa.sh
42        test ! -e $(OBSOLETE_MENU) || rm $(OBSOLETE_MENU)
43        find sativa -path "*.svn" -prune -o -type d -exec mkdir -p $(ARBHOME)/lib/{} \;
44        find sativa -path "*.svn" -prune -o -type f -exec cp -p {} $(ARBHOME)/lib/{} \;
45#       ln -s $(ARBHOME)/bin $(ARBHOME)/bin/sativa/epac/bin
46
47uninstall:
48        rm -f $(ARBHOME)/bin/arb_sativa.pl
49        rm -f $(ARBHOME)/bin/arb_raxml8_sativa.sh
50        rm -rf $(ARBHOME)/lib/sativa
51        rm -f $(ARBHOME)/lib/gde/sativa.menu
52
53clean: clean_local uninstall
54
55build:  $(VERSIONS:%=$(RAXML_BIN)%)
56
57# (MAKEFLAGS need to be unset as ARB sets "-r", suppressing built-in rules,
58#  which are needed by RAxML)
59
60$(RAXML_BIN)%: unpack.%.stamp Makefile
61        ( MAKEFLAGS= $(MAKE) -C $(<:unpack.%.stamp=builddir.%) -f Makefile.$(@:$(RAXML_BIN)%=%).$(MAKE_SUFFIX) ) 2>&1 | grep -vi ' warning: '
62        cp $(<:unpack.%.stamp=builddir.%)/raxmlHPC-* $@
63
64unpack.%.stamp: $(TARFILE)
65        (DIR=$(@:unpack.%.stamp=builddir.%); \
66        rm -rf $$DIR &&\
67        mkdir $$DIR &&\
68        tar -C $$DIR --strip-components=1 -xzf $(TARFILE) &&\
69        arb_sed -i 's/-march=native//' $$DIR/Makefile*)
70        touch $@ -r $(TARFILE)
71
72%.stamp:
73        echo $@
74
75# prevent make from deleting intermediate targets:
76.SECONDARY:
77
78.PHONY: clean all install build uninstall clean_local
Note: See TracBrowser for help on using the repository browser.