<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>CPPLapack: Typical &quot;Makefile&quot;s for Various Platforms</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">CPPLapack
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">Typical "Makefile"s for Various Platforms </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h2><a class="anchor" id="st-base"></a>
The base Makefile</h2>
<div class="fragment"><pre class="fragment"><span class="preprocessor">###############################################################################</span>
<span class="preprocessor"></span><span class="preprocessor">##                                 Makefile                                  ##</span>
<span class="preprocessor"></span><span class="preprocessor">###############################################################################</span>
<span class="preprocessor"></span>
A.OUT = A.OUT

<span class="preprocessor">###############################################################################</span>
<span class="preprocessor"></span>
include $(HOME)/local/cpplapack/makefiles/Makefile.g++

###############################################################################

HEADERS:= $(shell find ./ -iname <span class="stringliteral">&#39;*.hpp&#39;</span>)
SOURCES:= $(shell find ./ -iname <span class="stringliteral">&#39;*.cpp&#39;</span>)
SOURCES:= $(sort $(SOURCES))
OBJECTS:= $(SOURCES:%.cpp=%.o)
THIS_FILE:= $(firstword $(MAKEFILE_LIST))

<span class="preprocessor">###############################################################################</span>
<span class="preprocessor"></span><span class="preprocessor">###############################################################################</span>
<span class="preprocessor"></span><span class="preprocessor">###############################################################################</span>
<span class="preprocessor"></span>
release: depend
  @echo -e <span class="stringliteral">&quot;##################################&quot;</span>
  @echo -e <span class="stringliteral">&quot;#### building in release mode ####&quot;</span>
  @echo -e <span class="stringliteral">&quot;##################################\n&quot;</span>
  @$(MAKE) -f $(THIS_FILE) --no-print-directory build RELEASE=1

profile: depend
  @echo -e <span class="stringliteral">&quot;##################################&quot;</span>
  @echo -e <span class="stringliteral">&quot;#### building in profile mode ####&quot;</span>
  @echo -e <span class="stringliteral">&quot;##################################\n&quot;</span>
  @$(MAKE) -f $(THIS_FILE) --no-print-directory build PROFILE=1

debug: depend
  @echo -e <span class="stringliteral">&quot;################################&quot;</span>
  @echo -e <span class="stringliteral">&quot;#### building in debug mode ####&quot;</span>
  @echo -e <span class="stringliteral">&quot;################################\n&quot;</span>
  @$(MAKE) -f $(THIS_FILE) --no-print-directory build DEBUG=1

verbose: depend
  @echo -e <span class="stringliteral">&quot;##################################&quot;</span>
  @echo -e <span class="stringliteral">&quot;#### building in verbose mode ####&quot;</span>
  @echo -e <span class="stringliteral">&quot;##################################\n&quot;</span>
  @$(MAKE) -f $(THIS_FILE) --no-print-directory build DEBUG=1 VERBOSE=1

<span class="preprocessor">###############################################################################</span>
<span class="preprocessor"></span>
.SUFFIXES: .cpp .o
.cpp.o:
  $(CXX) -c $&lt; $(CFLAGS) $(INCLUDE_DIRS) $(MACROS) -o $@
  @echo

build: $(OBJECTS)
  $(CXX) $(OBJECTS) $(LFLAGS) $(LIB_DIRS) $(LIBS) -o $(A.OUT)
  @echo

###############################################################################

depend:
  makedepend -f- -Y $(SOURCES) &gt; Makefile.depend 2&gt; /dev/null
<span class="preprocessor"># gccmakedep -- -I./ -MM -- $(SOURCES)</span>
<span class="preprocessor"></span><span class="preprocessor"># $(CXX) -MM -I./ $(SOURCES) &gt; Makefile.depend</span>
<span class="preprocessor"></span><span class="preprocessor"># $(CXX) -MM $(INCLUDE_DIRS) $(SOURCES) &gt; Makefile.depend</span>
<span class="preprocessor"></span>  @echo

clean:
  rm -f $(OBJECTS)

fullclean:
  rm -f $(shell find -name <span class="stringliteral">&#39;*.o&#39;</span>) Makefile.depend std err $(A.OUT)

remake: clean all

<span class="preprocessor">###############################################################################</span>
<span class="preprocessor"></span>-include Makefile.depend
</pre></div><p> <br/>
<br/>
 </p>
<h2><a class="anchor" id="st-gXX"></a>
Makefile for g++ + blas + lapack</h2>
<div class="fragment"><pre class="fragment"><span class="preprocessor">###############################################################################</span>
<span class="preprocessor"></span><span class="preprocessor">##                               Makefile.g++                                ##</span>
<span class="preprocessor"></span><span class="preprocessor">###############################################################################</span>
<span class="preprocessor"></span>
<span class="preprocessor">#######################################</span>
<span class="preprocessor"></span><span class="preprocessor">############### common ################</span>
<span class="preprocessor"></span><span class="preprocessor">#######################################</span>
<span class="preprocessor"></span>
CXX = g++

<span class="preprocessor">######## FLAGS ########</span>
<span class="preprocessor"></span>FLAGS += -O2 -funroll-loops #### -O3 is dangerous
FLAGS += -ffast-math -fno-math-errno #-mfpmath=sse
FLAGS += -fprefetch-loop-arrays -fstrength-reduce -malign-<span class="keywordtype">double</span>
<span class="preprocessor">#FLAGS += -std=c++0x # -std=c++98</span>
<span class="preprocessor"></span>FLAGS += -msse4.2 #-march=corei7
<span class="preprocessor">#FLAGS += -msse4.1 #-march=core2</span>
<span class="preprocessor"></span><span class="preprocessor">####FLAGS += -fforce-addr -falign-functions=4 -ftree-vectorize -ftree-vectorizer-verbose=5 -funsafe-loop-optimizations -Wunsafe-loop-optimizations</span>
<span class="preprocessor"></span><span class="preprocessor">#FLAGS += -fopenmp</span>
<span class="preprocessor"></span>
<span class="preprocessor">######## LFLAGS ########</span>
<span class="preprocessor"></span>LFLAGS = $(FLAGS)
#LFLAGS += -<span class="keyword">static</span>

######## CFLAGS ########
CFLAGS = $(FLAGS)
CFLAGS += -Wall -Wno-unknown-pragmas -Wextra -Wshadow -ftree-vectorizer-verbose=0
<span class="preprocessor">##CFLAGS += --param large-function-growth=99999 --param max-inline-insns-single=99999 --param inline-unit-growth=99999 -Winline</span>
<span class="preprocessor"></span><span class="preprocessor">####CFLAGS += -fimplement-inlines -finline-limit=0 --param large-function-growth=0 --param max-inline-insns-single=0 --param inline-unit-growth=0</span>
<span class="preprocessor"></span>
<span class="preprocessor">######## others ########</span>
<span class="preprocessor"></span>INCLUDE_DIRS = -I./  -I$(HOME)/local/cpplapack/include
LIB_DIRS = 
#LIBS = /usr/lib/sse2/liblapack.a /usr/lib/sse2/libblas.a -lm -lgfortran
LIBS = -llapack -lblas -lgfortran -lm
#LIBS = -llapack $(HOME)/local/ATLAS/libatlas.a -lgfortran -lm
LIBS += -lboost_filesystem
MACROS = 

<span class="preprocessor">#######################################</span>
<span class="preprocessor"></span><span class="preprocessor">############ release mode #############</span>
<span class="preprocessor"></span><span class="preprocessor">#######################################</span>
<span class="preprocessor"></span>ifdef RELEASE
CFLAGS += -fomit-frame-pointer
LFLAGS += -fomit-frame-pointer
endif

<span class="preprocessor">#######################################</span>
<span class="preprocessor"></span><span class="preprocessor">############ profile mode #############</span>
<span class="preprocessor"></span><span class="preprocessor">#######################################</span>
<span class="preprocessor"></span>ifdef PROFILE
CFLAGS += -pg #-g
LFLAGS += -pg #-g
endif

<span class="preprocessor">#######################################</span>
<span class="preprocessor"></span><span class="preprocessor">############## debug mode #############</span>
<span class="preprocessor"></span><span class="preprocessor">#######################################</span>
<span class="preprocessor"></span>ifdef DEBUG
FLAGS = -g -O0
CFLAGS = $(FLAGS) -Wall -Wno-unknown-pragmas -Wextra -Wshadow -fstack-protector-all -fbounds-check -ftrapv -ftrapping-math #-mfp-trap-mode=sui #-ffpe-trap=invalid,zero,overflow,underflow
LFLAGS = $(FLAGS)
MACROS += -DDEBUG
MACROS += -DCPPL_DEBUG
endif

<span class="preprocessor">#######################################</span>
<span class="preprocessor"></span><span class="preprocessor">############ verbose mode #############</span>
<span class="preprocessor"></span><span class="preprocessor">#######################################</span>
<span class="preprocessor"></span>ifdef VERBOSE
MACROS += -DVERBOSE
MACROS += -DCPPL_VERBOSE
endif
</pre></div><p> <br/>
<br/>
 </p>
<h2><a class="anchor" id="st-cygwin"></a>
Makefile for g++ + atlas + lapack on Cygwin</h2>
<div class="fragment"><pre class="fragment"><span class="preprocessor">#CPP = g++-2</span>
<span class="preprocessor"></span>CPP = g++

COMP_FLAGS = -O2 -Wall
LINK_FLAGS = -O2 -Wall

<span class="preprocessor">#MACROS = -DCPPL_VERBOSE -DCPPL_DEBUG</span>
<span class="preprocessor"></span>
CPPLAPACK_INCLUDE_DIR = $(HOME)/local/lib/cpplapack/include
LAPACK_LIB_DIR = $(HOME)/local/lib/LAPACK
BLAS_LIB_DIR = $(HOME)/local/lib/ATLAS

INCLUDE_DIRS = -I$(CPPLAPACK_INCLUDE_DIR)
LIB_DIRS = -L$(LAPACK_LIB_DIR) -L$(BLAS_LIB_DIR)

LIBS = -llapack -lf77blas -latlas -lg2c -lm
OBJECTS = main.o

<span class="preprocessor">###############################################################################</span>
<span class="preprocessor"></span>
A.OUT: $(OBJECTS)
  $(CPP) $(OBJECTS) $(LINK_FLAGS) $(LIB_DIRS) $(LIBS) -o $@

.SUFFIXES: .cpp .o

.cpp.o:
  $(CPP) -c $&lt; $(COMP_FLAGS) $(INCLUDE_DIRS) $(MACROS)

<span class="keywordflow">do</span>: A.OUT
  ./A.OUT &gt; std 2&gt; err

clean:
  rm -f *~ $(OBJECTS)

fullclean:
  rm -f *~ $(OBJECTS) A.OUT std err 

remake: clean A.OUT
</pre></div><p> <br/>
<br/>
 </p>
<h2><a class="anchor" id="st-icc81"></a>
Makefile for icc8.1 + mkl7</h2>
<div class="fragment"><pre class="fragment">CPP = LC_ALL=C icc

<span class="preprocessor">#COMP_FLAGS = -openmp -O2 -w1 #[is buggy]</span>
<span class="preprocessor"></span><span class="preprocessor">#LINK_FLAGS = -O2 -w1 #[is buggy]</span>
<span class="preprocessor"></span>COMP_FLAGS = -openmp -O2 -w1 -cxxlib-icc 
LINK_FLAGS = -O2 -w1 -cxxlib-icc

<span class="preprocessor">#MACROS = -DCPPL_VERBOSE -DCPPL_DEBUG</span>
<span class="preprocessor"></span>
CPPLAPACK_INCLUDE_DIR = $(HOME)/local/lib/cpplapack/include
MKL_LIB_DIRS = $(shell echo /opt/intel/mkl*/lib/32)

INCLUDE_DIRS = -I$(CPPLAPACK_INCLUDE_DIR)
LIB_DIRS = -L$(MKL_LIB_DIRS)

<span class="preprocessor">#LIBS = -lmkl_lapack -lmkl_ia32 -lguide -lpthread -lstdc++ -lefence #[is buggy]</span>
<span class="preprocessor"></span>LIBS = -lmkl_lapack -lmkl_ia32 -lguide -lpthread -lcprts -lunwind #-limf #-lefence

OBJECTS = main.o

<span class="preprocessor">###############################################################################</span>
<span class="preprocessor"></span>
A.OUT: $(OBJECTS)
  $(CPP) $(OBJECTS) $(LINK_FLAGS) $(LIB_DIRS) $(LIBS) -o $@

.SUFFIXES: .cpp .o

.cpp.o:
  $(CPP) -c $&lt; $(COMP_FLAGS) $(INCLUDE_DIRS) $(MACROS)

<span class="keywordflow">do</span>: A.OUT
  ./A.OUT &gt; std 2&gt; err

clean:
  rm -f *~ $(OBJECTS)

fullclean:
  rm -f *~ $(OBJECTS) A.OUT std err 

remake: clean A.OUT
</pre></div><p> <br/>
<br/>
 </p>
<h2><a class="anchor" id="st-icc8"></a>
Makefile for icc8 + mkl6</h2>
<div class="fragment"><pre class="fragment">CPP = icc

COMP_FLAGS = -openmp -O2 -w1
LINK_FLAGS = -O2 -w1

<span class="preprocessor">#MACROS = -DCPPL_VERBOSE -DCPPL_DEBUG</span>
<span class="preprocessor"></span>
CPPLAPACK_INCLUDE_DIR = $(HOME)/local/lib/cpplapack/include
MKL_LIB_DIRS = $(shell echo /opt/intel/mkl*/lib/32)
INCLUDE_DIRS = -I$(CPPLAPACK_INCLUDE_DIR)
LIB_DIRS = -L$(MKL_LIB_DIRS)

LIBS = -lmkl_lapack -lmkl_ia32 -lguide -lpthread <span class="preprocessor">#-lefence</span>
<span class="preprocessor"></span>OBJECTS = main.o

<span class="preprocessor">###############################################################################</span>
<span class="preprocessor"></span>
A.OUT: $(OBJECTS)
  $(CPP) $(OBJECTS) $(LINK_FLAGS) $(LIB_DIRS) $(LIBS) -o $@

.SUFFIXES: .cpp .o

.cpp.o:
  $(CPP) -c $&lt; $(COMP_FLAGS) $(INCLUDE_DIRS) $(MACROS)

<span class="keywordflow">do</span>: A.OUT
  ./A.OUT &gt; std 2&gt; err

clean:
  rm -f *~ $(OBJECTS)

fullclean:
  rm -f *~ $(OBJECTS) A.OUT std err 

remake: clean A.OUT
</pre></div><p> <br/>
<br/>
 </p>
<h2><a class="anchor" id="st-icc7"></a>
Makefile for icc7 + mkl5</h2>
<div class="fragment"><pre class="fragment">CPP = icc

COMP_FLAGS = -O2 -w1
<span class="preprocessor">#COMP_FLAGS = -openmp -O2 -w1</span>
<span class="preprocessor"></span>LINK_FLAGS = -O2 -w1

<span class="preprocessor">#MACROS = -DCPPL_VERBOSE -DCPPL_DEBUG</span>
<span class="preprocessor"></span>
CPPLAPACK_INCLUDE_DIR = $(HOME)/local/lib/cpplapack/include
ICC_INCLUDE_DIR = /opt/intel/compiler70/ia32/include
MKL_LIB_DIR = $(shell echo /opt/intel/mkl*/lib/32)

INCLUDE_DIRS = -I$(ICC_INCLUDE_DIR) -I$(CPPLAPACK_INCLUDE_DIR)
LIB_DIRS = -L$(MKL_LIB_DIR)

LIBS = -lmkl_lapack -lmkl -lguide -lF90
OBJECTS = main.o

<span class="preprocessor">###############################################################################</span>
<span class="preprocessor"></span>
A.OUT: $(OBJECTS)
  $(CPP) $(OBJECTS) $(LINK_FLAGS) $(LIB_DIRS) $(LIBS) -o $@

.SUFFIXES: .cpp .o

.cpp.o:
  $(CPP) -c $&lt; $(COMP_FLAGS) $(INCLUDE_DIRS) $(MACROS)

<span class="keywordflow">do</span>: A.OUT
  ./A.OUT &gt; std 2&gt; err

clean:
  rm -f *~ $(OBJECTS)

fullclean:
  rm -f *~ $(OBJECTS) A.OUT std err 

remake: clean A.OUT
</pre></div><p> <br/>
<br/>
 </p>
<h2><a class="anchor" id="st-ecc"></a>
Makefile for ecc + mkl</h2>
<div class="fragment"><pre class="fragment">CPP = ecc

COMP_FLAGS = -O2 -w1
LINK_FLAGS = -O2 -w1

<span class="preprocessor">#MACROS = -DCPPL_VERBOSE -DCPPL_DEBUG</span>
<span class="preprocessor"></span>
CPPLAPACK_INCLUDE_DIR = $(HOME)/local/lib/cpplapack/include
ECC_INCLUDE_DIR = /opt/intel/compiler70/ia64/include
MKL_LIB_DIR = /opt/intel/mkl/lib/64/

INCLUDE_DIRS = -I$(ECC_INCLUDE_DIR) -I$(CPPLAPACK_INCLUDE_DIR)
LIB_DIRS = -L$(MKL_LIB_DIR)

LIBS = -lmkl_lapack -lmkl -lguide -lF90
OBJECTS = main.o

<span class="preprocessor">###############################################################################</span>
<span class="preprocessor"></span>
A.OUT: $(OBJECTS)
  $(CPP) $(OBJECTS) $(LINK_FLAGS) $(LIB_DIRS) $(LIBS) -o $@

.SUFFIXES: .cpp .o

.cpp.o:
  $(CPP) -c $&lt; $(COMP_FLAGS) $(INCLUDE_DIRS) $(MACROS)

<span class="keywordflow">do</span>: A.OUT
  ./A.OUT &gt; std 2&gt; err

clean:
  rm -f *~ $(OBJECTS)

fullclean:
  rm -f *~ $(OBJECTS) A.OUT std err 

remake: clean A.OUT
</pre></div><p> <br/>
<br/>
 </p>
<h2><a class="anchor" id="st-cxx_linux"></a>
Makefile for cxx + cxml on Linux</h2>
<div class="fragment"><pre class="fragment">CPP = cxx

<span class="preprocessor">#COMP_FLAGS = -D__USE_STD_IOSTREAM -tune host -arch host -fast -O4 -Wall</span>
<span class="preprocessor"></span>COMP_FLAGS = -D__USE_STD_IOSTREAM -omp -tune host -arch host -fast -O4 -Wall
LINK_FLAGS = -D__USE_STD_IOSTREAM -omp -Wall

<span class="preprocessor">#MACROS = -DCPPL_VERBOSE -DCPPL_DEBUG</span>
<span class="preprocessor"></span>
CPPLAPACK_INCLUDE_DIR = $(HOME)/local/lib/cpplapack/include

INCLUDE_DIRS = -I$(CPPLAPACK_INCLUDE_DIR)
LIB_DIRS =

LIBS = -lcxml -lcpml
OBJECTS = main.o

<span class="preprocessor">###############################################################################</span>
<span class="preprocessor"></span>
A.OUT: $(OBJECTS)
  $(CPP) $(OBJECTS) $(LINK_FLAGS) $(LIB_DIRS) $(LIBS) -o $@

.SUFFIXES: .cpp .o

.cpp.o:
  $(CPP) -c $&lt; $(COMP_FLAGS) $(INCLUDE_DIRS) $(MACROS)

<span class="keywordflow">do</span>: A.OUT
  ./A.OUT &gt; std 2&gt; err

clean:
  rm -f *~ $(OBJECTS)

fullclean:
  rm -f *~ $(OBJECTS) A.OUT std err 

remake: clean A.OUT
</pre></div><p> <br/>
<br/>
 </p>
<h2><a class="anchor" id="st-cxx_alpha"></a>
Makefile for cxx + cxml on Alpha with MP</h2>
<div class="fragment"><pre class="fragment"><span class="preprocessor">#please set OMP_NUM_THREAD ?</span>
<span class="preprocessor"></span>CPP = cxx

COMP_FLAGS = -D__USE_STD_IOSTREAM -omp -tune host -arch host -fast -O4 -Wall
LINK_FLAGS = -D__USE_STD_IOSTREAM -omp -Wall

<span class="preprocessor">#MACROS = -DCPPL_VERBOSE -DCPPL_DEBUG</span>
<span class="preprocessor"></span>
CPPLAPACK_INCLUDE_DIR = $(HOME)/local/lib/cpplapack/include

INCLUDE_DIRS = -I$(CPPLAPACK_INCLUDE_DIR)
LIB_DIRS = 

LIBS = -lcxml
OBJECTS = main.o

<span class="preprocessor">###############################################################################</span>
<span class="preprocessor"></span>
A.OUT: $(OBJECTS)
  $(CPP) $(OBJECTS) $(LINK_FLAGS) $(LIB_DIRS) $(LIBS) -o $@

.SUFFIXES: .cpp .o

.cpp.o:
  $(CPP) -c $&lt; $(COMP_FLAGS) $(INCLUDE_DIRS) $(MACROS)

<span class="keywordflow">do</span>: A.OUT
  ./A.OUT &gt; std 2&gt; err

clean:
  rm -f *~ $(OBJECTS)

fullclean:
  rm -f *~ $(OBJECTS) A.OUT std err 

remake: clean A.OUT
</pre></div><p> <br/>
<br/>
 </p>
<h2><a class="anchor" id="st-sxcXX"></a>
Makefile for sxc++ + MathKeisan</h2>
<div class="fragment"><pre class="fragment">CPP = sxc++
<span class="preprocessor">#CPP = c++</span>
<span class="preprocessor"></span>
COMP_FLAGS = 
LINK_FLAGS = 

<span class="preprocessor">#MACROS = -DCPPL_VERBOSE -DCPPL_DEBUG</span>
<span class="preprocessor"></span>
CPPLAPACK_INCLUDE_DIR = $(HOME)/local/lib/cpplapack/include

INCLUDE_DIRS = -I$(CPPLAPACK_INCLUDE_DIR)
LIB_DIRS = 

LIBS = -lblas_64 -lf90sxe -li90sxe
OBJECTS = main.o

<span class="preprocessor">###############################################################################</span>
<span class="preprocessor"></span>
A.OUT: $(OBJECTS)
  $(CPP) $(OBJECTS) $(LINK_FLAGS) $(LIB_DIRS) $(LIBS) -o $@

.SUFFIXES: .cpp .o

.cpp.o:
  $(CPP) -c $&lt; $(COMP_FLAGS) $(INCLUDE_DIRS) $(MACROS)

<span class="keywordflow">do</span>: A.OUT
  ./A.OUT &gt; std 2&gt; err

clean:
  rm -f *~ $(OBJECTS)

fullclean:
  rm -f *~ $(OBJECTS) A.OUT std err 

remake: clean A.OUT
</pre></div><p> <br/>
<br/>
 </p>
<h2><a class="anchor" id="st-CC"></a>
Makefile for CC + SCSL with MP</h2>
<div class="fragment"><pre class="fragment">CPP = CC

<span class="preprocessor">#COMP_FLAGS = -n32 -Ofast -LANG:std</span>
<span class="preprocessor"></span>COMP_FLAGS = -mp -n32 -Ofast -LANG:std
LINK_FLAGS = -mp -n32 -Ofast -LANG:std

<span class="preprocessor">#MACROS = -DCPPL_VERBOSE -DCPPL_DEBUG</span>
<span class="preprocessor"></span>
CPPLAPACK_INCLUDE_DIR = $(HOME)/local/lib/cpplapack/include

INCLUDE_DIRS = -I$(CPPLAPACK_INCLUDE_DIR)
LIB_DIRS = 

<span class="preprocessor">#LIBS = -lscs -lfastm -lm</span>
<span class="preprocessor"></span>LIBS = -lscs_mp -lfastm -lm
OBJECTS = main.o

<span class="preprocessor">###############################################################################</span>
<span class="preprocessor"></span>
A.OUT: $(OBJECTS)
  $(CPP) $(OBJECTS) $(LINK_FLAGS) $(LIB_DIRS) $(LIBS) -o $@

.SUFFIXES: .cpp .o

.cpp.o:
  $(CPP) -c $&lt; $(COMP_FLAGS) $(INCLUDE_DIRS) $(MACROS)

<span class="keywordflow">do</span>: A.OUT
  ./A.OUT &gt; std 2&gt; err

clean:
  rm -f *~ $(OBJECTS)

fullclean:
  rm -f *~ $(OBJECTS) A.OUT std err 

remake: clean A.OUT
</pre></div><p> <br/>
<br/>
 </p>
<h2><a class="anchor" id="st-cl"></a>
Makefile for cl(VC++) + clapack on Windows</h2>
<p>[See <a class="el" href="pg-vcpp.html">How to compile with VC++ on Windows</a> also.] </p>
<div class="fragment"><pre class="fragment">CPP = cl.exe

COMP_FLAGS = /nologo /EHsc /w /MD
LINK_FLAGS = /link /nologo

<span class="preprocessor">#MACROS = -DCPPL_VERBOSE -DCPPL_DEBUG</span>
<span class="preprocessor"></span>
INCLROOT=C:\lib\cpplapack\cpplapack
CPPLAPACK_INCLUDE_DIR = <span class="stringliteral">&quot;$(INCLROOT)\include&quot;</span>
INCLUDE_DIRS = /I $(CPPLAPACK_INCLUDE_DIR) 

LIBSROOT=C:\lib\CLAPACK3-Windows
LIBS = <span class="stringliteral">&quot;$(LIBSROOT)\clapack\Release\clapack.lib&quot;</span> <span class="stringliteral">&quot;$(LIBSROOT)\clapack\BLAS\Release\blas.lib&quot;</span>

OBJECTS = main.obj

###############################################################################

A.EXE: $(OBJECTS)
  $(CPP) $(OBJECTS) /o $@ $(LINK_FLAGS) $(LIBS)

.SUFFIXES: .cpp .obj

.cpp.obj:
  $(CPP) /c $(COMP_FLAGS) $(INCLUDE_DIRS) $&lt;

<span class="keywordflow">do</span>: A.OUT
  .\A.EXE &gt; std 2&gt; err

clean:
  del $(OBJECTS)

fullclean:
  del $(OBJECTS) A.EXE std err 

remake: clean A.EXE
</pre></div> </div></div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Friends</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
