We will be offering mothur and R workshops throughout 2019. Learn more.

Difference between revisions of "Makefile options"

From mothur
Jump to: navigation, search
Line 1: Line 1:
 
If you are building mothur instead of downloading one of our executables, there are several options for you to consider.
 
If you are building mothur instead of downloading one of our executables, there are several options for you to consider.
 +
 +
__TOC__
  
 
==Setting a default location==
 
==Setting a default location==
You can set a default location for mothur to look for input files, if they are not found. This will allow you to keep your reference files in one location and save time typing lengthy filenames. This location can be overridden using the [[set.dir]] command at run time.
+
You can set a default location for mothur to look for input files, if they are not found. This will allow you to keep your reference files in one location and save time typing lengthy filenames. This location can be overridden using the set.dir command at run time.
  
 
To do this: change Enter_your_default_path_here to the location you would like to use as a default.
 
To do this: change Enter_your_default_path_here to the location you would like to use as a default.
Line 12: Line 14:
 
  endif
 
  endif
  
==Using cygwin to build==
 
If you are using cygwin to build you will want to include the appropriate flags, so change the "no" to a "yes" below.
 
  
CYGWIN_BUILD ?= no
+
==Building a 64bit version==
ifeq  ($(strip $(CYGWIN_BUILD)),yes)
+
In order to take advantage of your 64bit architecture, you want to build a 64 version of mothur. You do this by changing the "no" to a "yes" below. Note: if you are a linux user, comment out the TARGET_ARCH line and uncomment the CXXFLAGS line.
    CXXFLAGS += -mno-cygwin
+
    LDFLAGS += -mno-cygwin
+
endif
+
  
 +
  64BIT_VERSION ?= yes
 +
 
 +
  ifeq  ($(strip $(64BIT_VERSION)),yes)
 +
  #if you are using centos uncomment the following lines
 +
  #CXX = g++44
 +
 
 +
  #if you are a mac user use the following line
 +
  TARGET_ARCH += -arch x86_64
 +
 
 +
  #if you using cygwin to build Windows the following lines
 +
  #CXX = x86_64-w64-mingw32-g++
 +
  #CC = x86_64-w64-mingw32-g++
 +
  #FORTAN_COMPILER = x86_64-w64-mingw32-gfortran
 +
  #TARGET_ARCH += -m64 -static
 +
 
 +
  #if you are a linux user use the following line
 +
  #CXXFLAGS += -mtune=native -march=native -m64
 +
 
 +
  CXXFLAGS += -DBIT_VERSION
 +
    FORTRAN_FLAGS = -m64
 +
  endif
  
==Building a 64bit version==
 
In order to take advantage of your 64bit architecture, you want to build a 64 version of mothur.  You do this by changing the "no" to a "yes" below. Note: if you are a linux user, comment out the TARGET_ARCH line and uncomment the CXXFLAGS line.
 
 
64BIT_VERSION ?= yes
 
 
  ifeq  ($(strip $(64BIT_VERSION)),yes)
 
  #if you are using centos uncomment the following lines
 
#CXX = g++44
 
 
#if you are a mac user use the following line
 
TARGET_ARCH += -arch x86_64
 
 
#if you using cygwin to build Windows the following lines
 
#CXX = x86_64-w64-mingw32-g++
 
#CC = x86_64-w64-mingw32-g++
 
#FORTAN_COMPILER = x86_64-w64-mingw32-gfortran
 
  #TARGET_ARCH += -m64 -static
 
 
#if you are a linux user use the following line
 
#CXXFLAGS += -mtune=native -march=native -m64
 
 
CXXFLAGS += -DBIT_VERSION
 
        FORTRAN_FLAGS = -m64
 
  endif
 
  
 
==Readline Library==
 
==Readline Library==
The readline library is not required to run mothur, but it will allow you to scroll through the commands you have entered if you are running mothur in interactive mode. If you do not want to use the readline library, change the yes to no below. If you are going to use it, make sure you have the readline library and ncurses library installed on your machine.  
+
The readline library is not required to run mothur, but it will allow you to scroll through the commands you have entered if you are running mothur in interactive mode. If you do not want to use the readline library, change the yes to no below. If you are going to use it, make sure you have the readline library and ncurses library installed on your machine.
  
 +
  USEREADLINE ?= yes
 +
 
 +
  ifeq  ($(strip $(USEREADLINE)),yes)
 +
      CXXFLAGS += -DUSE_READLINE
 +
      LDFLAGS += \
 +
        -lreadline\
 +
        -lncurses
 +
  endif
  
USEREADLINE ?= yes
 
 
ifeq  ($(strip $(USEREADLINE)),yes)
 
    CXXFLAGS += -DUSE_READLINE
 
    LDFLAGS += \
 
      -lreadline\
 
      -lncurses
 
endif
 
  
 
==MPI Version==
 
==MPI Version==
 
If you would like to build a mpi-enabled version of mothur, you will want to change the no to yes below. If you are running mothur on a single machine and not a cluster, the mpi-enabled version is slower than using the non-mpi enabled version.
 
