aboutsummaryrefslogtreecommitdiff
path: root/test/ppu-stm-integration-demo/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'test/ppu-stm-integration-demo/makefile')
-rw-r--r--test/ppu-stm-integration-demo/makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/ppu-stm-integration-demo/makefile b/test/ppu-stm-integration-demo/makefile
index 0eeada5..7d7a7c8 100644
--- a/test/ppu-stm-integration-demo/makefile
+++ b/test/ppu-stm-integration-demo/makefile
@@ -1,4 +1,8 @@
-all: test-background-color.h test-image.h
+.PHONY: all clean
+
+TARGETS := test-background-color.h test-image.h test-image.tb.vhd
+
+all: $(TARGETS)
%.h: %.txt
echo "#pragma once" > $@
@@ -6,3 +10,9 @@ all: test-background-color.h test-image.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)