File tree Expand file tree Collapse file tree 6 files changed +8
-11
lines changed Expand file tree Collapse file tree 6 files changed +8
-11
lines changed Original file line number Diff line number Diff line change 1- PRIV_DIR = $(MIX_APP_PATH ) /priv
2- NIF_PATH = $(PRIV_DIR ) /libpythonx.so
1+ PRIV_DIR := $(MIX_APP_PATH ) /priv
2+ NIF_PATH := $(PRIV_DIR ) /libpythonx.so
3+ C_SRC = $(shell pwd) /c_src
34
4- C_SRC = $(shell pwd) /c_src/pythonx
5- CPPFLAGS = -shared -fPIC -fvisibility=hidden -std=c++17 -Wall -Wextra -Wno-unused-parameter -Wno-comment
5+ CPPFLAGS := -shared -fPIC -fvisibility=hidden -std=c++17 -Wall -Wextra -Wno-unused-parameter -Wno-comment
66CPPFLAGS += -I$(ERTS_INCLUDE_DIR ) -I$(FINE_INCLUDE_DIR )
77
88ifdef DEBUG
1111 CPPFLAGS += -O3
1212endif
1313
14- UNAME_S := $(shell uname -s)
1514ifndef TARGET_ABI
16- ifeq ($(UNAME_S ) ,Darwin)
17- TARGET_ABI = darwin
18- endif
15+ TARGET_ABI := $(shell uname -s | tr '[:upper:]' '[:lower:]')
1916endif
2017
2118ifeq ($(TARGET_ABI ) ,darwin)
2522SOURCES = $(wildcard $(C_SRC ) /* .cpp)
2623HEADERS = $(wildcard $(C_SRC ) /* .hpp)
2724
28- build : $(NIF_PATH )
25+ all : $(NIF_PATH )
2926 @ echo > /dev/null # Dummy command to avoid the default output "Nothing to be done"
3027
3128$(NIF_PATH ) : $(SOURCES ) $(HEADERS )
Original file line number Diff line number Diff line change 11PRIV_DIR=$(MIX_APP_PATH)\priv
22NIF_PATH=$(PRIV_DIR)\libpythonx.dll
3+ C_SRC=$(MAKEDIR)\c_src
34
4- C_SRC=$(MAKEDIR)\c_src\pythonx
55CPPFLAGS=/LD /std:c++17 /W4 /wd4100 /wd4458 /O2 /EHsc
66CPPFLAGS=$(CPPFLAGS) /I"$(ERTS_INCLUDE_DIR)" /I"$(FINE_INCLUDE_DIR)"
77
88SOURCES=$(C_SRC)\*.cpp
99HEADERS=$(C_SRC)\*.hpp
1010
11- build : $(NIF_PATH)
11+ all : $(NIF_PATH)
1212
1313$(NIF_PATH): $(SOURCES) $(HEADERS)
1414 @ if not exist "$(PRIV_DIR)" mkdir "$(PRIV_DIR)"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments