Makefile: allow overriding CFLAGS on the command line
When a Makefile variable is set on the make command line, all Makefile-internal assignments to that very variable are _ignored_. Since we add quite some essential values to CFLAGS internally, specifying some CFLAGS on the command line will usually break the build (and not fix any include file problems you hoped to overcome with that). Somewhat against intuition GNU make provides the "override" directive to change this behavior; with that assignments in the Makefile get _appended_ to the value given on the command line. [1] Change any internal assignments to use that directive, so that a user can use: $ make CFLAGS=/path/to/my/include/dir to teach kvmtool about non-standard header file locations (helpful for cross-compilation) or to tweak other compiler options. Signed-off-by:Andre Przywara <andre.przywara@arm.com> [1] https://www.gnu.org/software/make/manual/html_node/Override-Directive.html Signed-off-by:
Will Deacon <will.deacon@arm.com>
Loading
Please register or sign in to comment