1# SPDX-License-Identifier: Apache-2.0
2if(NOT DEFINED ZEPHYR_BASE)
3  message(FATAL_ERROR "ZEPHYR_BASE not set")
4endif()
5
6get_filename_component(generator ${CMAKE_MAKE_PROGRAM} NAME)
7if(${generator} STREQUAL ninja)
8  set(verbose "-v")
9else()
10  set(verbose "VERBOSE=1")
11endif()
12
13message("Cleaning targets:")
14message("  clean     - Remove most generated files but keep configuration and backup files")
15message("  pristine  - Remove all files in the build directory")
16message("")
17message("Kconfig targets:")
18message("  menuconfig - Update .config using a console-based interface")
19message("  guiconfig  - Update .config using a graphical interface")
20message("")
21message("Other generic targets:")
22message("  all          - Build a zephyr application")
23message("  run          - Build a zephyr application and run it if the board supports emulation")
24message("  flash        - Run \"west flash\"")
25message("  debug        - Run \"west debug\"")
26message("  debugserver  - Run \"west debugserver\" (or start GDB server on port 1234 for QEMU targets)")
27message("  attach       - Run \"west attach\"")
28message("  pahole       - Report struct padding (requires the pahole program)")
29message("  puncover     - Local web server to view RAM, ROM and stack usage (requires puncover pip module)")
30message("  ram_report   - Build and create RAM usage report")
31message("  rom_report   - Build and create ROM usage report")
32message("  footprint    - Create JSON RAM/ROM usage report in the build directory")
33message("  initlevels   - Display the initialization sequence")
34message("  boards       - Display supported boards")
35message("  shields      - Display supported shields")
36message("  usage        - Display this text")
37message("  llext-edk    - Build the Linkable Loadable Extension (LLEXT) Extension Development Kit (EDK)")
38message("  help         - Display all build system targets")
39message("")
40message("Build flags:")
41message("")
42message("  ${generator} ${verbose} [targets] verbose build")
43message("  cmake -DW=n   Enable extra gcc checks, n=1,2,3 where")
44message("   1: warnings which may be relevant and do not occur too often")
45message("   2: warnings which occur quite often but may still be relevant")
46message("   3: more obscure warnings, can most likely be ignored")
47message("   Multiple levels can be combined with W=12 or W=123")
48