Merge branch 'x86/srbds' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
[platform/kernel/linux-rpi.git] / tools / vm / Makefile
1 # SPDX-License-Identifier: GPL-2.0
2 # Makefile for vm tools
3 #
4 include ../scripts/Makefile.include
5
6 TARGETS=page-types slabinfo page_owner_sort
7
8 LIB_DIR = ../lib/api
9 LIBS = $(LIB_DIR)/libapi.a
10
11 CFLAGS = -Wall -Wextra -I../lib/
12 LDFLAGS = $(LIBS)
13
14 all: $(TARGETS)
15
16 $(TARGETS): $(LIBS)
17
18 $(LIBS):
19         make -C $(LIB_DIR)
20
21 %: %.c
22         $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
23
24 clean:
25         $(RM) page-types slabinfo page_owner_sort
26         make -C $(LIB_DIR) clean
27
28 sbindir ?= /usr/sbin
29
30 install: all
31         install -d $(DESTDIR)$(sbindir)
32         install -m 755 -p $(TARGETS) $(DESTDIR)$(sbindir)