]> Git Repo - linux.git/commitdiff
tools/mm: allow users to provide additional cflags/ldflags
authorHerton R. Krzesinski <[email protected]>
Mon, 16 Jan 2023 22:49:21 +0000 (19:49 -0300)
committerAndrew Morton <[email protected]>
Fri, 3 Feb 2023 06:33:24 +0000 (22:33 -0800)
Right now there is no way to provide additional cflags/ldflags when
building tools/vm binaries.  And using eg.  make CFLAGS=<options> will
override the CFLAGS being set in the Makefile, making the build fail since
it requires the include of the ../lib dir (for libapi).

This change then allows you to specify:
CFLAGS=<options> LDFLAGS=<options> make V=1 -C tools/vm

And the options will be correctly appended as can be seen from the
make output.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Herton R. Krzesinski <[email protected]>
Cc: Don Zickus <[email protected]>
Cc: Justin Forbes <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: Scott Weaver <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
tools/mm/Makefile

index 9860622cbb151126571ef0962cdab5735c59c5dd..6c1da51f4177c42a190ca7d48d85c729d9155ca8 100644 (file)
@@ -8,8 +8,8 @@ TARGETS=page-types slabinfo page_owner_sort
 LIB_DIR = ../lib/api
 LIBS = $(LIB_DIR)/libapi.a
 
-CFLAGS = -Wall -Wextra -I../lib/
-LDFLAGS = $(LIBS)
+CFLAGS += -Wall -Wextra -I../lib/
+LDFLAGS += $(LIBS)
 
 all: $(TARGETS)
 
This page took 0.057832 seconds and 4 git commands to generate.