forked from Quandela/CAMFR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
machine_cfg.py.MacOSX
70 lines (55 loc) · 2.37 KB
/
machine_cfg.py.MacOSX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# This Python script contains all the machine dependent settings
# needed during the build process.
# Tested up to Mac OS 10.13 "High Sierra"
# building for python 2.7, with all dependencies installed using MacPorts
#
# Ports+variants to install via MacPorts (and @version used in this build):
# py27-spyder @2.3.8_0
# py27-Pillow @3.2.0_0 (replaces PIL)
# blitz @0.10_4+gcc5
# boost @1.66.0_0+no_single+no_static+python27
# lapack @3.7.1_0+gfortran
# llvm-3.3 @3.3_10
# scons @3.0.1_0
#
# All ports built for x86_64 as per MacPorts default on recent 64-bit machines
# Demis D. John, 2018-02-27, [email protected]
############################################
# Compilers to be used.
cc = "/usr/bin/gcc"
cxx = "/usr/bin/g++"
f77 = "/usr/local/gfortran/bin/gfortran"
link = cxx
link_flags = " -undefined dynamic_lookup -dynamic -o camfr/_camfr.so" #-dynamic -single_module -undefined dynamic_lookup"
# Compiler flags.
#
# Note: for the Fortran name definition you can define one of the following
# preprocessor macros:
#
# FORTRAN_SYMBOLS_WITHOUT_TRAILING_UNDERSCORES
# FORTRAN_SYMBOLS_WITH_SINGLE_TRAILING_UNDERSCORE
# FORTRAN_SYMBOLS_WITH_DOUBLE_TRAILING_UNDERSCORES
base_flags = " -DFORTRAN_SYMBOLS_WITH_DOUBLE_TRAILING_UNDERSCORE -DNDEBUG"
flags_noopt = base_flags
fflags = base_flags + " -march=native -O2 -pipe -fomit-frame-pointer -funroll-loops -fstrict-aliasing -g -fPIC"
flags = fflags + " -arch x86_64 -ftemplate-depth-60"
# Include directories.
# MacPorts directories, MacPorts python2.7
include_dirs = ["/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7",
"/opt/local/include",
"/opt/local/include/boost",
"/opt/local/include/blitz",
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages"]
# MacPorts directories
library_dirs = ["/opt/local/lib/",
"/opt/local/lib/lapack/",
"/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A",
"/opt/local/lib/gcc5/"]
# Library names.
libs = ["libboost_python-mt", "libblitz", "liblapack","libblas","gfortran"]
# Command to strip library of excess symbols:
dllsuffix = ".dylib"
strip_command = ""#"strip --strip-unneeded camfr/_camfr" + dllsuffix
# Extra files to copy into installation directory.
# This PDF should be Built first or the command will fail.
extra_files = [("doc", ["docs/camfr.pdf"])]