1XEN_ROOT = $(CURDIR)/../../..
2BLKTAP_ROOT := ..
3include $(XEN_ROOT)/tools/Rules.mk
4
5ifeq ($(LVM_UTIL_TEST),y)
6TEST              := lvm-util
7endif
8
9CFLAGS            += -Werror
10CFLAGS            += -Wno-unused
11CFLAGS            += -I../include
12CFLAGS            += -D_GNU_SOURCE
13
14ifeq ($(CONFIG_X86_64),y)
15CFLAGS            += -fPIC
16endif
17
18LVM-OBJS          := lvm-util.o
19
20all: build
21
22build: $(TEST) $(LVM-OBJS)
23
24install: all
25
26uninstall:
27
28lvm-util: lvm-util.o
29	$(CC) -DLVM_UTIL $(LDFLAGS) -o lvm-util lvm-util.c
30
31clean:
32	rm -rf *.o *.opic *~ $(DEPS_RM) $(IBIN)
33
34distclean: clean
35
36.PHONY: all build clean distclean install lvm-util uninstall
37
38-include $(DEPS_INCLUDE)
39