# Makefile: build autocontido e servidor local da apresentação.
#
#   make        -> gera build/index.html (CSS/JS embutidos) + build/assets/
#   make build  -> igual a `make`
#   make pdf    -> gera build/robo-movel.pdf (depende de build)
#   make serve  -> sobe um servidor local em build/
#   make clean  -> remove a pasta build/

PYTHON ?= python3
PORT ?= 8000
NODE ?= node

.PHONY: all build pdf serve clean

all: build

build:
	$(PYTHON) scripts/build.py

pdf: build
	$(NODE) scripts/build-pdf.cjs

serve: build
	@echo "Servindo em http://localhost:$(PORT)/ (Ctrl+C para parar)"
	cd build && $(PYTHON) -m http.server $(PORT)

clean:
	rm -rf build
