aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2015-06-30 12:25:05 +0200
committerClifford Wolf <clifford@clifford.at>2015-06-30 12:25:05 +0200
commit9d809eb0d9f85b40e458bf8d0bf62654c0897ac7 (patch)
treeda4b528cd53d04c7a1522fbfb4e668dea88ff8e2 /Makefile
parent997c5ce341ce4fcc209992a9b9096651e767eb2d (diff)
downloadpicorv32-9d809eb0d9f85b40e458bf8d0bf62654c0897ac7.tar.gz
picorv32-9d809eb0d9f85b40e458bf8d0bf62654c0897ac7.zip
Added TOC to README
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 6976538..7a178c9 100644
--- a/Makefile
+++ b/Makefile
@@ -56,10 +56,13 @@ tests/%.o: tests/%.S tests/riscv_test.h tests/test_macros.h
riscv64-unknown-elf-gcc -c -m32 -o $@ -DTEST_FUNC_NAME=$(notdir $(basename $<)) \
-DTEST_FUNC_TXT='"$(notdir $(basename $<))"' -DTEST_FUNC_RET=$(notdir $(basename $<))_ret $<
+toc:
+ gawk '/^-+$$/ { y=tolower(x); gsub("[^a-z0-9]+", "-", y); gsub("-$$", "", y); printf("- [%s](#%s)\n", x, y); } { x=$$0; }' README.md
+
clean:
rm -vrf $(FIRMWARE_OBJS) $(TEST_OBJS) \
firmware/firmware.{elf,bin,hex,map} synth.v \
testbench{,_sp,_axi,_synth}.exe testbench.vcd
-.PHONY: test test_sp test_axi clean
+.PHONY: test test_sp test_axi test_sync toc clean