From 5c90155ba84de1845598ca96369bf6d54d40fac9 Mon Sep 17 00:00:00 2001 From: Julian T Date: Wed, 18 Sep 2019 21:04:42 +0200 Subject: Added src file support for .c and .h --- Makefile | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index af28aca..6bef258 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,14 @@ +HIGHLIGHT_FLAGS= --syntax=c --inline-css + MD_FILES = $(shell find . -type f -name '*.md') +SRC_FILES = $(shell find -name "*.c" -type f) +HDR_FILES = $(shell find -name "*.h" -type f) + + HTML_FILES = $(patsubst %.md, %.html, $(MD_FILES)) +HTML_FILES += $(patsubst %.c, %-c.html, $(SRC_FILES)) +HTML_FILES += $(patsubst %.h, %-h.html, $(HDR_FILES)) index.html: $(HTML_FILES) index.sh sh index.sh $(HTML_FILES) | pandoc --output $@ @@ -8,6 +16,11 @@ index.html: $(HTML_FILES) index.sh %.html: %.md pandoc $^ --output $@ +%-c.html: %.c + highlight $(HIGHLIGHT_FLAGS) --output $@ $^ + +%-h.html: %.h + highlight $(HIGHLIGHT_FLAGS) --output $@ $^ .PHONY: all clean -- cgit v1.2.3