Commit Graph

87 Commits

Author SHA1 Message Date
Andrew Tridgell 5c259459ea waf: build with AP_TempCalibration 2018-02-08 17:36:33 +11:00
Andrew Tridgell 0258c5baf4 waf: added AP_Radio to build 2018-02-08 17:36:33 +11:00
Andrew Tridgell d7c62602ed waf: added AP_RCProtocol to list of libraries for all vehicles 2018-01-20 17:40:07 +11:00
Andrew Tridgell e026a408f3 waf: added AP_RAMTRON and AP_IOMCU to build 2018-01-15 11:46:02 +11:00
Andrew Tridgell 9869b98da3 waf: added ap_version_append_int()
used for date defines
2018-01-15 11:46:02 +11:00
Peter Barker c56529f39c Tools: waf: remove GCS_Console 2018-01-09 13:46:22 +00:00
Mark Whitehorn fd5039f8cd Tools: link SBusOut library 2017-11-30 10:20:04 +11:00
Andrew Tridgell 766a2a4bc0 Tools: link volz library 2017-11-21 14:10:54 +11:00
Lucas De Marchi cd81b27c05 build: protect ap_version.h from inclusion 2017-09-23 21:37:45 -07:00
Francisco Ferreira d41dd7e7e7
waf: add workaround for PE linker not removing unused methods 2017-08-15 21:51:08 +01:00
Peter Barker 7042d3e9c9 Global: all vehicles get AP_Relay and AP_ServoRelayEvent libraries 2017-07-17 00:06:31 +01:00
Andrew Tridgell d07d2d9a40 Tools: adapt to new RC_Channel API 2017-01-12 17:39:37 +11:00
Andrew Tridgell 35bed59bd4 Tools: Add EKF3 and remove EK1 2016-12-19 08:07:10 +11:00
Andrew Tridgell 7e0d904657 Tools: link in AP_FlashStorage 2016-12-02 09:49:39 +11:00
floaledm 8d0fd7cea8 Tools: add AP_Frsky_Telem 2016-11-08 07:42:39 +11:00
Gustavo Jose de Sousa 31965689cb waf: persist implicit dependency information across clean
Implicit dependency scanning takes significant time and, since it doesn't
produce files, it's okay to keep the resulting information across clean
commands as long as the scanner is triggered again if there's need to. This
commit accomplishes that.

The advantage of this approach can be observed by the following timings when
building the group "bin":

 Method                                                         Time
 ------------------------------------------------------------------------
 Fully clean build                                              5m18.633s
 Clean build with scanning result persisted                     4m23.346s
 Clean build with ccache but non-persistent scan results        1m40.125s
 Clean build with scanning results persisted and with ccache      14.843s

While at it, move management of information persisted across clean commands to
a separate module.
2016-08-24 10:46:23 -03:00
Gustavo Jose de Sousa ef4fd0e2d3 waf: add --clean-all-sigs option
Explanation on the option help string.
2016-08-24 10:46:23 -03:00
Gustavo Jose de Sousa 0b7a98d40c waf: allow persisting tasks signatures across clean commands
That allows some time consuming tasks that don't really produce anything on the
file system to keep their signature after a clean command is issued.
2016-08-24 10:46:23 -03:00
Gustavo Jose de Sousa a98c42fef9 waf: define ap_groups in ardupilotwaf tool
That makes more sense, since that module is supposed to have basic Ardupilot
specific features. The root wscript should be a mere user of those features.
2016-08-24 10:46:23 -03:00
Gustavo Jose de Sousa b8e518a533 waf: use ap_library tool
That way we avoid recompiling source files that don't depend on vehicles.
Change notes:
- UTILITY_SOURCE_EXTS: moved to ap_library
- Task generators indexes: ap_library handles that now and in a better way
- Use of AP_STLIB_FEATURES: it doesn't make sense anymore, since the stlib
  taskgen has empty source list
