A comprehensive handbook on SCons, a Python-based build tool that replaces Make, autoconf, and automake. Covers installation, core concepts (SConstruct, SConscript, Construction Environments, Builders, Nodes), a detailed multi-file C++ project with static libraries and variant directories for debug/release builds, and cross-compilation setup for Qualcomm's QuRT real-time OS on the Hexagon DSP. Includes side-by-side comparisons with Make, CMake, and Meson, explaining SCons' content-hash-based rebuild detection and automatic header dependency scanning.

1h 2m read timeFrom freecodecamp.org
Post cover image
Table of contents
Table of ContentsPrerequisitesWhat is SCons and Why Does it Exist?How SCons Compares to Make, CMake, and MesonA Side-by-Side Look at Make Versus SConsInstalling SConsCore Concepts You Need Before Writing a Build FileThe Three Environments in SConsConstruction Variables ReferenceYour First SConstruct FileBuilding a Multi-File C++ Project Step by StepDetailed Walkthrough of Every File in the ProjectRunning the Build and Understanding the OutputWhat Happens During an Incremental BuildCross-Compiling for QuRT (Qualcomm Real-Time OS)Writing QuRT-Specific Application CodeBuilding Both Native and QuRT From One SConstructHow SCons Detects Dependencies and Decides What to RebuildWriting a Custom ScannerThe Shared Build CacheWorking with Shared LibrariesAdding Command-Line Options with AddOptionConfigure Checks for PortabilityCustom Builders for Non-Standard File TypesAliases, Default Targets, and Install RulesPlatform-Specific ConfigurationCustomizing Build OutputHow to Debug SCons Build FilesThe SCons Command-Line ReferenceCommon Mistakes and How to Avoid ThemSummary

Sort: