Skip to content

Commit e965727

Browse files
committed
update build environment
1 parent 11108c9 commit e965727

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ ${SOURCE_HEADER}/RowSet.cpp
4343
${SOURCE_HEADER}/TimestampUtils.cpp
4444
${SOURCE_HEADER}/Field.cpp
4545
${SOURCE_HEADER}/RowList.cpp
46-
${SOURCE_HEADER}/RowSet.cpp
4746
${SOURCE_HEADER}/Util.cpp)
4847

4948
target_link_libraries(griddb_python gridstore_c)

Makefile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,22 @@ CXX = g++
33

44
ARCH = $(shell arch)
55

6-
LDFLAGS = -Llibs -lpthread -lrt -lgridstore
6+
UNAME_S := $(shell uname -s)
7+
ifeq ($(UNAME_S), Linux)
8+
LDFLAGS = -Llibs -lpthread -lrt -lgridstore
9+
endif
10+
ifeq ($(UNAME_S), Darwin)
11+
LDFLAGS = -lpthread -lgridstore -undefined dynamic_lookup
12+
endif
713

814
CPPFLAGS = -fPIC -std=c++0x -g -O2
915
INCLUDES = -Iinclude -Isrc
16+
PY_CFLAGS := $(shell python3-config --includes)
17+
NUMPY_FLAGS := $(shell python3 -c "import site; print(site.getsitepackages()[0])")
1018

1119
INCLUDES_PYTHON = $(INCLUDES) \
12-
-I/usr/include/python3.9/ \
13-
-I$(HOME)/.pyenv/versions/3.9.5/lib/python3.9/site-packages/numpy/core/include
20+
${PY_CFLAGS} \
21+
-I${NUMPY_FLAGS}/numpy/core/include
1422

1523
PROGRAM = _griddb_python.so
1624
EXTRA = griddb_python.py griddb_python.pyc

0 commit comments

Comments
 (0)