Balloon Build System - How it Works
Makefile structure
Makefile
Makefile.in
Includes:
.config
Defines a whole load of variables which indicate how the software distribution is to be configured. This file is written by make menuconfig.
package/Makefile.in
- Includes targets to check that certain build tool packages are installed like git and multistrap which will be needed for specific targets later in the build.
- Includes each makefile snippet from each package to implement how each option in the .config is expressed as Makefile options.
See also Packages and KernelDevelopment
Targets:
Many of these are just shortcuts to config- targets for convenience.
world
all
all
config
install
config-install
clean
config-clean
distclean
config-distclean
reallyclean
- Deletes the build and distro directories completely
dist
config-dist
source
config-source
uninstall
config-uninstall
Makefile.help
Targets:
help
- Displays help text
Makefile.local
Targets:
setup
- Creates build, distro/binaries, distro/debpackage, distro/sources and makes the file setup.stamp to indicate that they're present.
Makefile.conf
Targets:
defconfig
If a file defconfig$VARIANT is not present, creates it by making a straight copy of defconfig. Then copies this as .config, overwriting any previous config.
config/mconf
Builds the mconf tool which is used to generate the menuconfig user interface.
menuconfig
Runs the menuconfig user interface and produces the .config file which configures the software build.
config
Actually builds the system, by depending on $(BUILD_TOOLS) (undefined), $(TARGETS_ENV) (indicating that the build environment is OK, for example setup.stamp), $(TARGETS) (defined by the makefiles in each package), $(TARGETS_EXTRA) (undefined)
config-clean
Makes clean in every target, which really means every package, by adding a dependency on $(TARGET)-clean and in the config directory.
config-distclean
Makes distclean in every target/package, by adding a dependency on $(TARGET)-distclean, and in the config directory
config-dist
Makes each target/package ready for distribution by adding a dependency on $(TARGET)-dist
config-source
Makes source of each target/package ready for distribution by adding a dependency on $(TARGET)-source