forked from flomesh-io/pipy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
64 lines (56 loc) · 1.32 KB
/
Makefile
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
PIPY_DIR = $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
PIPY_EXE = $(PIPY_DIR)/bin/pipy
PIPY_INSTALL = /usr/local/bin/pipy
ifneq (,$(shell command -v cmake3))
CMAKE = cmake3
else
CMAKE = cmake
endif
.PHONY: all full no-gui install
all: full
full:
npm install
npm run build
mkdir -p build
cd build && $(CMAKE) .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DPIPY_GUI=ON \
-DPIPY_CODEBASES=ON \
-DPIPY_BPF=ON \
-DPIPY_SOIL_FREED_SPACE=OFF \
-DPIPY_ASSERT_SAME_THREAD=OFF \
-DPIPY_LTO=OFF \
&& $(MAKE)
no-gui:
mkdir -p build
cd build && $(CMAKE) .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DPIPY_GUI=OFF \
-DPIPY_CODEBASES=OFF \
-DPIPY_BPF=ON \
-DPIPY_SOIL_FREED_SPACE=OFF \
-DPIPY_ASSERT_SAME_THREAD=OFF \
-DPIPY_LTO=OFF \
&& $(MAKE)
debug:
mkdir -p build
cd build && $(CMAKE) .. \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DPIPY_GUI=OFF \
-DPIPY_CODEBASES=OFF \
-DPIPY_BPF=ON \
-DPIPY_SOIL_FREED_SPACE=ON \
-DPIPY_ASSERT_SAME_THREAD=ON \
-DPIPY_LTO=OFF \
&& $(MAKE)
install: $(PIPY_INSTALL)
$(PIPY_INSTALL): $(PIPY_EXE)
rm -f $(PIPY_INSTALL)
cp -f $(PIPY_EXE) $(PIPY_INSTALL)
chmod a+x $(PIPY_INSTALL)