This monorepo uses the GN + Ninja build system. The build tools are pre-installed in the tool/ directory.
# Generate build files
./tool/gn gen out
# Build all targets
./tool/ninja -C out
# Run the ipsw executable
./out/ipsw
# Clean build
rm -rf out/
# Update build tools (if needed)
./sync_tools.sh- Debug builds by default (
is_debug = trueinbuild/BUILDCONFIG.gn) - Compiler flags:
-Wall -Wextra -Werror(strict warnings as errors) - Currently supports macOS only (x86_64 and ARM64)
This is a C monorepo structured for scalability:
.gn- Defines the root build configuration and toolchainbuild/BUILDCONFIG.gn- Global build settings and compiler configurationsbuild/toolchain/BUILD.gn- Toolchain definitions for Clang on macOS
- Create a new directory for your component
- Add a
BUILD.gnfile in that directory defining targets - Reference the new target from the root
BUILD.gnusingdeps
Example target structure:
executable("my_program") {
sources = [ "main.c" ]
deps = [ "//some/other:target" ]
}executable()- Creates an executable binarystatic_library()- Creates a static library (.a)shared_library()- Creates a shared library (.dylib on macOS)source_set()- Lightweight alternative to static_library
- No test framework is currently configured
- No linting beyond compiler warnings
- No CI/CD pipeline set up
- Build outputs go to
out/directory