]> git.donarmstrong.com Git - mothur.git/blob - makefile
fixed bug with phylo.diversity. not calculating as intended.
[mothur.git] / makefile
1 ###################################################
2 #
3 # Makefile for mothur
4 # Created: June 29, 2010
5 #
6 ###################################################
7
8 #
9 # Macros
10 #
11
12 # Optimize to level 3:
13
14 CXXFLAGS += -O3
15
16 MOTHUR_FILES = "\"../Release\""
17 ifeq  ($(strip $(MOTHUR_FILES)),"\"Enter_your_default_path_here\"")
18 else
19         CXXFLAGS += -DMOTHUR_FILES=${MOTHUR_FILES}
20 endif
21
22 CYGWIN_BUILD ?= no
23 ifeq  ($(strip $(CYGWIN_BUILD)),yes)
24     CXXFLAGS += -mno-cygwin
25     LDFLAGS += -mno-cygwin 
26 endif
27
28 64BIT_VERSION ?= yes
29
30 ifeq  ($(strip $(64BIT_VERSION)),yes)
31     TARGET_ARCH += -arch x86_64
32          CXXFLAGS += -DBIT_VERSION
33         
34         #if you are using centos uncomment the following lines
35         #CXX = g++44
36         #CXXFLAGS += -mtune=native -march=native -m64
37 endif
38
39 # if you do not want to use the readline library, set this to no.
40 # make sure you have the library installed
41
42 USEREADLINE ?= yes
43
44 ifeq  ($(strip $(USEREADLINE)),yes)
45     CXXFLAGS += -DUSE_READLINE
46     LDFLAGS += \
47       -lreadline\
48       -lncurses
49 endif
50
51 USEMPI ?= no
52
53 ifeq  ($(strip $(USEMPI)),yes)
54     CXX = mpic++
55     CXXFLAGS += -DUSE_MPI
56 endif
57
58 #
59 # INCLUDE directories for mothur
60 #
61
62      CXXFLAGS += -I.
63
64 #
65 # Get the list of all .cpp files, rename to .o files
66 #
67
68 OBJECTS=$(patsubst %.cpp,%.o,$(wildcard *.cpp))
69
70 mothur : $(OBJECTS)
71         $(CXX) $(LDFLAGS) $(TARGET_ARCH) -o $@ $(OBJECTS)
72
73 install : mothur
74         cp mothur ../Release/mothur
75
76 %.o : %.cpp %.h
77         $(COMPILE.cpp) $(OUTPUT_OPTION) $<
78 %.o : %.cpp %.hpp
79         $(COMPILE.cpp) $(OUTPUT_OPTION) $<
80
81
82 clean :
83         @rm -f $(OBJECTS)
84