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