Commit Graph

284 Commits

Author SHA1 Message Date
Lucas De Marchi 04fc1e22da waf: check for lttng-ust for all linux boards 2016-05-23 12:06:42 -03:00
Lucas De Marchi 9ac6c399e9 waf: accept env variable to append library
Change check_librt() to do everything it needs to check for librt.
2016-05-23 12:06:42 -03:00
Gustavo Jose de Sousa 0f60c8ed4f waf: boards: check for librt when necessary 2016-05-19 18:15:06 -03:00
Gustavo Jose de Sousa e630c2b33f waf: cxx_checks: define ap_common_checks() instead of configure()
That allow loading the cxx_checks tool before the calls to configure_env().
That way, we can add check functions to be used across boards.
2016-05-19 18:15:06 -03:00
Gustavo Jose de Sousa ff46384258 waf: add --debug configuration option
That sets a variant <board>-debug.
2016-05-07 22:55:03 -03:00
Lucas De Marchi 9e3ec3a16d waf: define git versions in a generated ap_version.h header 2016-05-06 13:11:28 -03:00
Julien Beraud 5418f71aae waf: add libiio support for bebop
check for the presence of libiio to enable the compilation of
the bebop rangefinder that needs it.
If the build remains static, there needs to be a rootfs that contains
the libiio.a file because it is not included in the debian package.
A solution can be to compile libiio and copy libiio.a in /usr/lib[/arch]
2016-05-03 16:43:39 -03:00
Lucas De Marchi e6907a607b waf: link with winmm on cygwin
Otherwise it fails to link:

[335/335] Linking build/sitl/bin/arducopter-quad.exe
ArduCopter/libArduCopter_libs.a(SIM_Aircraft.cpp.4.o):SIM_Aircraft.cpp:(.text$_ZN4SITL8AircraftC2EPKcS2_+0x230): undefined reference to `_imp__timeGetTime@0'
ArduCopter/libArduCopter_libs.a(SIM_Aircraft.cpp.4.o):SIM_Aircraft.cpp:(.text$_ZN4SITL8Aircraft16setup_frame_timeEff+0x9f): undefined reference to `_imp__timeGetTime@0'
ArduCopter/libArduCopter_libs.a(SIM_Aircraft.cpp.4.o):SIM_Aircraft.cpp:(.text$_ZN4SITL8Aircraft16setup_frame_timeEff+0x125): undefined reference to `_imp__timeGetTime@0'
ArduCopter/libArduCopter_libs.a(SIM_Aircraft.cpp.4.o):SIM_Aircraft.cpp:(.text$_ZN4SITL8Aircraft15sync_frame_timeEv+0x21): undefined reference to `_imp__timeGetTime@0'
ArduCopter/libArduCopter_libs.a(SIM_Aircraft.cpp.4.o):SIM_Aircraft.cpp:(.text$_ZN4SITL8Aircraft15sync_frame_timeEv+0x152): undefined reference to `_imp__timeGetTime@0'
ArduCopter/libArduCopter_libs.a(SIM_Aircraft.cpp.4.o):SIM_Aircraft.cpp:(.text$_ZNK4SITL8Aircraft16get_wall_time_usEv+0xe): more undefined references to `_imp__timeGetTime@0' follow
collect2: error: ld returned 1 exit status
2016-04-19 19:02:25 -03: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
Ricardo de Almeida Gonzaga 14dbc16d46 waf: start using 'AP_Common/missing' to all boards 2016-04-05 20:44:15 -07:00
Francisco Ferreira d54a22baaa waf: boards: change no-unknown-pragmas to all compilers instead of only Clang 2016-03-30 01:32:45 -03:00
Gustavo Jose de Sousa 95aeb0346e waf: load compilers tools in toolchain tool
It makes more sense the toolchain Waf tool to be responsible of loading the
compilers. Furthermore, that allows toolchain tool to have control on doing
configuration before and after loading compiler tools.
2016-03-23 17:11:02 -03:00
Francisco Ferreira a8aae048c2 waf: boards: change toolchain to a board class attribute 2016-03-20 00:17:02 -03:00
Francisco Ferreira f8727f7362 waf: boards: fix bug in boards environment merge 2016-03-20 00:17:02 -03:00
Francisco Ferreira bf3dda9156 waf: boards: support Clang by adding necessary flags
Don't add unsupported flag when compiler is Clang
2016-03-20 00:17:02 -03:00
Francisco Ferreira 3b3d59efd1 waf: boards: load toolchain and compiler before configuring env 2016-03-20 00:17:02 -03:00
Gustavo Jose de Sousa 95848488e7 waf: boards: define PX4 boards 2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa 841771096d waf: let toolchain loading in charge of the Board class
That allows boards (i.e. subclasses of Board) to use toolchain related
information for configuration. The upcoming PX4 build is an example.
2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa 8664c0344d waf: allow boards to tweak build
We define a function build() that can be overrode by Board subclasses.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 1fe795f283 waf: boards: set Board as an abstract board
Let's have a unified way to do that - no need for checking the board name
anymore.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 93156e4325 waf: boards: allow defining abstract boards
That avoids instantiation of wrong board classes and also listing invalid board
names in the help message.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa b53f38bb02 waf: boards: cache board in a variable
That allows subsequent calls to get_board() to work nicely, with no need of
instantiating a board on every single call.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 36b49debf6 waf: boards: allow defining board name
If the name is not defined, then the class name will be used.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 4f55c75767 waf: boards: pass configure context to configure_env()
There will be cases when the configuration context will be needed.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 86c1c6da5c waf: fix environment boolean values
It is more natural to use `env.FOO = True` then `env.foo = [True]`.
2016-03-03 14:58:03 -03:00
Gustavo Jose de Sousa 79b724dce8 waf: ardupilotwaf: fix board env processing
Two things are fixed with this patch:
    1. We sort dictionaries' keys if they aren't OrderedDict instances. Since
    dict objects don't guarantee order, environment variables may have contents
    in wrong order, causing unnecessary rebuilds.
    2. We only use prepend_value() if there's already a value set for the key
    and that value is list. Before this change, boards couldn't set
    non-iterable values.
