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

151 Commits

Author SHA1 Message Date
haukepetersen
56cce19578 make: added APPDIR as environment variable 2015-04-30 15:08:48 +02:00
Joakim Gebart
8db628b17c Makefile.include: Add docker target.
export BUILD_IN_DOCKER=1 to use Docker for building inside a Docker
container.
GDB debug file paths will be wrong after building inside the container,
use the script provided in `dist/gdbinit-docker` to set the correct GDB
substitution paths (copy and paste the contents into your `~/.gdbinit`)

The environment variable DOCKER_FLAGS can be used to pass extra
parameters to the Docker process.
2015-04-24 16:03:52 +02:00
Oleg Hahm
18bf9529f2 make: check for board existence 2015-02-23 09:09:09 +01:00
Oleg Hahm
20067567d1 make: check for existence of tools 2015-02-23 09:09:04 +01:00
Oleg Hahm
984effd5b8 make: added a check for compiler existence 2015-02-23 09:09:04 +01:00
Joakim Gebart
5e2b9f52ba Makefile.include: Refactor ar-wrapper test.
llvm-ar does not understand `-rc`, but works for creating empty
archives when called with `rc` (without the leading dash). BSD `ar`
which ships with OSX, which the test is written for, understands the
argument with or without the leading dash (but does not support creating
empty archives.)
2015-02-08 20:08:14 +01:00
Oleg Hahm
dbca0d0dd4 make: add target to list available targets 2015-01-28 12:42:08 +01:00
Ludwig Ortmann
66a6aae1a8 make: escape unknown version string 2015-01-05 11:33:19 +01:00
Oleg Hahm
aef6256cc5 make: include DEFAULT_MODULES from cpu and boards 2014-12-25 16:32:56 +01:00
Ludwig Ortmann
049a6880c1 make: change escaped quotation marks
The '""' pattern is used so that the variable can be processed as a string
after the preprocessors evaluation. Change to \"\" instead, so that single
quotes can be used externally. The extra quotation marks are unneeded.

Related to #2213
2014-12-20 18:53:51 +01:00
Thomas Eichinger
d7d45482af make: migrate OS variable for COLOR_ECHO too 2014-12-15 16:16:44 +01:00
René Kijewski
0d6bc7eba6 Merge pull request #1913 from Kijewski/issue-1910
make: allow tagged RIOT_VERSION
2014-12-11 17:46:43 +01:00
René Kijewski
19a017cf03 make: term depends on flash
If you provide both `flash` and `term` as Make goals, then `term` needs
to wait for flash.
2014-12-11 14:23:39 +01:00
René Kijewski
bfbb1a353d Merge pull request #1924 from OlegHahm/strip_application_name
make: strip white space from application name
2014-11-23 15:51:42 +01:00
Oleg Hahm
6bdf6a1577 make: strip APPLICATION variable
Trailing white spaces in the application Makefile will cause the build
system to fail otherwise.
2014-11-23 15:46:39 +01:00
René Kijewski
e4ae8eaa6e make: allow tagged RIOT_VERSION 2014-11-21 17:06:46 +01:00
Ludwig Ortmann
6c9907b357 make: reintroduce dependency from flash to all 2014-11-19 15:04:51 +01:00
René Kijewski
3ed9a169b1 make: remove downloader "axel"
Breaks for `make -B`. If the file already exists, then `axel` fails
because it does not find the status file for the download.
2014-11-08 15:27:34 +01:00
Ludwig Ortmann
2c9c8bf2e0 make: remove dependency from flash to all
* print message when no hex file is found instead
* add objcopy for native so that flash can succeed
2014-10-31 10:31:47 +01:00
René Kijewski
765c88d08a make: allow drivers to implement features
This change allows drivers (or any module for that matter) to provide
features. This is e.g. useful if a board does not have a transceiver,
but your application uses `USEMODULE += some_driver`, which implements
the transceiver interface.

The line `FEATURES_PROVIDED += some_feature` should go to the guarded
block in `{sys,drivers}/Makefile.include`.
2014-10-26 23:54:10 +01:00
René Kijewski
162850b332 make: Implement optional features
Fixes #1876

