source: branches/nameserver/GDE/RAxML8/Makefile

Last change on this file was 18125, checked in by westram, 5 years ago
File size: 1.3 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=$(wildcard standard-RAxML-8.*.*gz)
15
16ifeq ($(DARWIN),1)
17  MAKE_SUFFIX=mac
18else
19  MAKE_SUFFIX=gcc
20endif
21
22RAXML_BIN=$(ARBHOME)/bin/raxmlHPC8-
23
24## targets called by "upsteam makefile":
25
26all: install
27
28clean:
29        rm -rf builddir.*
30        rm -f $(RAXML_BIN)*
31        rm -f unpack.*.stamp
32
33## internal targets
34
35install: build
36        cp arb_raxml8.sh $(ARBHOME)/bin
37        chmod a+x $(ARBHOME)/bin/arb_raxml8.sh
38        cp raxml8.menu $(ARBHOME)/lib/gde
39
40build:  $(VERSIONS:%=$(RAXML_BIN)%)
41
42# (MAKEFLAGS need to be unset as ARB sets "-r", suppressing built-in rules,
43#  which are needed by RAxML)
44
45$(RAXML_BIN)%: unpack.%.stamp
46        MAKEFLAGS= $(MAKE) -C $(<:unpack.%.stamp=builddir.%) -f Makefile.$(@:$(RAXML_BIN)%=%).$(MAKE_SUFFIX)
47        cp $(<:unpack.%.stamp=builddir.%)/raxmlHPC-* $@
48
49unpack.%.stamp: $(TARFILE)
50        (DIR=$(@:unpack.%.stamp=builddir.%); \
51        rm -rf $$DIR &&\
52        mkdir $$DIR &&\
53        tar -C $$DIR --strip-components=1 -xzf $(TARFILE) &&\
54        arb_sed -i 's/-march=native//' $$DIR/Makefile*)
55        touch $@ -r $(TARFILE)
56
57%.stamp:
58        echo $@
59
60# prevent make from deleting intermediate targets:
61.SECONDARY:
62
63.PHONY: clean all
Note: See TracBrowser for help on using the repository browser.