SRCFILES:=$(shell find src/pages/ -type f -name '*.php') HTMLTARGETS:=$(SRCFILES:src/pages/%.php=build/%.html) DEV_SERVER_BINDING?=127.0.0.1:19310 .PHONY: build/static publish dev-server build/codegen all: $(HTMLTARGETS) $(STATICFILES) build/static build/favicon.ico build/codegen build/favicon.ico: src/favicon.ico cp src/favicon.ico build/ build/codegen: php codegen.php build/static: rsync -rupE src/static build/ build/%.html: src/pages/%.php src/template.php @mkdir -p $(dir $@) php expand.php < $< > $@ clean: rm -Rf build publish: neocities push build publish-http: rsync -avh ./build/ hozyro-srv:/var/www/hozyro --delete publish-all: publish publish-http dev-server: @bash -c 'echo -e "\e[91mWARNING: This server should only be used for \ development purposes! IT IS NOT PRODUCTION-SAFE! USE WITH CAUTION!\e[0m"' php -S "$(DEV_SERVER_BINDING)" dev-server.php