1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

567 Commits

Author SHA1 Message Date
Leandro Lanzieri
e031051e0a
Makefile.include: allow to select packages from Kconfig 2020-11-25 12:00:13 +01:00
19590a9f74
Makefile.include: include emulator logic when emulate target is used 2020-11-20 14:24:05 +01:00
Leandro Lanzieri
f22927645d
Makefile.include: discover object files in subpaths while linking 2020-11-03 17:25:33 +01:00
Leandro Lanzieri
34d84ad8c6
makefile: add check for ERROR_ Kconfig symbols
This adds a check in the build process to verify that no ERROR_ Kconfig
symbols are set. These symbols indicate invalid conditions in the
Kconfig configuration.
2020-10-09 18:01:33 +02:00
Francisco Molina
90a4d77879
Makefile.include: intial features check before dependency resolution 2020-09-14 18:56:33 +02:00
6c2459057f
Merge pull request #14910 from OTAkeys/pr/thread_names
thread: Add THREAD_NAMES make flag
2020-09-11 10:54:10 +02:00
Jim O'Brien
bd149e7db9 thread: Add THREAD_NAMES make flag
Separate thread names from DEVELHELP so thread names can be
enabled in non-development/debug builds when required/desired.
THREAD_NAMES will be enabled by default then DEVELHELP is set to 1.
2020-09-10 10:08:27 +02:00
Leandro Lanzieri
e80bb4b3dc
makefile: add a check for real modules 2020-09-04 15:01:16 +02:00
Leandro Lanzieri
81cb769cad
makefiles: avoid building archives when compiling 2020-09-04 15:01:10 +02:00
Leandro Lanzieri
2e79e00ca7
treewide: change Kconfig prefix for module symbols
This changes the prefix used for the symbols that reprensent modules
(not the ones generated from USEMODULE).

MOD_ => MODULE_
2020-08-31 09:57:28 +02:00
b93b972074
Merge pull request #14753 from fjmolinas/pr_info_boards_supported_conflicts
makefiles/info-global.inc.mk: include FEATURES_CONFLICTS
2020-08-18 10:37:20 +02:00
Francisco Molina
8ab8d04e9b
makefiles/info-global.inc.mk: include FEATURES_CONFLICTS
If there are FEATURES_CONFLICTING consider the application not
supported for the BOARD.
2020-08-13 09:29:34 +02:00
Leandro Lanzieri
180ee6efc9
makefiles: introduce KCONFIG_ADD_CONFIG variable
This holds a list of .config files to be merged. For more details see
kconfig.mk.
2020-08-12 12:22:42 +02:00
Leandro Lanzieri
01454188e8
Makefile.include: introduce TEST_KCONFIG switch
This switch allows to test the module dependency modelling during the
Kconfig migration. When set, it will use the symbols prefixed with
CONFIG_MOD_ defined by Kconfig as the list of modules to compile.
2020-08-12 12:22:41 +02:00
Martine Lenders
b9a4a5ead7
Merge pull request #14664 from miri64/make/feat/termlog
Makefile.include: add capability to log `make term` to file
2020-08-05 17:45:07 +02:00
Martine S. Lenders
6532459010
Makefile.include: add capability to log make term to file 2020-08-04 14:42:50 +02:00
Leandro Lanzieri
6a5c7744cb
makefiles/kconfig.mk: include KCONFIG_OUT_CONFIG always
This allows to include KCONFIG_OUT_CONFIG file in Makefile
unconditionally, which means that `make clean all` is allowed when using
Kconfig.

For this, the recipe for `clean` is guarded with `MAKE_RESTARTS` so
the BINDIR folder is not removed once Make restarts scanning the files.
2020-07-31 13:55:33 +02:00
Martine S. Lenders
44cf4a9f8d
make: only build MacOS-specific tool on MacOS
The comment says as much, the tool in question even has `macosx` in its
name [1], and it does not build for other non-Linux-POSIX systems such
as FreeBSD.

[1]: https://github.com/tzvetkoff/setsid-macosx
2020-07-29 13:58:04 +02:00
Marian Buschsieweke
267c8e1620
Makefile.include: Link with $(CXX) for C++ code
When mixing C and C++ code, $(CXX) has to be used for linking. Prior to this
commit, the build system automatically uses $(CXX) if the application contains
C++ source code. However, if C++ is used in an module only, $(CC) is still
used. This has not let to problems, as internal modules must be written in C.
For external modules this restriction does not apply.

