]> git.donarmstrong.com Git - mothur.git/blob - makefile
removed parse.sff command and made its functionality part of sffinfo command. fixed...
[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 64BIT_VERSION ?= yes
17
18 ifeq  ($(strip $(64BIT_VERSION)),yes)
19         #if you are using centos uncomment the following lines
20         #CXX = g++44
21         
22         #if you are a mac user use the following line
23         TARGET_ARCH += -arch x86_64
24         
25         #if you are a linux user use the following line
26         #CXXFLAGS += -mtune=native -march=native -m64
27         
28          CXXFLAGS += -DBIT_VERSION
29 endif
30
31 MOTHUR_FILES = "\"../release\""
32
33 RELEASE_DATE = "\"12/10/2010\""
34 VERSION = "\"1.15.0\""
35
36 CXXFLAGS += -DRELEASE_DATE=${RELEASE_DATE} -DVERSION=${VERSION}
37
38 ifeq  ($(strip $(MOTHUR_FILES)),"\"Enter_your_default_path_here\"")
39 else
40         CXXFLAGS += -DMOTHUR_FILES=${MOTHUR_FILES}
41 endif
42
43 CYGWIN_BUILD ?= no
44 ifeq  ($(strip $(CYGWIN_BUILD)),yes)
45     CXXFLAGS += -mno-cygwin
46     LDFLAGS += -mno-cygwin 
47 endif
48
49 # if you do not want to use the readline library, set this to no.
50 # make sure you have the library installed
51
52 USEREADLINE ?= yes
53
54 ifeq  ($(strip $(USEREADLINE)),yes)
55     CXXFLAGS += -DUSE_READLINE
56     LIBS = \
57       -lreadline\
58       -lncurses
59 endif
60
61 USEMPI ?= no
62
63 ifeq  ($(strip $(USEMPI)),yes)
64     CXX = mpic++
65     CXXFLAGS += -DUSE_MPI
66 endif
67
68 # if you want to enable reading and writing of compressed files, set to yes.
69 # The default is no.  this may only work on unix-like systems, not for windows.
70
71 USECOMPRESSION ?= no
72
73 ifeq  ($(strip $(USECOMPRESSION)),yes)
74   CXXFLAGS += -DUSE_COMPRESSION
75 endif
76
77 #
78 # INCLUDE directories for mothur
79 #
80
81      CXXFLAGS += -I.
82
83 #
84 # Get the list of all .cpp files, rename to .o files
85 #
86
87 OBJECTS=$(patsubst %.cpp,%.o,$(wildcard *.cpp))
88 OBJECTS+=$(patsubst %.c,%.o,$(wildcard *.c))
89
90 mothur : $(OBJECTS)
91         $(CXX) $(LDFLAGS) $(TARGET_ARCH) -o $@ $(OBJECTS) $(LIBS)
92         
93         strip mothur
94
95 install : mothur
96 #       cp mothur ../Release/mothur
97         
98 %.o : %.c %.h
99         $(COMPILE.c) $(OUTPUT_OPTION) $<
100 %.o : %.cpp %.h
101         $(COMPILE.cpp) $(OUTPUT_OPTION) $<
102 %.o : %.cpp %.hpp
103         $(COMPILE.cpp) $(OUTPUT_OPTION) $<
104
105
106 clean :
107         @rm -f $(OBJECTS)
108