diff options
Diffstat (limited to 'doc/BUILD.md')
| -rw-r--r-- | doc/BUILD.md | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/BUILD.md b/doc/BUILD.md index 1f65122..cd2b436 100644 --- a/doc/BUILD.md +++ b/doc/BUILD.md @@ -21,8 +21,18 @@ cmake --build build_final -j4 | Mode | Flags | Use Case | |------|-------|----------| | Debug | `-DCMAKE_BUILD_TYPE=Debug` | Development, full error checking + debug features | +| SIZE_OPT | `-DDEMO_SIZE_OPT=ON` | Size-optimized, with checks | | STRIP_ALL | `-DDEMO_STRIP_ALL=ON` | Release candidate, full error checking, no debug features (~64k target) | | FINAL_STRIP | `-DDEMO_FINAL_STRIP=ON` | Final release, no error checking, absolute minimum size | +| HEADLESS | `-DDEMO_HEADLESS=ON` | Testing without GPU (audio/timeline work, no rendering) | +| STRIP_EXTERNAL_LIBS | `-DDEMO_STRIP_EXTERNAL_LIBS=ON` | Size measurement only (binary won't run) | + +**Build Hierarchy:** +- **Debug:** Full checks + debug features (hot-reload, seek, etc.) +- **STRIP_ALL:** Full checks, no debug (~64k target, always fullscreen) +- **FINAL_STRIP:** No checks, no debug (absolute minimum, ⚠️ dangerous) + +**Note:** `DEMO_ALL_OPTIONS=ON` enables tests, tools, AND `STRIP_ALL`. ## Dependencies @@ -67,3 +77,21 @@ open build/demo.xcodeproj ``` Use Xcode Metal debugger for shader performance analysis. + +## Build System Internals + +**Asset Dependency Tracking:** +- CMake tracks 42 demo + 17 test assets +- Editing shaders/audio/sequences auto-triggers rebuild +- Asset lists parsed to extract individual file dependencies + +**Header Organization:** +- `asset_manager_dcl.h`: Forward declarations +- `asset_manager.h`: Core API (GetAsset/DropAsset) +- `asset_manager_utils.h`: Typed helpers + +**Code Generation:** +- Timeline: `seq_compiler` → `generated/timeline.cc` +- Music: `tracker_compiler` → `generated/music.cc` +- Assets: `asset_packer` → `generated/assets.h` + `assets_data.cc` +- Cross-compilation uses host-native tools for generation |
