-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
52 lines (36 loc) · 957 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
.DEFAULT_GOAL := build
.PHONY: web desktop
all: build install
watch:
cargo watch -- make run
lint:
cargo fmt -- --check --color always
cargo clippy --all-targets --all-features -- -D warnings
build-wasm:
cargo build --release --target wasm32-unknown-unknown
wasm-opt -O4 ./target/wasm32-unknown-unknown/release/gameboy.wasm -o gameboy.wasm && du -h gameboy.wasm
test:
cargo test --release
desktop:
cd examples/desktop && cargo run --release
desktop-dev:
cd examples/desktop && cargo run
terminal-dev:
cd examples/terminal && cargo run
terminal:
cd examples/terminal && cargo run --release
web:
cd web && npm run serve
web-build-dev:
cd web && npm run build-dev
web-publish:
cd web && npm run publish
web-build:
cd web && npm run build
ffi-build:
cargo install cbindgen
cargo build --release
cbindgen . -o gameboy.h --lang c
ffi:
cp target/release/libgameboy.a examples/ffi-go/
cd examples/ffi-go && go build main_static.go