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 config/lib/%.pkl
	pkl eval -f json -o $@ $<

configs:
	$(MAKE) emgauwa-core.json
	$(MAKE) emgauwa-controller.json

pkl-package:
	pkl project package config --output-path "./pkl-out"

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