]> git.donarmstrong.com Git - mothur.git/blob - makefile
paralellized summary.shared
[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
18 RELEASE_DATE = "\"9/9/2010\""
19 VERSION = "\"1.13.0\""
20
21 CXXFLAGS += -DRELEASE_DATE=${RELEASE_DATE} -DVERSION=${VERSION}
22
23 ifeq  ($(strip $(MOTHUR_FILES)),"\"Enter_your_default_path_here\"")
24 else
25         CXXFLAGS += -DMOTHUR_FILES=${MOTHUR_FILES}
26 endif
27
28 CYGWIN_BUILD ?= no
29 ifeq  ($(strip $(CYGWIN_BUILD)),yes)
30     CXXFLAGS += -mno-cygwin
31     LDFLAGS += -mno-cygwin 
32 endif
33
34 64BIT_VERSION ?= yes
35
36 ifeq  ($(strip $(64BIT_VERSION)),yes)
37     TARGET_ARCH += -arch x86_64
38          CXXFLAGS += -DBIT_VERSION
39         
40         #if you are using centos uncomment the following lines
41         #CXX = g++44
42         #CXXFLAGS += -mtune=native -march=native -m64
43 endif
44
45 # if you do not want to use the readline library, set this to no.
46 # make sure you have the library installed
47
48 USEREADLINE ?= yes
49
50 ifeq  ($(strip $(USEREADLINE)),yes)
51     CXXFLAGS += -DUSE_READLINE
52     LDFLAGS += \
53       -lreadline\
54       -lncurses
55 endif
56
57 USEMPI ?= no
58
59 ifeq  ($(strip $(USEMPI)),yes)
60     CXX = mpic++
61     CXXFLAGS += -DUSE_MPI
62 endif
63
64 #
65 # INCLUDE directories for mothur
66 #
67
68      CXXFLAGS += -I.
69
70 #
71 # Get the list of all .cpp files, rename to .o files
72 #
73
74 OBJECTS=$(patsubst %.cpp,%.o,$(wildcard *.cpp))
75
76 mothur : $(OBJECTS)
77         $(CXX) $(LDFLAGS) $(TARGET_ARCH) -o $@ $(OBJECTS)
78
79 install : mothur
80         cp mothur ../Release/mothur
81
82 %.o : %.cpp %.h
83         $(COMPILE.cpp) $(OUTPUT_OPTION) $<
84 %.o : %.cpp %.hpp
85         $(COMPILE.cpp) $(OUTPUT_OPTION) $<
86
87
88 clean :
89         @rm -f $(OBJECTS)
90