array-mumu 0.1.11

Array tools plugin for the Mumu ecosystem
Documentation
# Makefile — build & install the MuMu "array" plugin
# Default: debug build (keeps rich debug / assertions)
# Use `make release` for an optimized .so/.dylib

PLUGIN := array

# Detect platform-specific dynamic library suffix and ldconfig availability
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
  DLL      := dylib
  LDCONFIG := true
else
  DLL      := so
  LDCONFIG := ldconfig
endif

TARGET  := libmumu$(PLUGIN).$(DLL)
PREFIX  ?= /usr/local
LIBDIR  ?= $(PREFIX)/lib

# ───────────────────────── targets ─────────────────────────

.PHONY: all debug release install install-debug uninstall clean print-target

all: debug

debug:
	cargo build

release:
	cargo build --release

install: release
	sudo install -m 0755 target/release/$(TARGET) $(LIBDIR)/$(TARGET)
	sudo $(LDCONFIG)

install-debug: debug
	sudo install -m 0755 target/debug/$(TARGET) $(LIBDIR)/$(TARGET)
	sudo $(LDCONFIG)

uninstall:
	sudo rm -f $(LIBDIR)/$(TARGET)
	sudo $(LDCONFIG)

clean:
	cargo clean

print-target:
	@echo $(TARGET)