there is a
--cflags option for mk tools.
I just realized that it’s not in the doc so we will fix that, but here is what the help says for
Command line parameters
(Multiple, optional) Specify extra flags to be passed to the C compiler.
(Multiple, optional) Specify extra flags to be passed to the linker when linking executables.
(Multiple, optional) Specify extra flags to be passed to the C++ compiler.
(Multiple, optional) Specify a suffix to append to the application version specified in the .adef file. Will automatically insert a ‘.’ between the .adef’s version string and any version strings specified on the command-line. Multiple occurences of this argument will be combined into a single string.
(Optional) Generate a binary-app package instead of a .update file. Binary-app packages can be used to distribute an application without its original source code. This binary app package file is intended to be included in a system definition (.sdef) file’s ‘apps:’ section in place of a .adef file.
(Multiple, optional) (DEPRECATED) Add a directory to the source search path (same as -s).
(Optional) Only generate code, but don’t compile, link, or bundle anything. The interface definition (include) files will be generated, along with component and executable main files and configuration files. This is useful for supporting context-sensitive auto-complete and related features in source code editors, for example.
(Multiple, optional) Add a directory to the interface search path.
(Optional) Even if a build.ninja file exists, ignore it, delete the staging area, parse all inputs, and generate all output files, including a new copy of the build.ninja, then exit without running ninja. This is used by the build.ninja to to regenerate itself and any other files that need to be regenerated when the build.ninja finds itself out of date.
(Optional) Specify the directory into which the final, built application file(ready to be installed on the target) should be put.
(Multiple, optional) Add a directory to the source search path.
(Optional) Set the compile target (localhost|ar7).
(Optional) Set into verbose mode for extra diagnostic information.
(Optional) Specify the directory into which any intermediate build artifacts (such as .o files and generated source code files) should be put.