blob: 7d7a7c8476c6a1c63ec718ab19404cf2b95508fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
.PHONY: all clean
TARGETS := test-background-color.h test-image.h test-image.tb.vhd
all: $(TARGETS)
%.h: %.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 "};" }' >> $@
test-%.tb.vhd: test-%.txt ./data2vhdltb.awk
tr -d ':' < $< | ./data2vhdltb.awk > $@
clean:
$(RM) $(TARGETS)
|