- Flags and defines: passed down to ap_library through AP_LIBRARIES_OBJECTS_KW
- Set use='mavlink' in AP_LIBRARIES_OBJECTS_KW instead of calls to
  bld.ap_stlib().
2016-08-24 10:46:23 -03:00
Gustavo Jose de Sousa 2e1ac0de8d waf: make get_legacy_defines() "public"
That function will be used by an upcoming separate tool.
2016-08-01 22:04:16 -03:00
Gustavo Jose de Sousa f2dec971e7 waf: add "ap_" prefix to keywords "libraries" and "vehicle"
As an effort to keep things specific to ardupilot API in the build system
consistent and easy way to identify.
2016-08-01 22:04:16 -03:00
Andrew Tridgell db8bf48747 build: added AP_ICEngine to build 2016-07-25 10:06:03 +10:00
Andrew Tridgell 241b6edfcf Build: added AP_Button to build 2016-07-22 15:01:20 +10:00
Andrew Tridgell d25db426a3 waf: added AP_Module to the build 2016-07-14 13:39:47 +10:00
Gustavo Jose de Sousa afcabda21c waf: use better style for add_option() calls
Setting the "help" keyword argument may not fit in one line sometimes. This
patch adds the following convention to calls to add_option() in order to
address that issue in a better way:

    1) The "help" keyword must always be the last argument to be passed.

    2) If the help string is a literal string or a literal string with some
    operation (e.g. "%" operator) and setting the "help" keyword in the code
    doesn't fit a line (considering the limit of characters in a line), then
    the help string must be a triple-quoted string. That has the advantage of
    not having to have several "+" operations for long help strings. In that
    case, the help message must start on the next line and the closing
    triple-quotes must be on a separate line together with the closing
    parenthesis.

The requirement (1) makes it easier to make the style exception in (2)
acceptable.
2016-05-25 17:47:00 -03:00
Gustavo Jose de Sousa 64b8ec61c7 waf: set lib as output dir for static libraries 2016-05-25 17:47:00 -03:00
Gustavo Jose de Sousa 236a62f4b9 waf: create program_dir directory
There's an upcoming patch that moves all static libraries to
`build/<board>/lib/`. That way, the program directory won't be created
automatically by the build system and that will cause problems for PX4 builds,
since it builds ardupilot programs as static libraries and copies stuff to the
program directory.
2016-05-25 17:47:00 -03:00
Gustavo Jose de Sousa 4529028c8a waf: ardupilotwaf: ap_get_all_libraries: ignore non-directory files
Each library in ardupilot is a folder with the source in. That avoids build
failures when there are files in libraries/. That fixes #4099 ("waf doesn't
seem to like TAGS files") and #4093 ("sim_vehicle.py /w waf /w eclipse project
broken on Cygwin").

That problem can be reproduced by just creating a file in libraries/ and trying
to build with waf.

There should be a better way to confirm a path is an ardupilot library. That
can be done later.
2016-05-12 13:47:44 -03:00
Andrew Tridgell fcd7611248 waf: ensure we don't build a library twice 2016-05-10 14:21:43 +10:00
Andrew Tridgell 9653aae21f waf: fixed link of antennatracker on windows 2016-05-10 12:48:41 +10:00
Andrew Tridgell 5ef0c4d3fe waf: added AP_RPM to build 2016-05-10 12:20:44 +10:00
Andrew Tridgell d1a2749317 waf: fixed build for AP_Tuning 2016-05-07 18:34:11 +10:00
Lucas De Marchi 9e3ec3a16d waf: define git versions in a generated ap_version.h header 2016-05-06 13:11:28 -03:00
Lucas De Marchi 2c029ae1f9 waf: fix undef warnings in examples
Fix warnings like this:

<command-line>:0:21: warning: "APM_BUILD_DataFlash_test" is not defined [-Wundef]
/home/lucas/p/dronecode/ardupilot/libraries/AP_Vehicle/AP_Vehicle_Type.h:36:41: note: in expansion of macro ‘APM_BUILD_DIRECTORY’
 #define APM_BUILD_TYPE(type) ((type) == APM_BUILD_DIRECTORY)
                                         ^
