source: branches/gcc/GDE/RAxML8/Makefile

Last change on this file was 19946, checked in by westram, 6 days ago
  • fix build of raxml8 + sativa:
    • explicitly set C dialect to supportedCdialect, but limit it to c17
    • do not suppress warnings in sativa build.
File size: 1.9 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 AVX.PTHREADS
8
9TARFILE=$(wildcard standard-RAxML-8.*.*gz)
10
11ifeq ($(DARWIN),1)
12  MAKE_SUFFIX=mac
13else
14  MAKE_SUFFIX=gcc
15endif
16
17RAXML_BIN=$(ARBHOME)/bin/raxmlHPC8-
18
19# select C dialect to use:
20ifeq ($(shell test $(supportedCdialect) -gt 17; echo $$?),0)
21 CDIALECT:=-std=c17
22else
23 CDIALECT:=-std=c$(supportedCdialect)
24endif
25onlyC_flags += $(CDIALECT)
26
27## targets called by "upsteam makefile":
28
29all: install
30
31
32clean:
33        rm -rf builddir.*
34        rm -f $(RAXML_BIN)*
35        rm -f unpack.*.stamp
36
37wantNoWindowsExecutables:
38        find . -name "WindowsExecutables*" -type d -exec rm -r {} \; || true
39
40## internal targets
41
42OBSOLETE_MENU=$(ARBHOME)/lib/gde/raxml8.menu
43
44install: build
45        cp arb_raxml8.sh $(ARBHOME)/bin
46        chmod a+x $(ARBHOME)/bin/arb_raxml8.sh
47        test ! -e $(OBSOLETE_MENU) || rm $(OBSOLETE_MENU)
48
49build:  require_tarball $(VERSIONS:%=$(RAXML_BIN)%)
50        $(MAKE) wantNoWindowsExecutables
51
52require_tarball:
53ifeq ($(TARFILE),)
54        $(error Failed to detect RAxML tarball)
55endif
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
61        MAKEFLAGS= onlyC_flags="$(onlyC_flags)" $(MAKE) -C $(<:unpack.%.stamp=builddir.%) -f Makefile.$(@:$(RAXML_BIN)%=%).$(MAKE_SUFFIX)
62        cp $(<:unpack.%.stamp=builddir.%)/raxmlHPC-* $@
63
64unpack.%.stamp: require_tarball $(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 --in-place 's/-march=native//' $$DIR/Makefile* &&\
70                arb_sed --in-place 's/\(CFLAGS.*\)#/\1 $$(onlyC_flags) #/' $$DIR/Makefile* )
71        touch $@ -r $(TARFILE)
72
73%.stamp:
74        echo $@
75
76# prevent make from deleting intermediate targets:
77.SECONDARY:
78
79.PHONY: clean all
Note: See TracBrowser for help on using the repository browser.