source: tags/testbuild/GDE/SATIVA/Makefile

Last change on this file was 13065, checked in by westram, 10 years ago
  • fix install of subdirectory 'sativa' for svn-1.6-WCs
    • did copy .svn subdirectories and failed on 2nd install
  • added target 'uninstall' (performed with clean)
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
8
9# AVX needs gcc >= 4.6.0
10ifeq ("$(USE_GCC_46_OR_HIGHER)", "yes")
11  VERSIONS+=AVX.PTHREADS
12endif
13
14TARFILE=$(wildcard sativa-RAxML-8.*.*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
35install: build
36        cp arb_sativa.pl $(ARBHOME)/bin
37        chmod a+x $(ARBHOME)/bin/arb_sativa.pl
38        cp arb_raxml8_sativa.sh $(ARBHOME)/bin
39        chmod a+x $(ARBHOME)/bin/arb_raxml8_sativa.sh
40        cp sativa.menu $(ARBHOME)/lib/gde
41        find sativa -path "*.svn" -prune -o -type d -exec mkdir -p $(ARBHOME)/bin/{} \; 
42        find sativa -path "*.svn" -prune -o -type f -exec cp -p {} $(ARBHOME)/bin/{} \; 
43#       ln -s $(ARBHOME)/bin $(ARBHOME)/bin/sativa/epac/bin
44
45uninstall:
46        rm -f $(ARBHOME)/bin/arb_sativa.pl
47        rm -f $(ARBHOME)/bin/arb_raxml8_sativa.sh
48        rm -rf $(ARBHOME)/bin/sativa
49        rm -f $(ARBHOME)/lib/gde/sativa.menu
50
51clean: clean_local uninstall
52
53build:  $(VERSIONS:%=$(RAXML_BIN)%)
54
55# (MAKEFLAGS need to be unset as ARB sets "-r", suppressing built-in rules,
56#  which are needed by RAxML)
57
58$(RAXML_BIN)%: unpack.%.stamp
59        MAKEFLAGS= $(MAKE) -C $(<:unpack.%.stamp=builddir.%) -f Makefile.$(@:$(RAXML_BIN)%=%).$(MAKE_SUFFIX)
60        cp $(<:unpack.%.stamp=builddir.%)/raxmlHPC-* $@
61
62unpack.%.stamp: $(TARFILE)
63        (DIR=$(@:unpack.%.stamp=builddir.%); \
64        rm -rf $$DIR &&\
65        mkdir $$DIR &&\
66        tar -C $$DIR --strip-components=1 -xzf $(TARFILE) &&\
67        arb_sed -i 's/-march=native//' $$DIR/Makefile*)
68        touch $@ -r $(TARFILE) 
69
70%.stamp:
71        echo $@
72
73# prevent make from deleting intermediate targets:
74.SECONDARY:
75
76.PHONY: clean all install build uninstall clean_local
Note: See TracBrowser for help on using the repository browser.