common/Makefile

30 lines
649 B
Makefile
Raw Normal View History

2024-03-28 02:19:15 +00:00
ifneq (,$(wildcard ./.env))
include .env
export
endif
DATABASE_URL ?= sqlite://emgauwa-dev.sqlite
export DATABASE_URL
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-03-28 02:19:15 +00:00
emgauwa-%.json: config/emgauwa-%.pkl config/lib/%.pkl config/lib/common.pkl $(wildcard .env)
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
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