diff options
author | Julian T <julian@jtle.dk> | 2019-09-18 21:04:42 +0200 |
---|---|---|
committer | Julian T <julian@jtle.dk> | 2019-09-18 21:04:42 +0200 |
commit | 5c90155ba84de1845598ca96369bf6d54d40fac9 (patch) | |
tree | 2a3461e454e8106f524af2bdaca0f484040571cb /Makefile | |
parent | 923393d6f50b8df486125bdff224588086e44266 (diff) |
Added src file support for .c and .h
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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 |