Commit 0937577d authored by Daniel Thompson's avatar Daniel Thompson Committed by Linus Torvalds

tools/vm: add missing Makefile rules

Currently the tools/vm Makefile has a rather arbitrary implicit build
rule; page-types is the first value in TARGETS so lets just build that
one!  Additionally there is no install rule and this is needed for make -C
tools vm_install to work properly.

Provide a more sensible implicit build rule and a new install rule.

Note that the variables names used by the install rule (DESTDIR and
sbindir) are copied from prior-art in tools/power/cpupower.

Link: http://lkml.kernel.org/r/20170113165630.27541-1-daniel.thompson@linaro.orgSigned-off-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a5759b2b
...@@ -9,6 +9,8 @@ CC = $(CROSS_COMPILE)gcc ...@@ -9,6 +9,8 @@ CC = $(CROSS_COMPILE)gcc
CFLAGS = -Wall -Wextra -I../lib/ CFLAGS = -Wall -Wextra -I../lib/
LDFLAGS = $(LIBS) LDFLAGS = $(LIBS)
all: $(TARGETS)
$(TARGETS): $(LIBS) $(TARGETS): $(LIBS)
$(LIBS): $(LIBS):
...@@ -20,3 +22,9 @@ $(LIBS): ...@@ -20,3 +22,9 @@ $(LIBS):
clean: clean:
$(RM) page-types slabinfo page_owner_sort $(RM) page-types slabinfo page_owner_sort
make -C $(LIB_DIR) clean make -C $(LIB_DIR) clean
sbindir ?= /usr/sbin
install: all
install -d $(DESTDIR)$(sbindir)
install -m 755 -p $(TARGETS) $(DESTDIR)$(sbindir)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment