- Remove old 10-engine system (engines/ directory deleted) - Implement C++ triple interface architecture: * IEngine: Execution coordination (Debug → Production) * IModuleSystem: Strategy pattern (Sequential → Threaded → Cluster) * IModule: Pure game logic interface (200-300 lines per module) * IIO: Communication transport (Intra → Local → Network) - Add autonomous module structure: * modules/factory/: Production logic with autonomous build * modules/economy/: Market simulation with autonomous build * modules/logistic/: Supply chain with autonomous build * Each module: CLAUDE.md + CMakeLists.txt + shared/ + build/ - Benefits for Claude Code development: * Ultra-focused contexts (200 lines vs 50K+ lines) * Autonomous builds (cmake . from module directory) * Hot-swappable infrastructure without logic changes * Parallel development across multiple Claude instances 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
63 lines
1.6 KiB
CMake
63 lines
1.6 KiB
CMake
cmake_minimum_required(VERSION 3.20)
|
|
project(EconomyModule LANGUAGES CXX)
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -DDEBUG")
|
|
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
|
|
|
|
if(NOT CMAKE_BUILD_TYPE)
|
|
set(CMAKE_BUILD_TYPE Debug)
|
|
endif()
|
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/build)
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/build)
|
|
|
|
include_directories(shared)
|
|
|
|
# Economy module as shared library (.so)
|
|
add_library(economy-module SHARED
|
|
src/EconomyModule.cpp
|
|
)
|
|
|
|
set_target_properties(economy-module PROPERTIES
|
|
PREFIX ""
|
|
SUFFIX ".so"
|
|
OUTPUT_NAME "economy"
|
|
)
|
|
|
|
# Test executable
|
|
add_executable(economy-test
|
|
src/EconomyModule.cpp
|
|
tests/EconomyTest.cpp
|
|
)
|
|
|
|
# Standalone executable
|
|
add_executable(economy-standalone
|
|
src/EconomyModule.cpp
|
|
src/main.cpp
|
|
)
|
|
|
|
add_custom_target(build-economy
|
|
DEPENDS economy-module
|
|
COMMENT "Building economy.so module"
|
|
)
|
|
|
|
add_custom_target(test-economy
|
|
DEPENDS economy-test
|
|
COMMAND ./build/economy-test
|
|
COMMENT "Running economy module tests"
|
|
)
|
|
|
|
add_custom_target(clean-economy
|
|
COMMAND ${CMAKE_COMMAND} -E remove_directory build
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory build
|
|
COMMENT "Cleaning economy module build"
|
|
)
|
|
|
|
message(STATUS "💰 Economy Module configured:")
|
|
message(STATUS " cmake . : Configure")
|
|
message(STATUS " make economy-module : Build economy.so")
|
|
message(STATUS " make test-economy : Run tests")
|
|
message(STATUS " make clean-economy : Clean build") |