# Part 13 operability build fragment. Included from the root Makefile with: # -include src/operability.mk # Production uses -Isrc only (real base headers). Standalone verification # (this worktree has no base tree) sets OPERABILITY_STANDALONE=1 to add the # ADAPTER shims under src/operability/adapters/include. CXX ?= g++ AR ?= ar OPERABILITY_STANDALONE ?= 0 OPERABILITY_SRCS := \ src/operability/deploy/rolling.cpp \ src/operability/deploy/blue_green.cpp \ src/operability/deploy/lifecycle.cpp \ src/operability/coord/lease.cpp \ src/operability/coord/dist_lock.cpp \ src/operability/coord/election.cpp \ src/operability/resilience/breaker.cpp \ src/operability/resilience/bulkhead.cpp \ src/operability/resilience/shedder.cpp \ src/operability/resilience/deadline.cpp \ src/operability/resilience/slo.cpp \ src/operability/chaos/injector.cpp \ src/operability/chaos/experiment.cpp \ src/operability/debug/endpoint.cpp \ src/operability/debug/snapshot.cpp OPERABILITY_OBJS := $(patsubst src/%.cpp,build/obj/%.o,$(OPERABILITY_SRCS)) OPERABILITY_LIB := build/liboperability.a OPERABILITY_TEST_SRCS := \ tests/src/operability/test_coord.cpp \ tests/src/operability/test_lifecycle.cpp \ tests/src/operability/test_breaker_bulkhead.cpp \ tests/src/operability/test_shed_deadline.cpp \ tests/src/operability/test_deploy.cpp \ tests/src/operability/test_slo.cpp \ tests/src/operability/test_chaos.cpp \ tests/src/operability/test_debug.cpp \ tests/src/operability/main.cpp OPERABILITY_CXXFLAGS := -std=c++23 -O2 -Wall -Wextra -Wpedantic -Werror -pthread -Isrc ifeq ($(OPERABILITY_STANDALONE),1) OPERABILITY_CXXFLAGS += -Isrc/operability/adapters/include endif $(OPERABILITY_LIB): $(OPERABILITY_OBJS) mkdir -p $(dir $@) $(AR) rcs $@ $^ build/obj/%.o: src/%.cpp mkdir -p $(dir $@) $(CXX) $(OPERABILITY_CXXFLAGS) -c $< -o $@ build/operability_tests: $(OPERABILITY_LIB) $(OPERABILITY_TEST_SRCS) mkdir -p build $(CXX) $(OPERABILITY_CXXFLAGS) -DMOLO_ENABLE_DEBUG $(OPERABILITY_TEST_SRCS) $(OPERABILITY_LIB) -o $@ build/operability_tests_nodebug: $(OPERABILITY_LIB) $(OPERABILITY_TEST_SRCS) mkdir -p build $(CXX) $(OPERABILITY_CXXFLAGS) $(OPERABILITY_TEST_SRCS) $(OPERABILITY_LIB) -o $@ .PHONY: operability operability-tests operability-check operability: $(OPERABILITY_LIB) operability-tests: build/operability_tests build/operability_tests_nodebug operability-check: operability-tests ./build/operability_tests ./build/operability_tests_nodebug