1 # SPDX-License-Identifier: GPL-2.0 1 # SPDX-License-Identifier: GPL-2.0 2 # Makefile for vm tools 2 # Makefile for vm tools 3 # 3 # 4 include ../scripts/Makefile.include 4 include ../scripts/Makefile.include 5 5 6 BUILD_TARGETS=page-types slabinfo page_owner_s !! 6 TARGETS=page-types slabinfo page_owner_sort 7 INSTALL_TARGETS = $(BUILD_TARGETS) thpmaps << 8 7 9 LIB_DIR = ../lib/api 8 LIB_DIR = ../lib/api 10 LIBS = $(LIB_DIR)/libapi.a 9 LIBS = $(LIB_DIR)/libapi.a 11 10 12 CFLAGS += -Wall -Wextra -I../lib/ -pthread 11 CFLAGS += -Wall -Wextra -I../lib/ -pthread 13 LDFLAGS += $(LIBS) -pthread 12 LDFLAGS += $(LIBS) -pthread 14 13 15 all: $(BUILD_TARGETS) !! 14 all: $(TARGETS) 16 15 17 $(BUILD_TARGETS): $(LIBS) !! 16 $(TARGETS): $(LIBS) 18 17 19 $(LIBS): 18 $(LIBS): 20 make -C $(LIB_DIR) 19 make -C $(LIB_DIR) 21 20 22 %: %.c 21 %: %.c 23 $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) 22 $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) 24 23 25 clean: 24 clean: 26 $(RM) page-types slabinfo page_owner_s !! 25 $(RM) page-types slabinfo page_owner_sort 27 make -C $(LIB_DIR) clean 26 make -C $(LIB_DIR) clean 28 27 29 sbindir ?= /usr/sbin 28 sbindir ?= /usr/sbin 30 29 31 install: all 30 install: all 32 install -d $(DESTDIR)$(sbindir) 31 install -d $(DESTDIR)$(sbindir) 33 install -m 755 -p $(INSTALL_TARGETS) $ !! 32 install -m 755 -p $(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.