Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / tools / mm / Makefile
blobf5725b5c23aa261994b5b42f37c443bee2edebf2
1 # SPDX-License-Identifier: GPL-2.0
2 # Makefile for vm tools
4 include ../scripts/Makefile.include
6 BUILD_TARGETS=page-types slabinfo page_owner_sort thp_swap_allocator_test
7 INSTALL_TARGETS = $(BUILD_TARGETS) thpmaps
9 LIB_DIR = ../lib/api
10 LIBS = $(LIB_DIR)/libapi.a
12 CFLAGS += -Wall -Wextra -I../lib/ -pthread
13 LDFLAGS += $(LIBS) -pthread
15 all: $(BUILD_TARGETS)
17 $(BUILD_TARGETS): $(LIBS)
19 $(LIBS):
20 make -C $(LIB_DIR)
22 %: %.c
23 $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
25 clean:
26 $(RM) page-types slabinfo page_owner_sort thp_swap_allocator_test
27 make -C $(LIB_DIR) clean
29 sbindir ?= /usr/sbin
31 install: all
32 install -d $(DESTDIR)$(sbindir)
33 install -m 755 -p $(INSTALL_TARGETS) $(DESTDIR)$(sbindir)