common/Makefile

46 lines
1.1 KiB
Makefile
Raw Normal View History

sqlx:
2024-03-28 02:19:15 +00:00
cargo sqlx database drop -y
cargo sqlx database create
cargo sqlx migrate run
2023-11-24 21:45:44 +00:00
cargo sqlx prepare --workspace
build-rpi:
cross build --target arm-unknown-linux-gnueabihf
2024-04-29 02:19:02 +00:00
emgauwa-%.json: config/%.pkl config/lib/%.pkl
pkl eval -f json -o $@ $<
2023-12-04 22:59:26 +00:00
configs:
2024-03-04 15:09:03 +00:00
$(MAKE) emgauwa-core.json
$(MAKE) emgauwa-controller.json
2024-03-28 02:19:15 +00:00
2024-04-29 02:19:02 +00:00
pkl-package:
2024-04-29 16:32:16 +00:00
pkl project package config --output-path "./out/pkl"
2024-04-29 02:19:02 +00:00
2024-03-28 02:19:15 +00:00
clean:
rm -f emgauwa-controller.json
rm -f emgauwa-controller.sqlite
rm -f emgauwa-core.json
rm -f emgauwa-core.sqlite
2024-04-29 16:32:16 +00:00
rm -f emgauwa-dev.sqlite
emgauwa-controller_%:
$(TOOL) build --target $* --release --bin emgauwa-controller
mkdir -p out/releases
cp target/$*/release/emgauwa-controller out/releases/emgauwa-controller_$*
emgauwa-core_%:
$(TOOL) build --target $* --release --bin emgauwa-core
mkdir -p out/releases
cp target/$*/release/emgauwa-core out/releases/emgauwa-core_$*
emgauwa_%:
$(MAKE) emgauwa-controller_$*
$(MAKE) emgauwa-core_$*
releases:
$(MAKE) TOOL=cross emgauwa_arm-unknown-linux-gnueabihf
$(MAKE) TOOL=cargo emgauwa_x86_64-unknown-linux-gnu
$(MAKE) TOOL=cross emgauwa_x86_64-unknown-linux-musl