-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
35 lines (25 loc) · 798 Bytes
/
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
.PHONY: all build clean
RENDERINGWASM_DIR=./rendering_wasm
RENDERINGWASM_LIB=./rendering_wasm/target/debug/librendering_wasm.so
RENDERING_LIB=./rendering/target/debug/librendering.rlib
define print_status
@echo ""
@echo "////////////////////////////////////////////////////"
@echo "// ${1}"
@echo "////////////////////////////////////////////////////"
@echo ""
endef
all: build
build: ${RENDERING_LIB} ${RENDERINGWASM_LIB}
${RENDERING_LIB}:
$(call print_status, Build rendering ...)
cargo build
${RENDERINGWASM_LIB}:
$(call print_status, Build wasm wrapper ...)
cd ${RENDERINGWASM_DIR} && wasm-pack build
clean-workspace:
$(call print_status, Cleaning up cargo workspace ...)
cargo clean
rm ${RENDERINGWASM_LIB}
clean: clean-workspace
$(call print_status, Full clean up ...)