Split project (keep core)

This commit is contained in:
Tobias Reisinger 2024-04-30 10:38:01 +02:00
parent 9bc75b9627
commit b742f0f8d6
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
127 changed files with 38 additions and 5722 deletions

View file

@ -1,42 +1,23 @@
sqlx:
cargo sqlx database drop -y
cargo sqlx database create
cargo sqlx migrate run
cargo sqlx prepare --workspace
build-rpi:
cross build --target arm-unknown-linux-gnueabihf
emgauwa-%.json: config/%.pkl
emgauwa-core.json: core.pkl
pkl eval -f json -o $@ $<
configs:
config:
$(MAKE) emgauwa-core.json
$(MAKE) emgauwa-controller.json
clean:
rm -f emgauwa-controller.json
rm -f emgauwa-controller.sqlite
rm -f emgauwa-core.json
rm -f emgauwa-core.sqlite
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
$(MAKE) TOOL=cross emgauwa-core_arm-unknown-linux-gnueabihf
$(MAKE) TOOL=cargo emgauwa-core_x86_64-unknown-linux-gnu
$(MAKE) TOOL=cross emgauwa-core_x86_64-unknown-linux-musl