themes-noir/Makefile
Alex Dunmow 1bebbea5ad initial: theme plugin noir
Bootstrapped during the 2026-06-06 BlockNinja consolidation. Was previously
an unversioned directory inside ~/src/blockninja-themes/noir.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-06 14:11:40 +08:00

32 lines
842 B
Makefile

# Noir — build helpers (.so plugin workflow)
#
# Local single-shot build:
# make # produces noir.so via CGO go build -buildmode=plugin
# make templ # regenerate *_templ.go files
# make clean # remove build artefacts
.PHONY: all clean templ help
PLUGIN_NAME := noir
# Default target: build the .so locally.
all: $(PLUGIN_NAME).so
# Local plugin build (no container). Compiles to .so.
$(PLUGIN_NAME).so: $(wildcard *.go) plugin.mod go.mod
CGO_ENABLED=1 go build -buildmode=plugin -ldflags="-s -w" -o $(PLUGIN_NAME).so .
# Regenerate templ Go files locally.
templ:
templ generate
# Remove build artefacts.
clean:
rm -f $(PLUGIN_NAME).so
help:
@echo "Targets:"
@echo " all Build $(PLUGIN_NAME).so (default)"
@echo " templ Regenerate *_templ.go files"
@echo " clean Remove build artefacts"