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

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

29 lines
808 B
Makefile

# Editorial — local plugin build helpers.
#
# This Makefile intentionally focuses on the local single-shot build target.
# The remote deploy targets (e.g. `make rebuild`) are not provided here to
# keep the build pass scoped to local artefact production.
#
# Usage:
# make # default: produce editorial.so
# make templ # regenerate *_templ.go from *.templ
# make clean # remove editorial.so
.PHONY: all clean templ
PLUGIN_NAME := editorial
TEMPL := $(HOME)/go/bin/templ
# Default target: build the .so locally.
all: $(PLUGIN_NAME).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
clean:
rm -f $(PLUGIN_NAME).so