forked from roks/snap-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.config
50 lines (47 loc) · 2.19 KB
/
Makefile.config
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
#
# compilation parameters for SNAP Python
#
UNAME := $(shell uname)
ifeq ($(UNAME), Linux)
# Linux flags
SWIGFLAGS += -D_CMPWARN -D__stdcall -DSW_SNAPPY -D_OPENMP -DNONUMPY -DUSE_OPENMP -DGCC_ATOMIC
CXXFLAGS += -fPIC -D__STDC_LIMIT_MACROS -DSW_SNAPPY -fopenmp
IFLAGS = -I/usr/include/python2.6 -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include
IFLAGS3 = -I/usr/local/include/python3.6m -I/usr/include/python3.6m
LDFLAGS += -shared -fopenmp
LDFLAGS3 += -shared -fopenmp
MANIFEST = MANIFEST.nx
PYTHON = python
PYTHON3 = python3
else ifeq ($(UNAME), Darwin)
# OS X flags
SWIGFLAGS += -D_CMPWARN -D__stdcall -DSW_SNAPPY -DNONUMPY
CXXFLAGS += -DSW_SNAPPY
IFLAGS = -I/usr/include/python2.6 -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I/usr/local/opt/python2/Frameworks/Python.framework/Versions/2.7/Headers -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
IFLAGS3 = -I/usr/local/include/python3.6m -I/usr/include/python3.6m -I/usr/local/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/usr/local/Frameworks/Python.framework/Versions/3.7/Headers
LDFLAGS += -lpython -dynamiclib -headerpad_max_install_names
LDFLAGS3 += -L/usr/local/cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib
LDFLAGS3 += -lpython3.7 -dynamiclib -headerpad_max_install_names
CLANG := $(shell g++ -v 2>&1 | grep clang | cut -d " " -f 2)
ifneq ($(CLANG), LLVM)
SWIGFLAGS += -DGCC_ATOMIC
CXXFLAGS += -fopenmp
LDFLAGS += -fopenmp
#CXXOPENMP += -fopenmp
else
CXXFLAGS += -DNOMP
CXXOPENMP =
endif
MANIFEST = MANIFEST.mac
PYTHON = python
PYTHON3 = python3
else ifeq ($(shell uname -o), Cygwin)
# Cygwin flags
SWIGFLAGS += -D_CMPWARN -D__stdcall -DSW_SNAPPY -DNONUMPY
CXXFLAGS += -shared -D__STDC_LIMIT_MACROS -DSW_SNAPPY
LIBS += -lpython2.6
MANIFEST = MANIFEST.win
PYTHON = /cygdrive/c/Python27/python
PYTHON3 = "/cygdrive/c/Program\ Files/Python37/python"
endif
SWIGFLAGS3 += -py3 $(SWIGFLAGS)