-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
47 lines (38 loc) 路 830 Bytes
/
Copy pathmakefile
File metadata and controls
47 lines (38 loc) 路 830 Bytes
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
CXX = ccache g++
OUTPUT_FILE=bin/vixen
define INCLUDE
v8/include/
endef
define INCLUDEUV
libuv/include/
endef
define APP
app/index.cc
endef
define OBJ
v8/libv8_monolith.a
libuv/libuv-x86_64-gitpod.a
endef
export INCLUDE
export INCLUDEUV
export OUTPUT_FILE
export APP
export LIB
export OBJ
export APP
examples=\
cpp-native-threads\
uv-threads\
uv-timers\
v8-print-hello
# will output the exectuable to ./bin folder
build:
mkdir -p bin
$(CXX) $$APP -I $$INCLUDE -I $$INCLUDEUV -std=c++17 -pthread -o $$OUTPUT_FILE -DV8_COMPRESS_POINTERS $$OBJ -Wl,--no-as-needed -ldl
# make uv-threads (or any from examples)
$(examples): % : examples/%.cpp
mkdir -p bin
$(CXX) -I $$INCLUDE -I $$INCLUDEUV -std=c++17 -pthread -o bin/$@ $< -DV8_COMPRESS_POINTERS $$OBJ -Wl,--no-as-needed -ldl
./bin/$@
clean:
rm -rf bin