Skip to content

Commit e6d2c43

Browse files
Herton R. Krzesinskiakpm00
authored andcommitted
tools/mm: allow users to provide additional cflags/ldflags
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]>
1 parent d0634a6 commit e6d2c43

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/mm/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ TARGETS=page-types slabinfo page_owner_sort
88
LIB_DIR = ../lib/api
99
LIBS = $(LIB_DIR)/libapi.a
1010

11-
CFLAGS = -Wall -Wextra -I../lib/
12-
LDFLAGS = $(LIBS)
11+
CFLAGS += -Wall -Wextra -I../lib/
12+
LDFLAGS += $(LIBS)
1313

1414
all: $(TARGETS)
1515

0 commit comments

Comments
 (0)