2016-03-03 14:58:03 -03:00
Staroselskii Georgii 1107190656 waf: boards: add navio2 2016-02-27 03:06:50 -03:00
Lucas De Marchi 15ce176818 waf: add -Wundef to all boards 2016-02-19 12:34:24 -02:00
Gustavo Jose de Sousa 393bea8945 waf: boards: use classes for boards definition
In order to provide board-specific behavior. For example, the incoming PX4
build will require custom build behavior.
2016-02-18 14:33:46 -02:00
Lucas De Marchi a01b933cb9 waf: add missing warnings from AP_Common.h
Copy the missing warnings from AP_Common.h and reorder the warnings to
be more clear on intent. This will later let us remove the warnings from
the header.
2016-02-12 20:41:29 +11:00
Lucas De Marchi d844b90d5e waf: remove duplicated warning flag 2016-01-30 13:47:28 -02:00
pkancir 85f0ef9265 waf : use LINKFLAGS for pthread
-pthread is the one supposed to be used because it defines pre-defined
macros as -lpthread doesn't, like was done in
2016-01-14 18:59:04 -02:00
Gustavo Jose de Sousa d5e7b321f6 waf: add most linux boards 2016-01-11 16:31:59 -02:00
Caio Marcelo de Oliveira Filho 6856950bd3 waf: use ConfigSet for board environments
Instead of a dictionary of dictionaries, have a dictionary of
ConfigSets. Using ConfigSet have two benefits: (1) allow easily copying
values from other, (2) have syntax for specifying the keys directly as
attributes.

With this change now it's easier to specify minlure without
repetition. New boards can override a value, append or prepend depending
on the need.

DEFINES attribute is treated as a dictionary instead of a list, so
that's easier to override values (at expense of ordering). When reading
the board environment, the code converts back to a list.

The board configuration is now stored in a separate file, there's also a
function to get the boards names.
2015-12-03 07:54:32 +11:00