This commit checks if the cpp feature is used. In that case, $(CXX) is used
for linking over $(CC). This way external modules may use C++ code.
2020-07-23 20:18:32 +02:00
0d9aeba804
Makefile.include: don't include drivers/Makefile.include anymore 2020-07-15 20:36:27 +02:00
38f32be24f
Makefile.include: include per driver Makefile.include if available 2020-07-15 20:34:00 +02:00
9d0253bed3
Makefile.include: remove remaining references to wsn430 2020-07-10 16:49:08 +02:00
Cenk Gündoğan
7aa499d5f1 make: use $(MAKE) instead of direct make call 2020-07-03 12:03:06 +02:00
d98ddfad9a
Merge pull request #13824 from fjmolinas/pr_openwsn
pkg/openwsn: re-integrate the network stack as a package
2020-06-30 14:08:10 +02:00
Francisco Molina
d01476a661
dist/tools/openvisualizer: inital support 2020-06-30 13:10:56 +02:00
chrysn
a181c0dbcd usb: Use separate Makefile for configuration and checks 2020-06-30 10:51:40 +02:00
chrysn
a1725b0b4b usb: Check against explicit use of 1209/7D00 VID/PID pair
That pair is reserved for cases when it can be set implicitly by the
build system.

The check could just as well be done in sys/include/usb.h, but this
gives prettier output.
2020-06-30 10:51:38 +02:00
chrysn
346093c290 usb: Move Kconfig/Makefile merging into main Makefile.include
This allows the check for test IDs to run independently of the
configuration source, and provides a canonical point for the
configurable (and tested) Makefile variable to enter CFLAGS.
2020-06-30 10:51:37 +02:00
chrysn
250f6fdfa3 usb: Warn on test-ID usage in a unified location
This

