Files
www.thepigeongenerator.xyz/makefile
2025-05-27 10:48:17 +02:00

25 lines
457 B
Makefile

ESBUILD ?= npx esbuild
ESFLAGS += --bundle --minify
# debug handling
DEBUG ?= 0
ifneq ($(DEBUG),0)
ESFLAGS += --define:NDEBUG=0
else
ESFLAGS += --define:NDEBUG=1
endif
.PHONY: all clean
all: out/script.js out/index.html
clean:; rm -rf out/
# generating of HTML
out/index.html: web/index.html
@mkdir -p $(@D)
cp -f $< $@
# compiles / links source code
out/script.js: web/src/*.tsx
@mkdir -p $(@D)
npx esbuild web/src/main.tsx $(ESFLAGS) --outfile=$@