]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | # SPDX-License-Identifier: GPL-2.0 |
c6dd897f | 2 | # Makefile for vm tools |
5a439645 | 3 | # |
48c96a36 | 4 | TARGETS=page-types slabinfo page_owner_sort |
5a439645 | 5 | |
553873e1 | 6 | LIB_DIR = ../lib/api |
4933f55f | 7 | LIBS = $(LIB_DIR)/libapi.a |
c6dd897f DY |
8 | |
9 | CC = $(CROSS_COMPILE)gcc | |
5a439645 | 10 | CFLAGS = -Wall -Wextra -I../lib/ |
553873e1 | 11 | LDFLAGS = $(LIBS) |
5a439645 | 12 | |
0937577d DT |
13 | all: $(TARGETS) |
14 | ||
553873e1 | 15 | $(TARGETS): $(LIBS) |
5a439645 | 16 | |
553873e1 BP |
17 | $(LIBS): |
18 | make -C $(LIB_DIR) | |
c6dd897f | 19 | |
c6dd897f | 20 | %: %.c |
5a439645 | 21 | $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) |
c6dd897f DY |
22 | |
23 | clean: | |
48c96a36 | 24 | $(RM) page-types slabinfo page_owner_sort |
553873e1 | 25 | make -C $(LIB_DIR) clean |
0937577d DT |
26 | |
27 | sbindir ?= /usr/sbin | |
28 | ||
29 | install: all | |
30 | install -d $(DESTDIR)$(sbindir) | |
31 | install -m 755 -p $(TARGETS) $(DESTDIR)$(sbindir) |