blob: ac884b65a0725fc9b4e2ed46a490996524fd96a3 [file] [log] [blame]
Dave Youngc6dd8972012-03-28 14:42:55 -07001# Makefile for vm tools
Borislav Petkov5a439642013-02-20 16:32:33 +01002#
Joonsoo Kim48c96a32014-12-12 16:56:01 -08003TARGETS=page-types slabinfo page_owner_sort
Borislav Petkov5a439642013-02-20 16:32:33 +01004
Borislav Petkov553873e2013-12-09 17:14:23 +01005LIB_DIR = ../lib/api
6LIBS = $(LIB_DIR)/libapikfs.a
Dave Youngc6dd8972012-03-28 14:42:55 -07007
8CC = $(CROSS_COMPILE)gcc
Borislav Petkov5a439642013-02-20 16:32:33 +01009CFLAGS = -Wall -Wextra -I../lib/
Borislav Petkov553873e2013-12-09 17:14:23 +010010LDFLAGS = $(LIBS)
Dave Youngc6dd8972012-03-28 14:42:55 -070011
Borislav Petkov553873e2013-12-09 17:14:23 +010012$(TARGETS): $(LIBS)
Borislav Petkov5a439642013-02-20 16:32:33 +010013
Borislav Petkov553873e2013-12-09 17:14:23 +010014$(LIBS):
15 make -C $(LIB_DIR)
Borislav Petkov5a439642013-02-20 16:32:33 +010016
Dave Youngc6dd8972012-03-28 14:42:55 -070017%: %.c
Borislav Petkov5a439642013-02-20 16:32:33 +010018 $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
Dave Youngc6dd8972012-03-28 14:42:55 -070019
20clean:
Joonsoo Kim48c96a32014-12-12 16:56:01 -080021 $(RM) page-types slabinfo page_owner_sort
Borislav Petkov553873e2013-12-09 17:14:23 +010022 make -C $(LIB_DIR) clean