If you would like to build a mpi-enabled version of mothur, you will want to change the no to yes below. If you are running mothur on a single machine and not a cluster, the mpi-enabled version is slower than using the non-mpi enabled version.
  
USEMPI ?= no
+
  USEMPI ?= no
+
 
ifeq  ($(strip $(USEMPI)),yes)
+
  ifeq  ($(strip $(USEMPI)),yes)
    CXX = mpic++
+
      CXX = mpic++
    CXXFLAGS += -DUSE_MPI
+
      CXXFLAGS += -DUSE_MPI
endif
+
  endif
  
  
Line 74: Line 68:
 
If you would like mothur to compress distance files after dist.seqs creates them, then you will need to set USECOMPRESSION ?= yes.
 
If you would like mothur to compress distance files after dist.seqs creates them, then you will need to set USECOMPRESSION ?= yes.
  
USECOMPRESSION ?= no
+
  USECOMPRESSION ?= no
+
 
ifeq  ($(strip $(USECOMPRESSION)),yes)
+
  ifeq  ($(strip $(USECOMPRESSION)),yes)
  CXXFLAGS += -DUSE_COMPRESSION
+
  CXXFLAGS += -DUSE_COMPRESSION
endif
+
  endif
 +
 
  
 
==Fortran compiler==
 
==Fortran compiler==
You will need a fortran compiler to compile some of mothur's source code. By default the makefile looks for gfortran, but if you would like to use another compiler you must set the FORTAN_COMPILER option.
+
You will need a fortran compiler to compile some of mothur's source code. By default the makefile looks for gfortran, but if you would like to use another compiler you must set the FORTAN_COMPILER option.
  
FORTAN_COMPILER = yourCompiler
+
  FORTAN_COMPILER = yourCompiler

Revision as of 18:33, 18 May 2015

If you are building mothur instead of downloading one of our executables, there are several options for you to consider.

Setting a default location

You can set a default location for mothur to look for input files, if they are not found. This will allow you to keep your reference files in one location and save time typing lengthy filenames. This location can be overridden using the set.dir command at run time.

To do this: change Enter_your_default_path_here to the location you would like to use as a default.

MOTHUR_FILES = "\"Enter_your_default_path_here\""
ifeq  ($(strip $(MOTHUR_FILES)),"\"Enter_your_default_path_here\"")
else
	CXXFLAGS += -DMOTHUR_FILES=${MOTHUR_FILES}
endif


Building a 64bit version

In order to take advantage of your 64bit architecture, you want to build a 64 version of mothur. You do this by changing the "no" to a "yes" below. Note: if you are a linux user, comment out the TARGET_ARCH line and uncomment the CXXFLAGS line.

 64BIT_VERSION ?= yes
 
  ifeq  ($(strip $(64BIT_VERSION)),yes)
  	 #if you are using centos uncomment the following lines
 	#CXX = g++44
 	
 	#if you are a mac user use the following line
 	TARGET_ARCH += -arch x86_64
 	
 	#if you using cygwin to build Windows the following lines
 	#CXX = x86_64-w64-mingw32-g++
 	#CC = x86_64-w64-mingw32-g++
 	#FORTAN_COMPILER = x86_64-w64-mingw32-gfortran
  	#TARGET_ARCH += -m64 -static
 
 	#if you are a linux user use the following line
 	#CXXFLAGS += -mtune=native -march=native -m64
 	
 	 CXXFLAGS += -DBIT_VERSION
    FORTRAN_FLAGS = -m64
  endif


Readline Library

The readline library is not required to run mothur, but it will allow you to scroll through the commands you have entered if you are running mothur in interactive mode. If you do not want to use the readline library, change the yes to no below. If you are going to use it, make sure you have the readline library and ncurses library installed on your machine.

 USEREADLINE ?= yes
 
 ifeq  ($(strip $(USEREADLINE)),yes)
     CXXFLAGS += -DUSE_READLINE
     LDFLAGS += \
       -lreadline\
       -lncurses
 endif


MPI Version

If you would like to build a mpi-enabled version of mothur, you will want to change the no to yes below. If you are running mothur on a single machine and not a cluster, the mpi-enabled version is slower than using the non-mpi enabled version.

 USEMPI ?= no
 
 ifeq  ($(strip $(USEMPI)),yes)
     CXX = mpic++
     CXXFLAGS += -DUSE_MPI
 endif


Use Compression

If you would like mothur to compress distance files after dist.seqs creates them, then you will need to set USECOMPRESSION ?= yes.

 USECOMPRESSION ?= no
 
 ifeq  ($(strip $(USECOMPRESSION)),yes)
  CXXFLAGS += -DUSE_COMPRESSION
 endif


Fortran compiler

You will need a fortran compiler to compile some of mothur's source code. By default the makefile looks for gfortran, but if you would like to use another compiler you must set the FORTAN_COMPILER option.

 FORTAN_COMPILER = yourCompiler