| 1 |
############################################################### |
| 2 |
# |
| 3 |
# Edit the following lines according to your implementation. |
| 4 |
# |
| 5 |
# The environment variable HOME_LORENE (root directory for the |
| 6 |
# Lorene implementation) must be have been already defined. |
| 7 |
# |
| 8 |
# |
| 9 |
# Requirements for Macintosh OS X 10.7 LION (intel) to use LORENE |
| 10 |
# |
| 11 |
# (1) install XCode from Apple Developper |
| 12 |
# |
| 13 |
# (2) Install XCode command line tool (newest version) |
| 14 |
# (3) install gfortran for Mac OS Lion from http://hpc.sourceforge.net/index.php |
| 15 |
# (4) Install Macports (newest version) |
| 16 |
# (5) install with macports the following programs |
| 17 |
# sudo port install gccXX (XX is the version for the GCC compiler, e.g. gcc44) |
| 18 |
# sudo port install atlas (for lapack) |
| 19 |
# sudo port install fftw-3 (for fftw-3) |
| 20 |
# sudo port install pgplot (for pgplot3) |
| 21 |
# sudo port install latexmk (for latex) |
| 22 |
# sudo port install gsl (for gsl libraires) |
| 23 |
# sudo port install doxygen (for doxygen) |
| 24 |
# |
| 25 |
|
| 26 |
############################################################### |
| 27 |
|
| 28 |
#===============================# |
| 29 |
# COMPILERS # |
| 30 |
#===============================# |
| 31 |
|
| 32 |
# C++ compiler: |
| 33 |
# ------------ |
| 34 |
CXX = /usr/bin/g++ |
| 35 |
|
| 36 |
# Options for the C++ compiler to produce the optimized library: |
| 37 |
# ------------------------------------------------------------- |
| 38 |
CXXFLAGS = -O2 -DNDEBUG -Wall -W -Wundef -Wshadow -Wcast-qual \ |
| 39 |
-Wcast-align -Wconversion -Winline \ |
| 40 |
-Wabi -Wold-style-cast -Woverloaded-virtual \ |
| 41 |
-framework vecLib -m386 |
| 42 |
|
| 43 |
# Options for the C++ compiler to produce the library for debugging: |
| 44 |
# ----------------------------------------------------------------- |
| 45 |
CXXFLAGS_G = -g -Wall -W -Wundef -Wshadow -Wcast-qual \ |
| 46 |
-Wcast-align -Wconversion -Winline \ |
| 47 |
-Wabi -Wold-style-cast -Woverloaded-virtual \ |
| 48 |
-framework vecLib -m386 |
| 49 |
|
| 50 |
# Path for the include files: |
| 51 |
# -------------------------- |
| 52 |
INC = -I$(HOME_LORENE)/C++/Include \ |
| 53 |
-I$(HOME_LORENE)/C++/Include_extra \ |
| 54 |
-I/usr/include/c++/4.0.0 -I/usr/include/c++/4.0.0/i686-apple-darwin8 \ |
| 55 |
-I/usr/include/architecture/i386 \ |
| 56 |
-I/System/Library/Frameworks/vecLib.framework/Versions/Current/Headers \ |
| 57 |
-I/opt/local/include |
| 58 |
|
| 59 |
# Converting archives to random libraries (if required, otherwise just ls) |
| 60 |
# ------------------------------------------------------------------------ |
| 61 |
RANLIB = ranlib |
| 62 |
|
| 63 |
# Fortran 77 compiler: |
| 64 |
# ------------------- |
| 65 |
F77 = /usr/local/bin/gfortran |
| 66 |
|
| 67 |
# Options for the Fortran 77 compiler to produce the optimized library: |
| 68 |
# --------------------------------------------------------------------- |
| 69 |
F77FLAGS = -ffixed-form -ffixed-line-length-none -O2 -framework vecLib |
| 70 |
|
| 71 |
# Options for the Fortran 77 compiler to produce the library for debugging: |
| 72 |
# ------------------------------------------------------------------------ |
| 73 |
F77FLAGS_G = -ffixed-form -ffixed-line-length-none -g -framework vecLib |
| 74 |
|
| 75 |
#===============================# |
| 76 |
# MAKEDEPEND # |
| 77 |
#===============================# |
| 78 |
|
| 79 |
# First line uses the C precompiler (usually called cpp) |
| 80 |
# if yours does not support the -M option try to figure out |
| 81 |
# how to output dependencies file, or use makedepend (2nd line) |
| 82 |
#-------------------------------------------------------------- |
| 83 |
#MAKEDEPEND = cpp $(INC) -M >> $(df).d $< |
| 84 |
MAKEDEPEND = touch $(df).d && makedepend $(INC) -f $(df).d $< |
| 85 |
DEPDIR = .deps |
| 86 |
|
| 87 |
#===============================# |
| 88 |
# SYSTEM LIBRARIES # |
| 89 |
#===============================# |
| 90 |
|
| 91 |
# FFT library : FFT991 in Fortran coming with Lorene |
| 92 |
# (1) install fftw-3 with macports |
| 93 |
# --------------------------------------------------------------- |
| 94 |
FFT_DIR = FFTW3 |
| 95 |
|
| 96 |
# C, C++ library, mathematical library and Fortran library |
| 97 |
# --------------------------------------------------------- |
| 98 |
ifeq ($(FFT_DIR),FFTW3) |
| 99 |
LIB_CXX = -L/opt/local/lib -L/opt/local/lib/gcc48 -lfftw3 -lgfortran -lstdc++ -lm |
| 100 |
else |
| 101 |
LIB_CXX = -L/opt/local/lib/gcc46 -lgfortran -lstdc++ -lm |
| 102 |
endif |
| 103 |
|
| 104 |
# Linear Algebra Package (LAPACK) library |
| 105 |
# (1) install atlas with macports |
| 106 |
# look for liblapack.dylib |
| 107 |
# --------------------------------------- |
| 108 |
LIB_LAPACK = \ |
| 109 |
-L/usr/lib \ |
| 110 |
-llapack -lblas |
| 111 |
|
| 112 |
# Graphical libraries: PGPLOT and X11 (Aquaterm) |
| 113 |
# (1) pgplot is installed in /opt/local/lib |
| 114 |
# (2) Requires the following option to adjust pgplot |
| 115 |
# -framework Foundation -framework AppKit -laquaterm |
| 116 |
# ----------------------------------- |
| 117 |
LIB_PGPLOT = -L/usr/X11R6/lib -L/opt/local/lib \ |
| 118 |
-lcpgplot -lpgplot -lpng -lX11 -framework Foundation \ |
| 119 |
-framework AppKit -laquaterm |
| 120 |
|
| 121 |
# GNU scientific library |
| 122 |
# (1) gsl libiraries are in /opt/local/lib |
| 123 |
# look for libgsl.dylib |
| 124 |
# ----------------------------------- |
| 125 |
LIB_GSL = -L/opt/local/lib -lgsl -lgslcblas |