The Aether Flyweight
Share vast amounts of magical state efficiently through common prerequisite files.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Flyweight
ARCANUM SCHOOL: Abjuration // Memory Warding
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
# The Flyweight intrinsic state (Shared artifact)
FLYWEIGHT_CORE = .flyweight.core
$(FLYWEIGHT_CORE):
@echo "Forging the shared Aether Core..."
@echo "HEAVY_MAGICAL_DATA" > $@
# Extrinsic state is passed or unique to the targets
.PHONY: construct_golem_a construct_golem_b
# Both targets depend on the exact same heavy core file to save temporal space
construct_golem_a: $(FLYWEIGHT_CORE)
@echo "Animating Golem A with core data: $$(cat $(FLYWEIGHT_CORE))"
@echo "Golem A uses extrinsic material: Clay"
construct_golem_b: $(FLYWEIGHT_CORE)
@echo "Animating Golem B with core data: $$(cat $(FLYWEIGHT_CORE))"
@echo "Golem B uses extrinsic material: Iron"
clean:
@rm -f $(FLYWEIGHT_CORE)
Runic Tags:
#makefile
#structural
#flyweight
#optimization