# Wrapper to build RAxML versions # _PORTABLE_PTHREADS in axml.c to get pthread pinning on linux # use approx 1 thread per 500bp # Versions of RAxML to build VERSIONS:=SSE3.PTHREADS PTHREADS # AVX needs gcc >= 4.6.0 ifeq ("$(USE_GCC_46_OR_HIGHER)", "yes") VERSIONS+=AVX.PTHREADS endif TARFILE=$(wildcard standard-RAxML-8.*.*gz) ifeq ($(DARWIN),1) MAKE_SUFFIX=mac else MAKE_SUFFIX=gcc endif RAXML_BIN=$(ARBHOME)/bin/raxmlHPC8- ## targets called by "upsteam makefile": all: install clean: rm -rf builddir.* rm -f $(RAXML_BIN)* rm -f unpack.*.stamp wantNoWindowsExecutables: find . -name "WindowsExecutables*" -type d -exec rm -r {} \; || true ## internal targets OBSOLETE_MENU=$(ARBHOME)/lib/gde/raxml8.menu install: build cp arb_raxml8.sh $(ARBHOME)/bin chmod a+x $(ARBHOME)/bin/arb_raxml8.sh test ! -e $(OBSOLETE_MENU) || rm $(OBSOLETE_MENU) build: require_tarball $(VERSIONS:%=$(RAXML_BIN)%) $(MAKE) wantNoWindowsExecutables require_tarball: ifeq ($(TARFILE),) $(error Failed to detect RAxML tarball) endif # (MAKEFLAGS need to be unset as ARB sets "-r", suppressing built-in rules, # which are needed by RAxML) $(RAXML_BIN)%: unpack.%.stamp MAKEFLAGS= onlyC_flags="$(onlyC_flags)" $(MAKE) -C $(<:unpack.%.stamp=builddir.%) -f Makefile.$(@:$(RAXML_BIN)%=%).$(MAKE_SUFFIX) cp $(<:unpack.%.stamp=builddir.%)/raxmlHPC-* $@ unpack.%.stamp: require_tarball $(TARFILE) (DIR=$(@:unpack.%.stamp=builddir.%); \ rm -rf $$DIR &&\ mkdir $$DIR &&\ tar -C $$DIR --strip-components=1 -xzf $(TARFILE) &&\ arb_sed --in-place 's/-march=native//' $$DIR/Makefile* &&\ arb_sed --in-place 's/\(CFLAGS.*\)#/\1 $$(onlyC_flags) #/' $$DIR/Makefile* ) touch $@ -r $(TARFILE) %.stamp: echo $@ # prevent make from deleting intermediate targets: .SECONDARY: .PHONY: clean all