diff options
-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 |