1 # SPDX-License-Identifier: GPL-2.0 2 # Makefile for vm tools 3 # 4 include ../scripts/Makefile.include 5 6 BUILD_TARGETS=page-types slabinfo page_owner_sort thp_swap_allocator_test 7 INSTALL_TARGETS = $(BUILD_TARGETS) thpmaps 8 9 LIB_DIR = ../lib/api 10 LIBS = $(LIB_DIR)/libapi.a 11 12 CFLAGS += -Wall -Wextra -I../lib/ -pthread 13 LDFLAGS += $(LIBS) -pthread 14 15 all: $(BUILD_TARGETS) 16 17 $(BUILD_TARGETS): $(LIBS) 18 19 $(LIBS): 20 make -C $(LIB_DIR) 21 22 %: %.c 23 $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) 24 25 clean: 26 $(RM) page-types slabinfo page_owner_sort thp_swap_allocator_test 27 make -C $(LIB_DIR) clean 28 29 sbindir ?= /usr/sbin 30 31 install: all 32 install -d $(DESTDIR)$(sbindir) 33 install -m 755 -p $(INSTALL_TARGETS) $(DESTDIR)$(sbindir)
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.