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

275 Commits

Author SHA1 Message Date
Gaëtan Harter
2f41244adc
Makefile.include: set APPDEPS as BUILDDEPS
Use BUILDDEPS to define the APPDEPS dependency
2018-07-06 18:56:43 +02:00
Gaëtan Harter
ba83f1c9c6
Makefile.include: set RIOTBUILD_CONFIG_HEADER_C as BUILDDEPS
Use BUILDDEPS to define the RIOTBUILD_CONFIG_HEADER_C dependency
2018-07-06 18:56:39 +02:00
Gaëtan Harter
fb10a181a0
make: Add 'BUILDDEPS' variable
BUILDDEPS are files / make targets that should be build before compiling.
It can include packages source download, generating headers, modules.

It is the equivalent of `APPDEPS` but not limited to the application.
It cannot be done right now with `APPDEPS` as it is used in `BASELIBS` and
fixing it requires changing mips using it for source files.
2018-07-06 18:56:33 +02:00
Gaëtan Harter
534b0da9a5
Merge pull request #9451 from cladmi/pr/make/makefile_include/define_baselibs
Makefile.include: fully define BASELIBS before using its value
2018-07-05 13:37:27 +02:00
Gaëtan Harter
90fdd09176
Makefile.include: detect if BASELIBS changed after its first use 2018-07-04 10:23:05 +02:00
Gaëtan Harter
fb27a801af
Makefile.include: process pkg/*/Makefile.include before using BASELIBS
They can define PSEUDOMODULES which is used to populate BASELIBS.
It means they must be processed before using BASELIBS immediate value.

This moved the processing of all `Makefile.include` before using `BASELIBS`.
It is also moved before setting `BASELIBS` in `modules.inc.mk to keep the
order logical (it would work anyway thanks to deferred variables evaluation).

This fixes the problems for `make -C tests/unittests`
2018-07-04 10:22:57 +02:00
Gaëtan Harter
d8a264312c
Makefile.include: process 'modules.inc.mk' before using BASELIBS
Build targets were using the immediate value of '$(BASELIBS)' before it was
actually set. bindist.inc.mk should also be processed before as it is adding
`BIN_USEMODULE` to `USEMODULE`.

This fixes use before define problems for:

 * `make -C examples/hello-world`
 * `make -C examples/bindist`
2018-07-04 10:20:49 +02:00
Gaëtan Harter
f7f2494426
Makefile.include: fix board/cpu inconsistent include order
Include order for board and cpu was

1. cpu include
2. board include
3. board common includes
4. cpu common includes

Its now changed to:

1. board include
2. board common includes
3. cpu include
4. cpu common includes

Verifications:

There are no common headers names between boards and cpus.
Except native that has a 'periph_conf.h' in cpu instead of being in board.
2018-07-04 09:20:01 +02:00
Joakim Nohlgård
b36afc3964 make: Clean up WERROR handling 2018-06-26 12:50:02 +02:00
Gaëtan Harter
acef97aa15
Merge pull request #9243 from cladmi/pr/warning/missing_include_dirs
makefiles/cflags.inc.mk: add -Wmissing-include-dirs flag
2018-06-18 13:13:54 +02:00
Gaëtan Harter
3bba0c5895
makefile.iotlab.single: add IoT-LAB testbed support for one node
Add support to do flash/reset/term on an IoT-LAB node.
It also allow running test using 'testrunner'.

Configuration variables are:

* `IOTLAB_NODE` which should be set to your node url
  * The full url including site to use from your computer `m3-1.grenoble.iot-lab.info`
  * The short url when used on the IoT-LAB frontend `m3-1`
* `IOTLAB_EXP_ID` for your experiment id for flash and reset.
  By default it tries to use your currently running experiment if you have only one
* `IOTLAB_USER`: is read from `${HOME}/.iotlabrc` as saved by `iotlab-auth`
  * It is expected to have run `iotlab-auth` beforehand.
2018-06-15 15:37:18 +02:00
Gaëtan Harter
d44e4c1f7f
Makefile.include: only use board include directory if it exists
Some boards do not have a boards/BOARD/include directory and rely on a
board/common one.
2018-06-12 14:08:13 +02:00
Gaëtan Harter
98d33a5eca
Makefile.include: use RIOTTOOLS variable 2018-05-09 18:01:44 +02:00
smlng
a83d53f2d9
make: add and export RIOTTOOLS directory
Replacing usage will come in further commits/PRs.
2018-05-03 15:56:00 +02:00
Josarn
1dd7ac0575 Makefile.include: add SIZEFLAGS 2018-04-27 12:23:06 +02:00
Gaëtan Harter
94214cdcae Makefile.include: fix missing target for libraries
Unittests add libraries in 'BASELIBS' which do not have any rules to be built as
they are built by 'application.inc.mk', packages and the DIRS variable.
So make complains about missing target for the unittests archives.

The fix tells these files are generated when building '$(APPLICATION_MODULE).a'.

The bug was introduced by #8844

Fixes #8910
2018-04-16 12:54:41 +02:00
cladmi
45dad9a9d1 Makefile.include: check FEATURES_CONFLICT against FEATURES_USED
The FEATURES_CONFLICT check should be done on used features to also
test for included optional features.
2018-04-11 17:45:41 +02:00
cladmi
ae5e883bca Makefile.include: add targets to get .elf/.bin/.hex 2018-04-09 17:32:46 +02:00
cladmi
70c5079b16 Makefile.include: add %.hex and %.bin rules
Replace HEXFILE rule by a rule for each type.
HACK: Adding '-Oformat' after OFLAGS overwrite the value in flags.
2018-04-09 17:32:46 +02:00
Gaëtan Harter
f64de068b3 Makefile.include: separate link in subtargets
* Add ELFFILE, HEXFILE, print-size targets

$(BINDIR)/$(APPLICATION_MODULE).a target builds libraries in RIOT and in DIRS.

Uses a FORCE phony target dependency to force rebuilding but still let
`make` use the file modification timestamps
2018-04-09 16:50:53 +02:00
Gaëtan Harter
a83c8d220d Makefile.include/OSXNATIVE: refactor into _LINK
Refactor osx-native linker rule into `_LINK` too.
2018-04-09 16:50:52 +02:00
35c73c83d0 make: add test-murdock target 2018-03-28 18:28:42 +02:00
Gaëtan Harter
655186c986 Makefile.include: rm deprecated comment on default goal 2018-03-28 17:32:11 +02:00
Gaëtan Harter
92535234a2 Makefile.include: add an assert that .DEFAULT_GOAL is all 2018-03-28 16:59:00 +02:00
Gaëtan Harter
fff5810191 Makefile.include: FIX .DEFAULT_GOAL not being all
.DEFAULT_GOAL was reset many times which removed 'all' from being the default
goal.
By chance it was then set to `link` so was working by some magic.
2018-03-28 16:59:00 +02:00
Gaëtan Harter
fce7a5409d Makefile.include: refactor command present check
Refactor the code checking if command is present.
Message is taken from the compiler check as it was more precise than the others.
2018-03-27 15:46:48 +02:00
61f1b941ce make: replace curly braces with parenthesis 2018-03-22 20:43:15 +01:00
Francisco Acosta
2e066e8693
Merge pull request #8492 from cladmi/pr/prepend_app_module_by_application
makefiles: Add an APPLICATION_MODULE variable
2018-02-28 12:13:14 +01:00
Jose Alamos
67cbcfb588 make: add flag for no-implicit-fallthrough in CXXFLAGS 2018-02-22 14:28:22 +01:00
Joakim Nohlgård
745f1fc38f
Merge pull request #8365 from beduino-project/fix-clang-5.0-build
makefiles: always link with GCC even if TOOLCHAIN is set to LLVM
2018-02-21 15:13:57 +01:00
Sören Tempel
55b026b349 Makefile.include: Introduce LINKXX variable
This variable can be used to specify the linker which should be used to
link C++ object files. This is needed in order to use g++ for linking
with TOOLCHAIN=llvm.
2018-02-21 12:26:20 +01:00
1c091cc462 make: always set -Wno-implicit-fallthrough 2018-02-20 15:45:18 +01:00
smlng
c4194d4ba9 make: add flash-only target 2018-02-13 17:21:28 +01:00
Gaëtan Harter
d724e71a26 makefiles: Add an APPLICATION_MODULE variable
Set the application module name with APPLICATION_MODULE.
The default module name is "application_$(APPLICATION)".

This should fix name conflicts where an application/test has the same name as
an existing module and so both write to the same archive.
2018-01-30 17:27:03 +01:00
Joakim Nohlgård
33d73d3e5a Makefile.include: Remove --cref from linking flags
Seem to cause internal linker errors and linker segfaults under some
circumstances when using gold as the linker.
2017-12-08 12:02:10 +01:00
smlng
57c5c9b6a6 make: enable Wall and Wextra by default, and optionally Wpedantic 2017-11-28 20:33:39 +01:00
Martine Lenders
16e2829258
Merge pull request #7959 from antmicro/feature/renode-integration
makefiles: tools/renode: add support for Renode
2017-11-24 18:43:31 +01:00
smlng
a7bc9afc4b make: allow for DEVELHELP env variable 2017-11-20 15:56:36 +01:00
Piotr Zierhoffer
b424274a72 makefiles: tools/renode: add support for Renode 2017-11-08 12:43:09 +01:00
268e763d63 make: move mcuboot related stuff to makefiles/mcuboot.mk 2017-11-07 12:28:41 +01:00
8965e9e26c make: make features available to Makefile.include 2017-11-06 12:01:19 +01:00
625d2449d8 make: fix nproc for buildtest 2017-09-20 21:07:11 +02:00
daa277b36e make: refactor info- and buildtest targets 2017-09-14 13:15:53 +02:00
Hauke Petersen
29ee609a2f Merge pull request #7266 from kaspar030/pkg-prepare
make: introduce pkg-prepare target
2017-08-29 17:53:35 +02:00
kYc0o
0dfcc72343 Makefile.include: add multislot makefile 2017-07-06 23:26:56 +02:00
93fb2cee47 make: introduce pkg-prepare target 2017-06-28 14:34:23 +02:00
d69352a237 dist/tools: add dlcache.sh 2017-06-17 17:00:55 +02:00
Hauke Petersen
3098a277ed Makefile.include: add optional TERMDEPS to make term 2017-05-23 14:25:11 +02:00
Hauke Petersen
0d9ba806bc make/tools: added shared script+mk for using BOSSA 2017-05-22 11:42:01 +02:00
Hauke Petersen
fb82e246d9 tools: add means to download and build BOSSA 2017-05-22 11:42:00 +02:00