Nios® II Software Developer Handbook

ID 683525
Date 8/28/2023
Public
Document Table of Contents

16.1.11. nios2-app-update-makefile

Usage

nios2-app-update-makefile --app-dir <directory> 
 [--add-lib-dir <directory>] [--add-src-dir <directory>] 
 [--add-src-files <filenames>] [--add-src-rdir <directory>] [--debug] 
 [--extended-help] [--force] [--get <name>] [--get-all] 
 [--get-asflags] [--get-bsp-dir] [--get-debug-level] 
 [--get-defined-symbols] [--get-elf-name] [--get-optimization]
 [--get-undefined-symbols] [--get-user-flags] [--get-warnings] 
 [--help] [--list-lib-dir] [--list-src-files] [--lock] 
 [--log <filename>] [--no-src] [--remove-lib-dir <directory>] 
 [--remove-src-dir <directory>] [--remove-src-files <filenames>] 
 [--remove-src-rdir <directory>] [--set <name>] 
 [--set-asflags <value>] [--set-bsp-dir <directory>] 
 [--set-debug-level <value>] [--set-defined-symbols <value>] 
 [--set-elf-name <name>] [--set-optimization <value>] 
 [--set-undefined-symbols <value>] [--set-user-flags <value>] 
 [--set-warnings <value>] [--show-managed-section] [--show-names] 
 [--silent] [--unlock] [--verbose] [--version]

Options

  • --app-dir <directory>: Path to the Application Directory with the generated makefile.
  • --add-lib-dir <directory>: Add a path to dependent user library directory
  • --add-src-dir <directory>: Add source files in <directory>. Use . to look in the current directory. Multiple --add-src-dir options are allowed.
  • --add-src-files <filenames>: A list of space-separated source file names to be added to the makefile. The list of file names is terminated by the next option or the end of the command line. Multiple --src-files options are allowed.
  • --add-src-rdir <directory>: Same as --add-src-dir option but recursively search for source files in or under <directory>. Multiple --add-src-rdir options are allowed and can be freely mixed with --src-dir options.
  • --debug: Output debug, exception traces, verbose, and default information about the command’s operation to stdout.
  • --extended-help: Displays full information about this command and its options.
  • --force: Update the Makefile even if it’s locked
  • --get <name>: Get the values of Makefile variables
  • --get-all: Get all variables in the managed section of the Makefile
  • --get-asflags: Get user assembler flags
  • --get-bsp-dir: Get the BSP generated files directory
  • --get-debug-level: Get debug level flag
  • --get-defined-symbols: Get defined symbols flag
  • --get-elf-name: Get the name of .elf file
  • --get-optimization: Get optimization flag
  • --get-undefined-symbols: Get undefined symbols flag
  • --get-user-flags: Get user flags
  • --get-warnings: Get warnings flag
  • --help: Displays basic information about this command and its options.
  • --list-lib-dir: List all paths to dependent user library directories
  • --list-src-files: List all source files in the makefile.
  • --lock: Lock the Makefile to prevent it from being updated
  • --log <filename>: Create a debug log and write to specified file. Also logs debug information to stdout.
  • --no-src: Remove all source files in the makefile
  • --remove-lib-dir <directory>: Remove a path to dependent user library directory
  • --remove-src-dir <directory>: Remove source files in <directory>. Use . to look in the current directory. Multiple --remove-src-dir options are allowed.
  • --remove-src-files <filenames>: A list of space-separated source file names to be removed from the makefile. The list of file names is terminated by the next option or the end of the command line. Multiple --src-files options are allowed.
  • --remove-src-rdir <directory>: Same as --remove-src-dir option but recursively search for source files in or under <directory>. Multiple --remove-src-rdir options are allowed and can be freely mixed with --src-dir options.
  • --set <name> <value>: Set the value of a Makefile variable called <name>
  • --set-asflags <value>: Set user assembler flags
  • --set-bsp-dir <directory>: Set the BSP generated files directory
  • --set-debug-level <value>: Set debug level flag
  • --set-defined-symbols <value>: Set defined symbols flag
  • --set-elf-name <name>: Set the name of .elf file
  • --set-optimization <value>: Set optimization flag
  • --set-undefined-symbols <value>: Set undefined symbols flag
  • --set-user-flags <value>: Set user flags
  • --set-warnings <value>: Set warnings flag
  • --show-managed-section: Show the managed section in the Makefile
  • --show-names: Show name of the variables
  • --silent: Suppress information about the command's operation normally sent to stdout.
  • --unlock: Unlock the Makefile
  • --verbose: Output verbose, and default information about the command's operation to stdout.
  • --version: Displays the version of this command and exits with a zero exit status.

Description

The nios2-app-update-makefile command updates an application makefile to add or remove source files.

If no command-line arguments are specified, this command returns an exit value of 1 and sends a help message to stderr.

Note: The --add-src-dir, --add-src-rdir, --remove-src-dir, and --remove-src-rdir options add and remove files found in <directory> at the time the command is executed. Files subsequently added to or removed from the directory are not reflected in the makefile.
Note:

For more information about this command, use the --extended-help option to display comprehensive usage information.