aboutsummaryrefslogtreecommitdiff
path: root/makefiles/README.txt
diff options
context:
space:
mode:
authorpx4dev <px4@purgatory.org>2013-05-11 11:32:05 -0700
committerpx4dev <px4@purgatory.org>2013-05-11 11:32:05 -0700
commit196ee8b16fcd42fca04d1fb7e11ec46dd45c8421 (patch)
treee6e4b9c4f601cc7fa4981f4ad83bd4ec7cefce02 /makefiles/README.txt
parent15aae728e5bba7ac255e2f0266d39c5e9d95fc6a (diff)
downloadpx4-firmware-196ee8b16fcd42fca04d1fb7e11ec46dd45c8421.tar.gz
px4-firmware-196ee8b16fcd42fca04d1fb7e11ec46dd45c8421.tar.bz2
px4-firmware-196ee8b16fcd42fca04d1fb7e11ec46dd45c8421.zip
Change the way modules are built so that object paths are relative and use vpath for locating sources (so source paths are also shorter).
Add some basic documentation for the build system files while we're at it.
Diffstat (limited to 'makefiles/README.txt')
-rw-r--r--makefiles/README.txt71
1 files changed, 71 insertions, 0 deletions
diff --git a/makefiles/README.txt b/makefiles/README.txt
new file mode 100644
index 000000000..8b84e4c40
--- /dev/null
+++ b/makefiles/README.txt
@@ -0,0 +1,71 @@
+PX4 Build System
+================
+
+The files in this directory implement the PX4 runtime firmware build system
+and configuration for the standard PX4 boards and software, in conjunction
+with Makefile in the parent directory.
+
+../Makefile
+
+ Top-level makefile for the PX4 build system. This makefile supports
+ building NuttX archives, as well as supervising the building of all
+ of the defined PX4 firmware configurations.
+
+ Try 'make help' in the parent directory for documentation.
+
+firmware.mk
+
+ Manages the build for one specific firmware configuration.
+ See the comments at the top of this file for detailed documentation.
+
+ Builds modules, builtin command lists and the ROMFS (if configured).
+
+ This is the makefile directly used by external build systems; it can
+ be configured to compile modules both inside and outside the PX4
+ source tree. When used in this mode, at least BOARD, MODULES and
+ CONFIG_FILE must be set.
+
+module.mk
+
+ Called by firmware.mk to build individual modules.
+ See the comments at the top of this file for detailed documentation.
+
+ Not normally used other than by firmware.mk.
+
+nuttx.mk
+
+ Called by ../Makefile to build or download the NuttX archives.
+
+upload.mk
+
+ Called by ../Makefile to upload files to a target board. Can be used
+ by external build systems as well.
+
+setup.mk
+
+ Provides common path and tool definitions. Implements host system-specific
+ compatibility hacks.
+
+board_<boardname>.mk
+
+ Board-specific configuration for <boardname>. Typically sets CONFIG_ARCH
+ and then includes the toolchain definition for the board.
+
+config_<boardname>_<configname>.mk
+
+ Parameters for a specific configuration on a specific board.
+ The board name is derived from the filename. Sets MODULES to select
+ source modules to be included in the configuration, may also set
+ ROMFS_ROOT to build a ROMFS and BUILTIN_COMMANDS to include non-module
+ commands (e.g. from NuttX)
+
+toolchain_<toolchainname>.mk
+
+ Provides macros used to compile and link source files.
+ Accepts EXTRADEFINES to add additional pre-processor symbol definitions,
+ EXTRACFLAGS, EXTRACXXFLAGS, EXTRAAFLAGS and EXTRALDFLAGS to pass
+ additional flags to the C compiler, C++ compiler, assembler and linker
+ respectively.
+
+ Defines the COMPILE, COMPILEXX, ASSEMBLE, PRELINK, ARCHIVE and LINK
+ macros that are used elsewhere in the build system.