discount=/shared/packages/git/discount/theme
template=templates/chapter.xhtml
html/%.html: %.md
	$(discount) -C Fb000210 -t $(template) -o $@ $<
	touch --reference=$< $@

%: %.c
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)

.PHONY: .generated.mk
include .generated.mk

all: $(PRODUCTS)
clean:
	rm -f $(PRODUCTS) .generated.mk

make_make: make_make.c
.generated.mk: make_make
	./$< $@
