Changed Makefile

This commit is contained in:
Lucia Ceionia 2023-06-24 21:42:19 +00:00
parent e4c033b307
commit 2ec786a56c
2 changed files with 24 additions and 4 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
*.html
/html

View File

@ -1,6 +1,26 @@
%.html: %.md
# Update this for new files
files = perks.html spelllist.html main.html creatures.html\
magical_items.html calc.html effect.html\
test.html test.js
OUTDIR=html
LIST=$(addprefix html/, $(files))
$(OUTDIR)/%.html: %.md | $(OUTDIR)
pandoc $< -f markdown -t html -s -o $@
ttrpg: perks.html spelllist.html test.html main.html creatures.html magical_items.html calc.html effect.html
$(OUTDIR)/%.js: %.js | $(OUTDIR)
cp $< $@
all: ttrpg
$(OUTDIR)/%.html: %.html | $(OUTDIR)
cp $< $@
all: $(LIST)
$(OUTDIR):
mkdir -p $(OUTDIR)
clean:
rm -r $(OUTDIR)