-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
36 lines (30 loc) · 818 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
all: project
PROJECT_NAME=rust_flutter
PROJECT_TARGET=demo
PROJECT=$(PROJECT_TARGET)/$(PROJECT_NAME)
targets:
@rustup target add \
x86_64-apple-ios \
x86_64-apple-darwin \
aarch64-apple-ios \
aarch64-apple-darwin \
aarch64-linux-android \
armv7-linux-androideabi \
x86_64-linux-android \
i686-linux-android
cargo-deps:
@cargo install cargo-lipo
@cargo install cargo-ndk
@cargo install cbindgen
@cargo install flutter_rust_bridge_codegen
desktop:
@flutter config --enable-macos-desktop
@flutter config --enable-linux-desktop
@flutter config --enable-windows-desktop
project: desktop
@rm -rf $(PROJECT_TARGET)
@mkdir -p $(PROJECT_TARGET)
@cd $(PROJECT_TARGET) && flutter create $(PROJECT_NAME)
@cd $(PROJECT) && flutter pub get
@cd $(PROJECT) && cargo new --lib native
.PHONY: project