Dave Young | c6dd897 | 2012-03-28 14:42:55 -0700 | [diff] [blame] | 1 | # Makefile for vm tools |
Borislav Petkov | 5a43964 | 2013-02-20 16:32:33 +0100 | [diff] [blame] | 2 | # |
3 | TARGETS=page-types slabinfo | ||||
4 | |||||
Borislav Petkov | 553873e | 2013-12-09 17:14:23 +0100 | [diff] [blame] | 5 | LIB_DIR = ../lib/api |
6 | LIBS = $(LIB_DIR)/libapikfs.a | ||||
Dave Young | c6dd897 | 2012-03-28 14:42:55 -0700 | [diff] [blame] | 7 | |
8 | CC = $(CROSS_COMPILE)gcc | ||||
Borislav Petkov | 5a43964 | 2013-02-20 16:32:33 +0100 | [diff] [blame] | 9 | CFLAGS = -Wall -Wextra -I../lib/ |
Borislav Petkov | 553873e | 2013-12-09 17:14:23 +0100 | [diff] [blame] | 10 | LDFLAGS = $(LIBS) |
Dave Young | c6dd897 | 2012-03-28 14:42:55 -0700 | [diff] [blame] | 11 | |
Borislav Petkov | 553873e | 2013-12-09 17:14:23 +0100 | [diff] [blame] | 12 | $(TARGETS): $(LIBS) |
Borislav Petkov | 5a43964 | 2013-02-20 16:32:33 +0100 | [diff] [blame] | 13 | |
Borislav Petkov | 553873e | 2013-12-09 17:14:23 +0100 | [diff] [blame] | 14 | $(LIBS): |
15 | make -C $(LIB_DIR) | ||||
Borislav Petkov | 5a43964 | 2013-02-20 16:32:33 +0100 | [diff] [blame] | 16 | |
Dave Young | c6dd897 | 2012-03-28 14:42:55 -0700 | [diff] [blame] | 17 | %: %.c |
Borislav Petkov | 5a43964 | 2013-02-20 16:32:33 +0100 | [diff] [blame] | 18 | $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) |
Dave Young | c6dd897 | 2012-03-28 14:42:55 -0700 | [diff] [blame] | 19 | |
20 | clean: | ||||
Dave Young | 63e3155 | 2012-03-28 14:42:55 -0700 | [diff] [blame] | 21 | $(RM) page-types slabinfo |
Borislav Petkov | 553873e | 2013-12-09 17:14:23 +0100 | [diff] [blame] | 22 | make -C $(LIB_DIR) clean |