This PR introduces `FEATURES_OPTIONAL` which can be used to tell the
Make system, that the application would like to use some feature, but
the build should proceed even if the selected board cannot provide the
optional feature.

`make buildtest` and `make info-supported-boards` heed this variable
when examining the list of supported boards.

If a word is present in `FEATURES_REQUIRED` and `FEATURES_OPTIONAL`,
then `FEATURES_OPTIONAL` takes precedence.
2014-10-26 23:18:58 +01:00
Ludwig Ortmann
c947dc9858 make: remove $(CLEANFILES), it's superfluous 2014-10-10 15:15:13 +02:00
Ludwig Ortmann
851a02bcb7 make: add clean, distclean for RIOT
distclean
removes all build products, also depends on docclean

clean
removes all build products for the current board

also, silence clean target from Makefile.include and let it ignore errors
2014-10-10 15:14:30 +02:00
René Kijewski
f49bd3e660 make: add Makefile.features telling the BOARDs' features
Please see #1715.
Closes #1715.

This PR implements the new Makefile variables "FEATURES_PROVIDED" and
"FEATURES_REQUIRED". A board *can* have a new file `Makefile.features`
which looks like:

```make
FEATURES_PROVIDED = transceiver
```

An application can have a corresponding line

```make
FEATURES_REQUIRED = transceiver
```

If the selected BOARD does not fulfil the requirements of the
application, then a *warning* is issued at compile time.

This change only includes the feature "transceiver", further features
are expected to be listed in further PRs. The requirement "transceiver"
is automatically added if the application uses the module
"defaulttransceiver".

`make buildtest` understands the new feature listing, so the user won't
need to add boards to `BOARD_BLACKLIST` manually.

Part of the change are the added Make targets
* `info-features-missing`, which prints the required features
  `\setminus` the provided features. The output is empty if there are no
  features missing.
* `info-boards-features-missing`, the same as `info-features-missing`
  but as a table for all boards, but heeded `BOARD_WHITELIST` and
  `BOARD_BLACKLIST`.

