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
3
4
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
6
6
CPPFLAGS += -I$(ERTS_INCLUDE_DIR ) -I$(FINE_INCLUDE_DIR )
7
7
8
8
ifdef DEBUG
11
11
CPPFLAGS += -O3
12
12
endif
13
13
14
- UNAME_S := $(shell uname -s)
15
14
ifndef TARGET_ABI
16
- ifeq ($(UNAME_S ) ,Darwin)
17
- TARGET_ABI = darwin
18
- endif
15
+ TARGET_ABI := $(shell uname -s | tr '[:upper:]' '[:lower:]')
19
16
endif
20
17
21
18
ifeq ($(TARGET_ABI ) ,darwin)
25
22
SOURCES = $(wildcard $(C_SRC ) /* .cpp)
26
23
HEADERS = $(wildcard $(C_SRC ) /* .hpp)
27
24
28
- build : $(NIF_PATH )
25
+ all : $(NIF_PATH )
29
26
@ echo > /dev/null # Dummy command to avoid the default output "Nothing to be done"
30
27
31
28
$(NIF_PATH ) : $(SOURCES ) $(HEADERS )
Original file line number Diff line number Diff line change 1
1
PRIV_DIR=$(MIX_APP_PATH)\priv
2
2
NIF_PATH=$(PRIV_DIR)\libpythonx.dll
3
+ C_SRC=$(MAKEDIR)\c_src
3
4
4
- C_SRC=$(MAKEDIR)\c_src\pythonx
5
5
CPPFLAGS=/LD /std:c++17 /W4 /wd4100 /wd4458 /O2 /EHsc
6
6
CPPFLAGS=$(CPPFLAGS) /I"$(ERTS_INCLUDE_DIR)" /I"$(FINE_INCLUDE_DIR)"
7
7
8
8
SOURCES=$(C_SRC)\*.cpp
9
9
HEADERS=$(C_SRC)\*.hpp
10
10
11
- build : $(NIF_PATH)
11
+ all : $(NIF_PATH)
12
12
13
13
$(NIF_PATH): $(SOURCES) $(HEADERS)
14
14
@ 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