aboutsummaryrefslogtreecommitdiff
path: root/test/ppu-stm-integration-demo/makefile
blob: 715a22ba84e8fdddaef7fa7e1f1b28a3b27e610e (plain)
1
2
3
4
5
6
data.h: data.txt
	echo "#pragma once" > $@
	echo "#include <stdint.h>" >> $@
	(printf "#define HH_PPUINTDEMO_LENGTH "; wc -l < $<) >> $@
	tr -d ':' < $< | awk 'BEGIN { printf "const uint16_t HH_PPUINTDEMO_ADDR[] = { " } 1 { printf "0x"$$1", " } END { print "};" }' >> $@
	tr -d ':' < $< | awk 'BEGIN { printf "const uint16_t HH_PPUINTDEMO_DATA[] = { " } 1 { printf "0x"$$2", " } END { print "};" }' >> $@