blob: 3d907dacf2ac85c4e9d17a5dec1808859c27f5f5 [file] [log] [blame]
Dave Youngc6dd8972012-03-28 14:42:55 -07001# Makefile for vm tools
Borislav Petkov5a439642013-02-20 16:32:33 +01002#
3TARGETS=page-types slabinfo
4
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:
Dave Young63e31552012-03-28 14:42:55 -070021 $(RM) page-types slabinfo
Borislav Petkov553873e2013-12-09 17:14:23 +010022 make -C $(LIB_DIR) clean