* renames DEFAULT_xID to USB_xID_TESTING as it is not really a default
  (if anyting, the 7D00 is, and it's not that)
* moves the check into Makefile
* generalizes the check to all test PID/VID pairs
  * in doing so, fixes the "or" (which would have ruled out warning-free
    use of an allocated pid.codes number), and compares to the actual
    testing PID rather than the RIOT-peripheral PID
* removes all occurrences of duplicated checks in examples or tests,
  leaving definitions only where they are needed
* moves the Kconfig defaults of the usbus_minimal example into the main
  Kconfig, as these are good defaults for all cases when USB is enabled
  manually

Closes: https://github.com/RIOT-OS/RIOT/issues/12273
2020-06-30 10:51:36 +02:00
c0925294d8
Merge pull request #14289 from aabadie/pr/pkg/global_pkg_dir
pkg: store packages sources in a global package directory
2020-06-26 11:06:02 +02:00
82b68a113b
Makefile.include: fetch packages sources in a global directory 2020-06-26 09:25:43 +02:00
Francisco Molina
4383599220
Makefile.include: resolve dependencies before Makefile.include 2020-06-25 09:24:05 +02:00
df58141e15
Makefile.include: don't define GITCACHE and GIT_CACHE_DIR globally 2020-06-23 14:54:25 +02:00
Benjamin Valentin
a74c41061b Makefile.include: allow prefix for $(PREFLASHER)
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2020-06-11 11:56:35 +02:00
Francisco Molina
47a5805434
Makefile: add BINFILE to default BUILD_FILES 2020-05-28 10:40:48 +02:00
Francisco Molina
1bd74ee81f
Makefile.include: remove useless assignment of none to BOARD 2020-05-26 10:20:36 +02:00
Francisco Molina
f1079cbe9f
Makefile.include: don't warn about BOARDSDIR usage in sub-make 2020-05-26 10:19:52 +02:00
Francisco Molina
8eee779c50
makefiles/info-global.inc.mk: add info-boards-features-blacklisted 2020-05-25 09:48:36 +02:00
Francisco
919249f361
Merge pull request #13862 from maribu/extra_boards
Makefile*: Allow multiple external board dirs
2020-04-29 20:12:06 +02:00
Marian Buschsieweke
ba7815163c
Makefile*: Allow multiple external board dirs
- Add the new EXTERNAL_BOARD_DIRS variable that can contain a space separated
  list of folders containing external boards
- Introduce $(BOARDDIR) as shortcut for $(BOARDSDIR)/$(BOARD)
- Map the existing BOARDSDIR to the new approach
    - If BOARDSDIR is provided by the user, it will be added to
      EXTERNAL_BOARD_DIRS for backward compatibility. (And a warning is issued
      to encourage users migrating to EXTRA_BOARDS.)
    - BOARDSDIR is updated after the board is found to "$(BOARDDIR)/..".
        - Useful for `include $(BOARDSDIR)/common/external_common/Makefile.dep`
        - Provides backward compatibility
2020-04-29 18:32:39 +02:00
Benjamin Valentin
d5dce87e1b Makefile.include: rename MAKEFILEDIR to LAST_MAKEFILEDIR
Rename the variable to make it clearer that it refers to the last Makefile
included.
Usually this is the current file, but when another Makefile is included this
changes.
2020-04-28 15:45:27 +02:00
Benjamin Valentin
6887e2f40e Makefile.include: update the documentation of $(MAKEFILEDIR) 2020-04-25 19:10:00 +02:00
Francisco
3d8f71768c
Merge pull request #13846 from benpicco/Makefile-THISDIR
Makefile.include: add $(MAKEFILEDIR) helper and use it
2020-04-21 11:00:52 +02:00
Sören Tempel
24468bead6 fuzzing: Initialize
This adds a new subdirectory called `fuzzing/` which will contain
applications for fuzzing various RIOT network modules in the future.
This subdirectory is heavily inspired by the `examples/` subdirectory.

The fuzzing applications use AFL as a fuzzer. Each application contains
Makefiles, source code, and an input corpus used by AFL to generate
input for fuzzing.
2020-04-17 17:11:15 +02:00
Benjamin Valentin
4db6ce3424 Makefile.include: add $(MAKEFILEDIR) helper and use it
$(MAKEFILEDIR) will always evaluate to the directory of the Makefile
where it's being called (evaluated).

This construct is used elsewhere in RIOT, make it more accessable
by defining a special variable with it.
2020-04-15 11:51:05 +02:00
Marian Buschsieweke
7bc15acee2
build system: Restructure dependency resolution
Goals:
- Untangle dependency resolution and feature checking for better maintainability
- Improve performance of "make info-boards-supported"

Changes:
- Makefile.dep
    - Dropped handling of default modules and recursion
    - Now only dependencies of the current set of used modules and pkgs are
      added
  ==> External recursion is needed to catch transient dependencies
- Changed Makefile.features:
    - Dropped checking of provided features
    - Dropped populating FEATURES_USED with provided features that are required
      or optional
    - Dropped populating FEATURES_MISSING with required but not provided
      features
    - Dropped adding modules implementing used features to USE_MODULE
  ==> This now only populates FEATURES_PROVIDED, nothing more
- Added makefiles/features_check.inc.mk:
    - This performs the population of FEATURES_USED and FEATURES_MISSING now
- Added makefiles/features_modules.inc.mk:
    - This performs now the addition of modules implementing used features
- Added makefiles/dependency_resolution.inc.mk:
    - This now performs the recursion required to catch transient dependencies
    - Also the feature check is performed recursively to handle also required
      and optional features of the transient dependencies
    - DEFAULT_MODULES are added repeatedly to allow it to be extended based on
      used features and modules
      ==> This allows modules to have optional dependencies, as these
          dependencies can be blacklisted
- Use simply expanded variables instead of recursively expended variables
  (`foo := $(bar)` instead `foo = $(bar)`) for internal variables during feature
  resolution. This improves performance significantly for
  `make info-boards-supported`.
- Reduce dependency resolution steps in `make info-boards-supported`
    - Globally resolve dependencies without any features (including arch)
      provided
      ==> This results in the common subset of feature requirements and modules
          used
        - But for individual boards additional modules might be used on top due
          to architecture specific dependencies or optional features
    - Boards not supporting this subset of commonly required features are not
      supported, so no additional dependency resolution is needed for them
    - For each board supporting the common set of requirements a complete
      dependency resolution is still needed to also catch architecture specific
      hacks
         - But this resolution is seeded with the common set of dependencies to
           speed this up
2020-04-02 09:55:07 +02:00
Jose Alamos
e451570219 gnrc_netif: remove GNRC_NETIF_NUMOF macro 2020-03-26 11:12:23 +01:00
Francisco Molina
d4e2bede93
Makefile.include: guard suit.base.inc.mk inclusion 2020-03-23 10:22:03 +01:00
7d0c475113
Merge pull request #13486 from bergzand/pr/suit/ietf_v3
SUIT: Update to draft-ietf-v3
2020-03-20 14:44:29 +01:00
413b91326f
tests/suit_v3_manifest: Add draft-ietf-v3 manifest parser test
Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
2020-03-19 22:56:01 +01:00
14bdf8f46b
sys/suit: Add SUIT draft ietf-v3 firmware upgrade module
Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
2020-03-18 14:13:12 +01:00
Martine S. Lenders
09c05ff10d
Makefile.include: don't try to reconnect on cleanterm 2020-03-11 14:56:50 +01:00
Cenk Gündoğan
dbd0b21f15 make: disable implicit rules 2020-02-18 12:11:09 +01:00
651518aa2f
Makefile.include: don't export USEMODULE_INCLUDES var 2020-02-05 10:27:58 +01:00
Francisco Molina
e637fd1658 Makefile.include: remove support for make <4 2020-01-28 11:27:30 +01:00
68210feb54
Merge pull request #12972 from fjmolinas/pr_boardsdir_riotboard
Makefile.include: default to RIOTBOARD when BOARD not in BOARDSDIR
2019-12-31 10:51:27 +01:00
Francisco Molina
1f66c0f3ee Makefile.include: RIOTBOARD as BOARDSDIR fallback 2019-12-30 17:12:16 +01:00
70e6e0aedf
Merge pull request #12862 from fjmolinas/pr_dont_reset_sync
dist/pythonlibs/testrunner: reset before term
2019-12-19 14:42:46 +01:00
Francisco Molina
a77594a348 dist/pythonlibs/testrunner: reset before term
For some boards `make reset` is only possible if a serial connection
is not already open or its execution might disrupt it. This
causes some tests to fail since before running a test the board
is reset.

`make reset` is currently used as a synchronization mechanism between
the application and the test script. With `test_utils_interactive_sync`
this is no longer needed so call `make reset` before `cleanterm` instead
of after when `test_utils_interactive_sync` is used.

Allow setting TESTRUNNER_RESET_AFTER_TERM=1 to keep the previous
behaviour for `examples/%/tests`.
2019-12-19 09:32:37 +01:00
Sebastian Meiling
5eee821f6e makefiles: move exports to vars.inc.mk 2019-12-18 10:07:50 +01:00
Gaëtan Harter
418bcfb95d
makefiles: deprecate 'RIOTBOARD' for 'BOARDSDIR'
Replace using 'RIOTBOARD' by 'BOARDSDIR' to define external boards.
2019-12-16 15:35:05 +01:00
Gaëtan Harter
90692ac92b
makefiles: use 'BOARDSDIR' for the boards directory in compilation
Replace uses of 'RIOTBOARD' by 'BOARDSDIR' during the compilation.
2019-12-16 15:35:04 +01:00
Gaëtan Harter
f76a2d201e
Makefile.include: introduce 'BOARDSDIR' for boards directory
Introduce a new variable 'BOARDSDIR' to use when referencing the base
boards directory.

This is a transition to allow defining external boards while still using
the `RIOT/boards` directory for like `boards/common` for example through
'RIOTBOARD'.
2019-12-16 15:35:04 +01:00
Gaëtan Harter
fc84c90f66
Makefile.include: allow directories that cannot be overridden
Allow defining new directory variables that will not be overridden when
set from command line.

Command line is supposed to override from the value in make.
Promoting another behavior is against `make`.
2019-12-16 15:35:03 +01:00
Leandro Lanzieri
1655001d85 makefiles: Add Kconfig related targets and dependencies
- The autoconf.h header file, generated with the current Kconfig
  configurations, is added as a build dependency.

- autoconf.h depends on the proper tool (genconfig) and a Kconfig.dep
  which contains the dependencies for the given application and board,
  this is generated from $(USEMODULE).

- The menuconfig target is added, to allow the configuration of modules
  using the Kconfig system.
2019-12-04 15:23:51 +01:00
Cenk Gündoğan
07c84a4fc3
Merge pull request #12840 from leandrolanzieri/pr/makefiles_remove_ccache_basedir
makefiles: Generate proper dependency files when using ccache
2019-12-02 11:40:36 +01:00
Leandro Lanzieri
d868c9c5c3 makefiles: Do not set CCACHE_BASEDIR environmental variable
When CCACHE_BASEDIR variable is set, ccache rewrites absolute paths into
relative paths before computing the hash that identifies the compilation
for all the paths under that directory.

The problem is that those paths are also used when the compiler is
called, so the generated dependency files (*.d) will have a relative
path to the object files, and thus, it will not match our rule for
compiling (we use absolute paths). As dependency files define the
targets this way, any change on its dependencies (e.g. an included
header file) will not re-trigger a build.
2019-11-28 15:40:22 +01:00
Gunar Schorcht
5e22de215d makefiles: fix LOG_LEVEL handling 2019-11-27 12:50:47 +01:00
b4da3b464f make: pass BLOBS to makefiles/application.inc.mk
For regular modules, adding files to BLOBS is sufficient to create the
corresponding headers.

Application modules are different, as they use a minimal makefile
(makefiles.application.inc.mk) to build, thus application level
variables are not available.

This commit makes Makefile.include pass BLOBS to the application
Makefile as APPLICATION_BLOBS, and application.inc.mk use that variable
as value for BLOBS.

The indirection is necessary so submakefiles (e.g., those visited by
DIRS) do not hard override BLOBS.
2019-11-18 17:53:48 +01:00
Francisco Molina
f9ebc8658f dist/tools/jlink: cleanup doc 2019-11-18 13:04:42 +01:00
Francisco
9352b88da4
Merge pull request #12417 from cladmi/pr/make/boards/cpu_cpu_model_to_features
Makefile.features: assert CPU is defined by BOARD/Makefile.features
2019-11-12 10:09:23 +01:00
benpicco
c9166c691c
Merge pull request #12435 from fhessel/fix-riotbuild-freebsd
Makefile.include: Fix call to sed for FreeBSD
2019-10-28 11:26:32 +01:00
Francisco
720d4bde4a
Merge pull request #12452 from aabadie/pr/make/fail_by_default_on_expect_errors
Makefile.include: fail by default when errors are expected
2019-10-23 10:47:36 +02:00
6ff2b6408a
Makefile.include: fail by default when errors are expected
The build can still be forced by adding WERROR=0 to the command line
2019-10-22 18:43:55 +02:00
Francisco Molina
45c8eafd42 Makefile.include: remove repeated OS declaration 2019-10-18 10:36:43 +02:00
Francisco Molina
de2ba4ff1a Makefile.include: get OS and OS_ARCH from UNAME 2019-10-18 08:46:51 +02:00
Francisco Molina
c010f59b8c Makefile.include: remove repeated OS declaration
- OS := $(shell uname) is already declared in `Makefile.include`
  re-declaring it means it will be re-evalauted multiple times
  uselessly.
2019-10-18 08:46:51 +02:00
Francisco
01779508d6
Merge pull request #12394 from aabadie/pr/make/iotlab_support_fix
make/testbed-support: fix error with FLASHFILE not defined
2019-10-17 23:21:12 +02:00
8a877b58df
Merge pull request #12479 from fjmolinas/pr_ensure_port_is_set
makefiles/tools/serial: ensure PORT is set and fail early.
2019-10-17 10:56:32 +02:00
Juan Carrano
fe9704dbd6 makefiles/tools/serial: ensure PORT is set and fail early.
By ensuring the PORT auto-detection worked, we can give meaningful
error messages and fail earlier.

This uses ensure_value from makefiles/utils/checks.mk. An include was
added to Makefile.include to make this fuction available to all other
makefiles.
2019-10-17 08:54:16 +02:00
8d0afb2d5a
Merge pull request #12468 from cladmi/pr/make/parallel_flash_test
Makefile.include:  TERMFLASHDEPS to TERMDEPS so it also applies to `test`
2019-10-16 11:46:18 +02:00
41a2249ec6
Makefile.include: include iotlab.single.inc.mk before checking FLASHFILE
This way FLASHFILE is either already defined by the board and, if not,
the default one for iotlab can be used.
2019-10-16 11:44:59 +02:00
6c7acf4188
Merge pull request #12453 from aabadie/pr/make/features_blacklisted
make: handle blacklisted features separately from missing requirements
2019-10-15 19:15:10 +02:00
benpicco
c9b76a9585
Merge pull request #12406 from maribu/pain_in_the_ass
examples: Moved CI infos to Makefile.ci
2019-10-15 14:40:40 +02:00
42f9689c7d
make: manage blacklisted features independently 2019-10-15 11:39:16 +02:00
Marian Buschsieweke
ba90ba2e2f
examples: BOARD_INSUFFICIENT_MEMORY -> Makefile.ci
- Decluttered Makefile by moving BOARD_INSUFFICIENT_MEMORY lists from Makefile
  to Makefile.ci
- Optimized the list for use of tools:
    - One entry per line reduces the number of merge conflicts
    - One entry per line allows alphabetical sorting e.g. via Vim's sort command
- Sorted all lists alphabetically
2019-10-15 09:55:07 +02:00
cc80961b5f make: allow feature based blacklisting (FEATURES_BLACKLIST) 2019-10-13 21:03:41 +02:00
Frank Hessel
ec869ebef9
Makefile.include: Fix call to sed for FreeBSD 2019-10-13 15:33:53 +02:00
cladmi
a37ce12fa3
Makefile.features: assert CPU is defined by BOARD/Makefile.features
CPU must now be defined by `$(RIOTBOARD)/$(BOARD)/Makefile.features` or
one of its common included Makefile.features file.
The cpu `Makefile.dep` file can now automatically be included when it exists.
2019-10-10 12:54:19 +02:00
Gaëtan Harter
18ae34609c
Makefile.include: put TERMFLASHDEPS in TERMDEPS
This makes it now apply also to `test` automatically.
2019-10-10 11:56:57 +02:00
Gaëtan Harter
4fe875c92f
Makefile.include/term: define 'flash/flash-only' as TERMFLASHDEPS
This puts the handling of `flash/flash-only` in common for both
`term/cleanterm` commands.
2019-10-10 11:55:43 +02:00
Gaëtan Harter
2c3c275694
Makefile.include: also do 'cleanterm' after 'flash-only'
Harmonize with `term`.
2019-10-10 11:52:20 +02:00
Francisco
1c5c027ee7
Merge pull request #12004 from cladmi/pr/make/dependencies/debug_targets
make: add targets to debug dependencies variables
2019-10-08 17:41:34 +02:00
Gaëtan Harter
58cf46c706
make: add targets to debug dependencies variables
Add a 'dependency-debug' and a 'DEPENDENCY_DEBUG=1' option for
'info-boards-supported' to save some variables used when resolving
dependencies.

Print some some 'sorted' variables to simplify comparing the actual value
when the parsing order changed.

This should help tracking changes introduced when refactoring the
dependency parsing.
2019-10-07 14:45:40 +02:00
5b265088fe
Makefile.include: use external setsid with debug target
Only when setsid is not provided by the system which is typically the case on MacOSX
2019-10-03 12:43:49 +02:00
Gaëtan Harter
baad72c44a
Makefile.include: allow sending newline with cleanterm
Disable repeating the command on empty line to allow sending empty
lines.
2019-10-01 14:13:02 +02:00
Gaëtan Harter
d27a43f89a
Makefile.include: add cleanterm target
It is similar to 'term' but with removing possible additional behaviors
from pyterm.

It currently removes the logging prefix.
2019-10-01 14:13:02 +02:00
Gaëtan Harter
3bfe30ae57
Makefile.include: only keep macros in riotbuild.h
Rely on creating an intermediate riotbuild.h.in file that is updated on
CFLAGS changes, but then generate 'riotbuild.h' without the comments.
The updated timestamp will still trigger a rebuild but not cause ccache
miss due to the content of the CFLAGS that contains absolute path.

This removes the caching issue due to the absolute path that was
added to `CFLAGS` and so the comment in that file.
2019-10-01 11:26:02 +02:00
Francisco
c215deb952
Merge pull request #12317 from aabadie/pr/make/iotlab_node_flash
Makefile.include: set default PROGRAMMER value when flashing on IoT-LAB
2019-10-01 09:46:55 +02:00
Gaëtan Harter
fbac80d357
Makefile.include: convert board/cpu macros with utils function
Convert *DEF variables to uppercase using the 'makefiles/utils' functions.
2019-09-30 17:25:24 +02:00
06123ef85b
Makefile.include: set default PROGRAMMER value when flahsing on IoT-LAB
This will avoid to load edbg logic and especially adds it to the list of FLASHDEPS: it won't be unnecessarily built when flashing a samr21-xpro/arduino-zero board on IoT-LAB
2019-09-30 16:16:43 +02:00
fe6d892969
Merge pull request #12302 from fjmolinas/pr_build_files
Makefile.include: add BUILD_FILES variable that holds all files to be built
2019-09-30 14:26:24 +02:00
Francisco Molina
ded2ebc8e7 Makefile.include: add BUILD_FILES
- Add BULD_FILES that holds all files that need to be built
  and linked.
2019-09-30 13:00:25 +02:00
68aae9c848
Merge pull request #12262 from cladmi/pr/cflags/fix_spaces_and_rebuild
makefiles: do not remove defines from CFLAGS
2019-09-28 09:42:56 +02:00
Gaëtan Harter
41d10cf005
makefiles: do not remove defines from CFLAGS
Do not remove the '-D' and '-U' values from CFLAGS.
This prevents issues where a '-D' could contain a space.

Some values way be duplicated from the 'riotbuild.h' header and the
command line but with the same value so without conflict.

To not put too many things in the command line, the -DMODULE_NAME are
only put in CFLAGS_WITH_MACROS.

Also, as now, the deferred value of CFLAGS is used for 'riotbuild.h',
macros set after the inclusion of `Makefile.include` will be taken into
account.
2019-09-27 19:29:06 +02:00
Francisco Molina
ab12e292af Makefile.include: add flash-only as pre-requisite of term 2019-09-26 10:06:28 +02:00
Sebastian Meiling
7bbdb74981
Merge pull request #10554 from jcarrano/make-minimum-version
Makefile.include: require make version 4.
2019-09-23 23:13:50 +02:00
Juan Carrano
9289fee618 Makefile.include: require make version 4.
Old versions of GNU Make (especially on OSX) are a pain to deal
with. This commit introduces a warning when such an old version
is found. The goal is the future the warning will be turned into
an error.

2020.01 is set as the date we remove support.

Complying with version 4.x is easy on OSX by using homebrew, and
on Linux, even Debian stable has the required version.
2019-09-23 18:54:19 +02:00
Gaëtan Harter
a019faaedd
Makefile.include: use an os independant 'relpath'
This should now work on 'osx'.
2019-09-16 15:52:36 +02:00
Juan Carrano
d9132eec90 Makefile.include: add rule to verify thin archives.
This adds a new target "archive-check".

Thin archives should be created with relative paths so that archives created
in a build container are useful in the host. This check ensures there are no
absolute paths inside thin archives.
2019-09-10 11:21:42 +02:00
Gaëtan Harter
765f3e9327
makefiles/utils: functions for lowercase and uppercase
Add make only function to convert strings to lowercase and uppercase.
This can replace the `$(shell echo $(var) | tr 'a-z-' 'A-Z_')` pattern.
Using the 'make' implementation results in being around 100 times faster.
2019-08-29 13:59:31 +02:00
Juan I Carrano
a4a1dc4dfe
Merge pull request #11771 from cladmi/pr/make/remove_riot_version_override
Makefile.include: remove RIOT_VERSION_OVERRIDE
2019-08-20 16:54:24 +02:00
Gaëtan Harter
ce8d10c945
makefiles: end of 'FLASHFILE' transition phase
* Remove the transition documentation.
* assert that FLASHFILE is now defined
2019-08-19 16:30:10 +02:00
Gaëtan Harter
4ebf3dcb7c
makefiles: update FLASHFILE possible values
Update the documentation to say it can also be 'ELFFILE'
The first version was setting it to EFLFILE by default but the default
behavior was removed to prevent hiding errors.

It can also be overwritten for application specific needs, like when
using 'riotboot'.
2019-08-19 16:30:10 +02:00
Gaëtan Harter
a048001e96
makefiles/buildtest: add a buildtest-indocker
Add a 'buildtest-indocker' that forces executing 'buildtest' for loop
completely inside the container.
It prevents starting one container per compilation wich is slower but
it could hide errors where the host toolchain would be used

It is currently equivalent to `buildtest` but will change when the
`buidtest` handling will be move outside of `BUILD_IN_DOCKER`.

Display an error when executed without BUILD_IN_DOCKER=1.
2019-08-14 17:02:35 +02:00
Gaëtan Harter
e04850b27b
Makefile.include: remove RIOT_VERSION_OVERRIDE
RIOT_VERSION is not used for building a specific RIOT version anymore
since #10543. The variable can now be used directly.
Add deprecation warning.
2019-08-12 16:28:19 +02:00
Gaëtan Harter
8859e1e1d9
Makefile.include: Only evaluate RIOT_VERSION when needed
This changes CFLAGS_WITH_MACROS to be:

* a deferred variable
* not exported so only evaluated when actually used

The value is only used by `Makefile.include` and `makefiles/eclipse.inc.mk`
so not required to export it.
2019-07-22 12:03:05 +02:00
Gaëtan Harter
cfd4677315
Makefile.include: use GIT_VERSION for RIOT_VERSION
Use 'GIT_VERSION' for 'RIOT_VERSION'.

This prevents evaluating 'git describe' and 'git rev-parse' when their
value is not used.
2019-07-22 12:01:18 +02:00
Gaëtan Harter
37e72e13ca
Makefile.include: do not build HEXFILE by default anymore
All boards must now use FLASHFILE
2019-07-15 19:15:58 +02:00
Francisco
827d2d9333
Merge pull request #11697 from kaspar030/pr/murdock_allow_multiple_files_for_test_job
murdock: allow multiple files to be sent along with a test job
2019-07-14 14:54:00 +02:00
a214ba493d murdock: allow multiple files to be sent along with a test job
Previously, this was hard-coded to allow one file, hard-coded to be
called "flash file".
This commit allows multiple files to be specified via adding them to the
TEST_EXTRA_FILES variable. All files will be stored in the worker's
application bin directory.

Also, the existence check has been removed, as dwqc bails out on missing
file anyways.
2019-07-13 11:57:53 +02:00
4e051f8592 make: make use CLEAN in Makefile.include 2019-07-12 15:22:48 +02:00
cb8e335c29 make: introduce $(CLEAN)
Currently, some targets are serialized before "clean" by conditionally
adding a dependency.

Make does allow ordering using "|" syntax in prerequisites, but for
"clean" that would always trigger the clean target.
By only conditionally setting $(CLEAN) to clean, that can be
circumvented.

The new CLEAN allows any recipe to be run after "clean" by specifying "|
$(CLEAN)" as prerequisite.
2019-07-12 15:22:48 +02:00
Gaëtan Harter
c9666b5d23
Merge pull request #11762 from kaspar030/add_termdeps_target
make: add termdeps target
2019-07-04 11:57:34 +02:00
6d22f942f7 make: introduce "termdeps" target 2019-07-01 19:58:54 +02:00
Gaëtan Harter
376b09b875
Makefile.features: include CPU/Makefile.features when CPU is defined
Prepare for when boards define `CPU` in `BOARD/Makefile.features`.

Include '$(RIOTCPU)/$(CPU)/Makefile.features' directly when it is
defined. This will allow removing the file inclusion from the
`BOARD/Makefile.features`. The board must then not include it directly.

Transitional change to allow migrating part by parts.

Part of moving CPU/CPU_MODEL definition to Makefile.features to have it
available before Makefile.include.
2019-07-01 17:23:14 +02:00
Juan I Carrano
50ea0d822c
Merge pull request #11664 from cladmi/pr/make/variables_lazy_evaluation
makefiles/utils/variables: add functions to help managing variables
2019-06-28 17:11:29 +02:00
Gaëtan Harter
25a1bc48bb
makefiles/utils: include in Makefile.include
Import utils functions in Makefile.include to allow using them.
2019-06-28 11:34:43 +02:00
Francisco
ff317f2221
Merge pull request #11492 from cladmi/pr/features/declarative
Makefile.features: add declarative FEATURES_ variables definition
2019-06-14 18:03:24 +02:00
Gaëtan Harter
6130918ca8
Makefile.include: use the variables from makefiles/boards.inc.mk
BOARDS is defined, so the `find` line in `makefiles/info-global` is not
needed anymore.
2019-06-07 16:32:04 +02:00
166ed18939
make: add LOG_LEVEL to overridable variables 2019-05-28 22:49:04 +02:00
Gaëtan Harter
6d7a70b16b
Makefile.features: declare FEATURES_CONFLICTING and make use of it
Define a variable for used features that conflict and use it in
`Makefie.include`.

It was not used by `info-global.inc.mk` and is still currently not.
2019-05-28 19:21:53 +02:00
Gaëtan Harter
e1c60ead36
Makefile.features: declare FEATURES_MISSING and make use of it
Put the definition of `FEATURES_MISSING` in common and use the variable
instead of duplicating code.
2019-05-28 19:21:53 +02:00
Gaëtan Harter
700b5fb835
makefiles: Update FEATURES_OPTIONAL meaning
Update the FEATURES_OPTIONAL meaning to be more in line since
FEATURES_USED is defined. Handle FEATURES_OPTIONAL as a configuration from
the BSP/build that should not be changed anymore after.

`FEATURES_OPTIONAL` are by definition optional so are not supposed to
cause a build to fail.
Only the 'REQUIRED' ones that are not 'PROVIDED' are 'MISSING'.

* Do not change FEATURES_OPTIONAL to remove REQUIRED features
  * Prepare for having a different variable for the previous value
* Update dependency resolution/info-build as FEATURES_OPTIONAL cannot be missing
2019-05-28 19:21:53 +02:00
Gaëtan Harter
545a5f74aa
Merge pull request #11433 from cladmi/pr/make/flash_recipe/allow_overriding
Makefile.include: allow overwriting flash-recipe
2019-05-28 14:45:47 +02:00
Gaëtan Harter
13de591a95
Makefile.include: allow overwriting flash-recipe
This allows changing the flashing commands from the outside or in a BSP.
2019-05-13 19:42:07 +02:00
Gaëtan Harter
7d326e663b
Makefile.features: add a common file for the features parsing
This will allow sharing it between Makefile.include and
makefiles/info-global.inc.mk.

Also some common variables definition can also be moved to here.

Part of moving CPU/CPU_MODEL definition to Makefile.features to have it
available before Makefile.include.
2019-05-02 17:45:51 +02:00
Martine Lenders
0eba62e5b0 make: don't execute tilde files on test target
My system (Ubuntu 16.04) creates a backup when opening a file with
`vim`. This backup is called `filename~`. Due to it being a copy of the
file before opening, it also is executable, which is why it is selected
for execution with the `make test` target.

This change makes the `TESTS` macro exclude files ending in `~`. This
way files ending in `~` are not executed with `make test`.

Since e.g. projects like NextCloud are excluding such files also from
their sync [[1]], I think this is fine.

[1]: d7b881feb6/sync-exclude.lst (L3)
2019-04-17 19:48:35 +02:00
6e5c56608f make: add test-input-hash target 2019-04-04 13:37:36 +02:00
Gaëtan Harter
ec4d83727a
Makefile.include: add a 'test/available' target
This allows querying the build system if there are test available.

Before, one should rely on 'info-debug-variable-TESTS' to print the list
of test files. But was not reliable as sometime the build system printed
messages anyway.

    BOARD=esp32-wroom-32 make --silent --no-print-directory \
        -C examples/hello-world/ info-debug-variable-TESTS
    ESP32_SDK_DIR should be defined as /path/to/esp-idf directory
    ESP32_SDK_DIR is set by default to /opt/esp/esp-idf
    # empty line here

Now the return code can be trusted.
2019-03-25 16:17:26 +01:00
Gaëtan Harter
45e1b47b26
Makefile.include: declare 'test' PHONY 2019-03-25 16:16:25 +01:00
MichelRottleuthner
3427dcd168
Merge pull request #10961 from MrKevinWeiss/pr/addshellcommands
sys/app_metadata: Add a shell command to print application metadata
2019-03-06 13:36:14 +01:00
MrKevinWeiss
0738084657 Makefile: add APPLICATION to macro defines
This allows the application code to know what application it is running
2019-03-05 14:00:41 +01:00
Gaëtan Harter
ecfdece104
Makefile.include: include 'riotboot.mk' before using FLASHFILE
Include the 'riotboot.mk' file before using FLASHFILE/ELFFILE/HEXFILE
variables. This will allow setting variables to values from riotboot.mk
like `FLASHFILE = $(RIOTBOOT_COMBINED_BIN)` before it is evaluated in
Makefile.include.

It should be included after defining 'BINFILE' for 'riotboot.bin'
handling.
2019-03-05 11:22:11 +01:00
Gaëtan Harter
1d268c4cdb
Makefile.include: introduce FLASHFILE
Introduce FLASHFILE variable to start migrating boards to use it.

This is the file that will be used for flashing.
Boards do not currently use it but will migrated in upcoming PRs.
2019-02-28 18:11:49 +01:00
Gaëtan Harter
434328debf
Makefile.include: append the values to GLOBAL_GOALS
This allows setting other GLOBAL_GOALS by setting it before.
This could be the case for the application `Makefile` or files parsed
from `RIOT_MAKEFILES_GLOBAL_PRE`.
2019-01-18 16:40:16 +01:00
bb97c05b36
Merge pull request #10543 from jcarrano/no-building-with-different-version
Makefile.include: remove functionality to build with another version.
2019-01-17 15:55:07 +01:00
Gaëtan Harter
61452669b9
Merge pull request #10038 from smlng/pr/make/buildoutdir
make: introduce common BUILD_DIR
2019-01-16 14:18:48 +01:00
5aa3a2b4b7 make: handle disabled default modules before dependencies 2019-01-10 11:59:28 +01:00
smlng
5b3d26453a make: introduce BUILDOUT_DIR
This introduces a new environment variable for a common directory
that holds all output of the build process, such as application or
package binaries. This would also allow to easily redirect output
to any other location, e.g. for out-of-source builds.
2019-01-07 21:16:36 +01:00