source: branches/ali/GDE/FASTTREE/Makefile

Last change on this file was 18842, checked in by westram, 3 years ago
  • allow conditional build of OPENMP version of FastTree
    • tweak preprocessor: allow to #define via CLI.
    • globally define whether OPENMP shall be used
      • export to submakefiles.
      • disable under OSX
        • capability to build OPENMP binary depends on compiler
        • LLVM/Clang 3.7 required
    • forward USE_OPENMP into preprocessor.
    • in fasttree.menu: when not defined USE_OPENMP → skip MP option from GUI + hardcode binary.
    • conditionally build OPENMP binary depending on USE_OPENMP.
File size: 793 bytes
Line 
1# FastTree Makefile for ARB
2# by Arne Boeckmann (2013)
3
4PROG = FASTTREE
5
6CC=$(A_CC)
7
8#WFLAGS=-Wall
9WFLAGS=-w
10
11CFLAGS=-O3 -finline-functions -funroll-loops
12
13LIBS=-lm
14
15SOURCE=FastTree.c
16FORMER_LOCBIN=FastTree
17
18INSTBIN_SP=$(ARBHOME)/bin/FastTree
19INSTBIN_MP=$(ARBHOME)/bin/FastTreeMP
20
21# see ../../Makefile@USE_OPENMP
22ifeq ($(USE_OPENMP),1)
23        WANTED_VERSIONS=$(INSTBIN_SP) $(INSTBIN_MP)
24else
25        WANTED_VERSIONS=$(INSTBIN_SP)
26endif
27
28# ARBs standard target
29$(MAIN) : $(WANTED_VERSIONS)
30
31$(INSTBIN_SP): $(SOURCE) Makefile
32        $(CC) $(CFLAGS) $(WFLAGS) -o $@ $< $(LIBS)
33
34$(INSTBIN_MP): $(SOURCE) Makefile
35        $(CC) -DOPENMP -fopenmp $(CFLAGS) $(WFLAGS) -o $@ $< $(LIBS)
36
37clean :
38        -rm -f $(INSTBIN_SP) $(INSTBIN_MP)
39        @-rm -f $(FORMER_LOCBIN) # remove former local binary (can be removed later)
40
41.PHONY : clean
42
43
Note: See TracBrowser for help on using the repository browser.