Applications don't have to use this new feature. This change does not
break existing Makefile.
2014-10-06 17:42:11 +02:00
Martine Lenders
50a185524f make: Allow for include of modules outside of the RIOTBASE path 2014-10-01 18:19:19 +02:00
Ludwig Ortmann
71b961bef7 make: .PHONY missing targets from Makefile.include 2014-09-27 08:11:44 +02:00
Ludwig Ortmann
9053cfe2de make: add objdump target 2014-09-27 08:11:29 +02:00
Martine Lenders
248a8531a5 make: Fix TERMFLAGS
Sometimes boards/*/Makefile.include (e. g. in case of the msba2) gets included
twice somehow, leading the TERMFLAG to be set twice and faulty. This
fixes that.
2014-08-22 01:09:55 +02:00
René Kijewski
a70ee0f022 make: centralize wget/curl & unzip/7z feature test
With many open PRs that could benefit from loading SDKs when needed,
instead adding vast amounts of code to RIOTs master, this PR provides
the "functions" `$(DOWNLOAD_TO_STDOUT)`, `$(DOWNLOAD_TO_FILE)`, and
`$(UNZIP_HERE)`.

The first "function" takes one argument, the URL from where to download
the content. It is then piped to stdout. To be used e.g. with `tar xz`.

The second "function" taken two arguments, the destination file name,
and the source URL. If the previous invocation was interrupted, then the
download gets continued, if possible.

The last "function" takes one argument, the source ZIP file. The file
gets extracted into the cwd, so best use this "function" with
`cd $(SOME_WHERE) &&`.

The clumsy name `$(UNZIP_HERE)` is taken because the program "unzip"
takes the environment variable `UNZIP` as the source file, even if
another file name was given on the command line. The rationale for that
is that the hackers of "unzip" hate their users. Also they sacrifice
hamsters to Satan.
2014-08-21 19:07:52 +02:00
Martine Lenders
04489be771 [SQUASH ME] make: Move buildtest related PHONY targets to Makefile.buildtests 2014-08-13 21:24:07 +02:00
Martine Lenders
86d8dede48 [SQUASH ME] make: Add info prefix for non-building targets in Makefile.buildtests 2014-08-11 11:33:18 +02:00
Martine Lenders
30fc8671cd [SQUASH ME] make: move info-boards-supported to Makefile.buildtests 2014-08-11 11:28:17 +02:00
Martine Lenders
0c68712fa8 make: Add target to show if boards that are supported by apps 2014-08-09 03:33:45 +02:00
Hauke Petersen
34abdbe5f2 make: added targets 'debug-server' and 'reset'
- added targets to Makefile.include
- added DEBUGSERVER and RESET vars to Makefile.vars
- added output of those to Makefile.buildtests
2014-08-05 22:52:34 +02:00
Oleg Hahm
6340123558 make: introduced TERMFLAGS
Also added the missing -p flag for the new pyterm version where
necessary.
2014-08-01 17:09:45 +02:00
René Kijewski
b7b7fd3bc1 make: provide BOARD, MCU and CPU name as a string
This PR adds the defined `RIOT_BOARD`, `RIOT_CPU` and `RIOT_MCU`.
They each are defined as `BOARD_${BOARD}`, `CPU_${CPU}`, and
`MCU_${CPU}`, resp.

`BOARD_${BOARD}` is defined as the string `"${BOARD}"`, but not in upper
case. Same for the other two.
2014-08-01 02:40:40 +02:00
René Kijewski
f183730917 make: force traversal into PKG's, same as normal modules 2014-07-31 14:22:34 +02:00
Ludwig Ortmann
e677aa4ec0 make: add RIOTBASE to UNKNOWN RIOT_VERSION 2014-07-30 15:50:44 +02:00
Ludwig Ortmann
9d9d2aff93 make: make RIOT_VERSION fail-safe 2014-07-30 15:33:07 +02:00
Ludwig Ortmann
e5613d308a make: allow setting RIOT_VERSION externally
also make the RIOT_VERSION variable available in buildtest
2014-07-29 19:08:41 +02:00
René Kijewski
919cddef19 make: rename VERSION into RIOT_VERSION
Building MSP boards gives an error, because `VERSION` is somewhere
defined in their toolchain as an integer.

This PR renames `VERSION` into `RIOT_VERSION`, because that's what it
is.
2014-07-10 21:48:22 +02:00
René Kijewski
747138cf99 make: move exported make vars to one place 2014-07-10 15:20:37 +02:00
Leon George
215c9aae2b make: allow chosing ld-like over gcc-like options
make automatically adds '-Wl,' to linker-options. Supply `LINKFLAGPREFIX :=` to avoid that.
2014-07-05 01:33:08 +02:00
Pham Huu Dang Nhat
f7398f61ff Changed RIOT/Makefile.include, Makefile.base, Makefile.cflags, and native/Makefile.include to compile C and C++ files. 2014-06-25 22:26:10 +07:00
René Kijewski
2f66319a3a make: OSX: don't fail for empty .a archives
Fixes issue #1333.
2014-06-24 20:29:32 +02:00
René Kijewski
d19fc447ed make: make DIRS usable for applications 2014-06-23 15:50:10 +02:00
René Kijewski
35e74ad725 make: refactor make system (parallelism, deduplication)
Almost everything was build sequentially in RIOT, because we employed
explicit for-loops to build directories (DIRS). This PR makes our make
system use normal dependencies to build directories.

All our compiling rules were duplicated, once for the application, once
for modules. This PR makes the application a normal module, removing
this duplication.
2014-06-23 15:49:55 +02:00
René Kijewski
35d024fff0 Merge pull request #1340 from Kijewski/evaluate-git-sha-once
make: evaluate the Git SHA only once
2014-06-21 19:19:24 +02:00
René Kijewski
1d34522703 make: evaluate the Git SHA only once 2014-06-21 18:29:16 +02:00
Ludwig Ortmann
de4677eb60 make: s/PROJDEPS/APPDEPS/
fixes https://github.com/RIOT-OS/RIOT/issues/1284
2014-06-21 18:28:34 +02:00