Hi @johnofleek,
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 mkapp
:
Command line parameters
-C, --cflags,
(Multiple, optional) Specify extra flags to be passed to the C compiler.
-L, --ldflags,
(Multiple, optional) Specify extra flags to be passed to the linker when linking executables.
-X, --cxxflags,
(Multiple, optional) Specify extra flags to be passed to the C++ compiler.
-a, --append-to-version,
(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.
-b, --bin-pack
(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.
-c, --component-search,
(Multiple, optional) (DEPRECATED) Add a directory to the source search path (same as -s).
-g, --generate-code
(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.
-i, --interface-search,
(Multiple, optional) Add a directory to the interface search path.
-n, --dont-run-ninja
(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.
-o, --output-dir,
(Optional) Specify the directory into which the final, built application file(ready to be installed on the target) should be put.
-s, --source-search,
(Multiple, optional) Add a directory to the source search path.
-t, --target,
(Optional) Set the compile target (localhost|ar7).
-v, --verbose
(Optional) Set into verbose mode for extra diagnostic information.
-w, --object-dir,
(Optional) Specify the directory into which any intermediate build artifacts (such as .o files and generated source code files) should be put.