1
0
Files
robolitik/Makefile
2024-09-03 20:05:42 +02:00

57 lines
1.1 KiB
Makefile

common_deps := src/deck.rb data/cards.xlsx ._graphics_copy_touch ._graphics_extract_touch config.yml ._layouts/poker.yml
pnp := _output/pnp_A4.pdf
debug := _output/debug.pdf
showcase := _output/hand.png
full := _output/full/front/card_00.png
.PHONY: all
all: $(pnp) $(debug) $(showcase) $(full)
.PHONY: pnp
pnp: $(pnp)
.PHONY: debug
debug: $(debug)
.PHONY: showcase
showcase: $(showcase)
.PHONY: full
full: $(full)
.PHONY: clean
clean:
rake clean
rm -r _output/*
rm -r ._layouts
rm -r ._graphics
rm ._graphics_copy_touch ._graphics_extract_touch
$(pnp): $(common_deps)
rake pnp
$(debug): $(common_deps)
rake debug
$(showcase): $(common_deps)
rake showcase
$(full): $(common_deps)
rake full
._graphics_extract_touch: $(wildcard graphics/bundled/*)
@ mkdir -p ._graphics
python scripts/extract_graphics.py $^
@ touch ._graphics_extract_touch
._graphics_copy_touch: $(wildcard graphics/stand-alone/*)
@ mkdir -p ._graphics
cp $^ ./._graphics/
@ touch ._graphics_copy_touch
._layouts/poker.yml: scripts/generate_layouts.py
python scripts/generate_layouts.py