These happen because we are trying to set APM_BUILD_DIRECTORY to undefined
values. We should rather default to the APM_BUILD_DIRECTORY ==
APM_BUILD_UNKNOWN
2016-05-04 08:58:37 -03:00
Lucas De Marchi 169c350e85 waf: rename AP_Config.h to ap_config.h
The usual name for this header is config.h, but that's already used by
vehicles. Using uppercase could give the impression this is a
file to be modified, but it's not. Use lowercase instead.
2016-04-05 21:06:25 -07:00
Ricardo de Almeida Gonzaga 5e45c9dfb0 waf: add cxx_checks tool
In order to start generating AP_Config header and detect
parameter such as the existence of cmath functions.
2016-04-05 20:44:15 -07:00
Gustavo Jose de Sousa b251d14778 waf: ardupilotwaf: allow multiple program groups for program
The program_dir defaults to the first group's name. That feature will be useful
for "copter" build command, which will build all frame types.
2016-03-26 15:43:08 -03:00
Gustavo Jose de Sousa 22b0b7e833 waf: ardupilotwaf: add program_dir option to ap_program()
That way we don't force other programs to be built on a directory of their
program group name. The directory name defaults to the program group.

We are separating those two concepts because of the upcoming support for
multiple groups for a program.
2016-03-26 15:43:08 -03:00
Gustavo Jose de Sousa 33fce2bfe5 waf: ardupilotwaf: add option --upload
That option can (and will by PX4) be used by platforms that support uploading
programs to a connected device.
2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa 0329cb14ed waf: ardupilotwaf: export program_name and program_group
Export those values to the task generators, so that other tools may use it.
2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa 45d1af8833 waf: ardupilotwaf: allow to build ap_program as a static library
In the upcoming build for PX4 boards, we will pass down the program a single
static library to PX4 Firmware's cmake build system. This patch is partially
providing a way to do that: the configuration for PX4 will define the
AP_PROGRAM_AS_STLIB environment variable.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 32402b93af waf: ardupilotwaf: remove SITL from common libraries
Only SITL port uses it and using it for PX4 raises compilation errors.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 03c067921e waf: ardupilotwaf: allow extra features for ap_program and ap_stlib
That allows tweak programs and static libraries builds for different
configurations.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 12946db4dc waf: ardupilotwaf: remove common_features()
The function ap_program() was the only one that was using it, so let's just
inline it. Besides, the name was misleading, since the (only) feature added was
for programs instead of general task generators.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 9c5593ef09 waf: ardupilotwaf: don't use common_features() unnecessarily
That function is already used in ap_program().
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 8734432196 waf: ardupilotwaf: don't use Node object for ap_program target
That will make platform specific naming be ignored. We use a string instead, to
let Waf tweak the target name correctly for us. The '#' prefix is to tell Waf
that the path is relative to bld.bldnode (instead of bld.path, which is the
default).
2016-02-27 03:13:08 -03:00
Gustavo Jose de Sousa 662e45fda2 waf: move --check-verbose option declaration
We move it to the correct "scope", that is, ardupilotwaf.py, where it's really
used.
2016-02-22 15:36:48 -03:00
Gustavo Jose de Sousa 8c4d4f3f2a waf: make options groups accessible for any tool
That allows options being declared where they're really used. Additionally, we
load ardupilotwaf after the other tools so that we can create our groups after
all non-ardupilot option groups are created. That makes our groups appear as
the last ones in the help message, which makes it easier to locate them.
2016-02-22 15:36:48 -03:00
Lucas De Marchi f0277cecb4 waf: ignore -Wundef for gtest
The gtest header uses lots of undefined macros, showing lots of warnings
if we enable -Wundef. Ideally we could use a #pragma to ignore the
warning only from the correct header, but this currently doesn't work
with g++ - see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431

So for now we disable the warning completely when compiling gtest or any
test that uses its header.

Thanks Gustavo Sousa
2016-02-19 12:34:24 -02:00