ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))

all:
	./run_crops.sh bitbake core-image-full-cmdline

flash-pi4:
	sudo dd if=${ROOT_DIR}build/tmp/deploy/images/raspberrypi4-64/core-image-full-cmdline-raspberrypi4-64.rpi-sdimg of=/dev/sda

flash-zero:
	sudo dd if=${ROOT_DIR}build/tmp/deploy/images/raspberrypi0-2w-64/core-image-full-cmdline-raspberrypi0-2w-64.rpi-sdimg of=/dev/sda

clean-all:
	./run_crops.sh bitbake -c cleanall core-image-full-cmdline

clean-flutter-elinux:
	./run_crops.sh bitbake -c clean flutter-elinux

clean-flutter-pi:
	./run_crops.sh bitbake -c clean flutter-pi
	
clean-flutter-sdk:
	./run_crops.sh bitbake flutter-sdk-native -cdo_cleanall

clean-flutter-engine:
	./run_crops.sh bitbake flutter-engine -cdo_cleanall