1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/Makefile.vars
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

55 lines
4.5 KiB
Makefile

export AD # Used in front of Makefile lines to suppress the printing of the command if user did not opt-in to see them.
export QUIET # The parameter to use whether to show verbose makefile commands or not.
export APPLICATION # The application, set in the Makefile which is run by the user.
export BOARD # The board to compile the application for.
export CPU # The CPU, set by the board's Makefile.include.
export CPU_MODEL # The specific identifier of the used CPU, used for some CPU implementations to differentiate between different memory layouts
export MCU # The MCU, set by the board's Makefile.include, or defaulted to the same value as CPU.
export INCLUDES # The extra include paths, set by the various Makefile.include files.
export USEMODULE # Sys Module dependencies of the application. Set in the application's Makefile.
export USEPKG # Pkg dependencies (third party modules) of the application. Set in the application's Makefile.
export DISABLE_MODULE # Used in the application's Makefile to suppress DEFAULT_MODULEs.
export APPDEPS # Files / Makefile targets that need to be created before the application can be build. Set in the application's Makefile.
export RIOTBASE # The root folder of RIOT. The folder where this very file lives in.
export RIOTCPU # For third party CPUs this folder is the base of the CPUs.
export RIOTBOARD # For third party BOARDs this folder is the base of the BOARDs.
export BINDIRBASE # This is the folder where the application should be built in. For each BOARD a different subfolder is used.
export BINDIR # This is the folder where the application should be built in.
export PREFIX # The prefix of the toolchain commands, e.g. "arm-non-eabi-" or "msp430-".
export CC # The C compiler to use.
export CXX # The CXX compiler to use.
export CFLAGS # The compiler flags. Must only ever be used with `+=`.
export CXXUWFLAGS # (Patters of) flags in CFLAGS, that should not be passed to CXX.
export CXXEXFLAGS # Additional flags that should be passed to CXX.
export AR # The command to create the object file archives.
export AS # The assembler.
export ASFLAGS # Flags for the assembler.
export LINK # The command used to link the files. Must take the same parameters as GCC, i.e. "ld" won't work.
export LINKFLAGS # Flags to supply in the linking step.
export OBJCOPY # The command used to create the HEXFILE.
export OFLAGS # The parameter for OBJCOPY, e.g. to strip the debug information.
export SIZE # The command to read to size of the ELF sections.
export UNDEF # Set by the BOARD's and CPU's Makefile.include, this contains object files with must not be used in the ELFFILE even if the if no call to the functions.
export FLASHER # The command to call on "make flash".
export FFLAGS # The parameters to supply to FLASHER.
export TERMPROG # The command to call on "make term".
export TERMFLAGS # Additional parameters to supply to TERMPROG.
export PORT # The port to connect the TERMPROG to.
export ELFFILE # The unstripped result of the compilation.
export HEXFILE # The stripped result of the compilation.
export DEBUGGER # The command to call on "make debug", usually a script starting the GDB front-end.
export DEBUGGER_FLAGS # The parameters to supply to DEBUGGER.
export DEBUGSERVER # The command to call on "make debug-server", usually a script starting the GDB server.
export DEBUGSERVER_FLAGS # The parameters to supply to DEBUGSERVER.
export RESET # The command to call on "make reset", this command resets/reboots the target.
export RESET_FLAGS # The parameters to supply to RESET.
export DOWNLOAD_TO_FILE # Use `$(DOWNLOAD_TO_FILE) $(DESTINATION) $(URL)` to download `$(URL)` to `$(DESTINATION)`.
export DOWNLOAD_TO_STDOUT # Use `$(DOWNLOAD_TO_STDOUT) $(URL)` to download `$(URL)` output `$(URL)` to stdout, e.g. to be piped into `tar xz`.
export UNZIP_HERE # Use `cd $(SOME_FOLDER) && $(UNZIP_HERE) $(SOME_FILE)` to extract the contents of the zip file `$(SOME_FILE)` into `$(SOME_FOLDER)`.