ia64/xen-unstable

view tools/blktap2/vhd/Makefile @ 19741:465950bbdf46

blktap2/vhd, daemon: serialize subdirs-all and subdirs-install

make install in vhd and daemon, subdirs-all and subdirs-install
are invoked parallel causing nasty error.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Keir Fraser <keir.fraser@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Jun 16 10:54:10 2009 +0100 (2009-06-16)
parents 2c1d94eb996f
children b7f73a7f3078
line source
1 XEN_ROOT=../../../
2 BLKTAP_ROOT := ../
3 include $(XEN_ROOT)/tools/Rules.mk
5 SUBDIRS-y :=
6 SUBDIRS-y += lib
8 IBIN = vhd-util vhd-update
9 INST_DIR = $(SBINDIR)
11 CFLAGS += -Werror
12 CFLAGS += -Wno-unused
13 CFLAGS += -I../include
14 CFLAGS += -D_GNU_SOURCE
16 ifeq ($(CONFIG_X86_64),y)
17 CFLAGS += -fPIC
18 endif
20 ifeq ($(VHD_STATIC),y)
21 CFLAGS += -static
22 endif
24 LIBS := -Llib -lvhd
25 LIBS += -luuid
27 # Get gcc to generate the dependencies for us.
28 CFLAGS += -Wp,-MD,.$(@F).d
29 DEPS = .*.d
31 all: subdirs-all build
33 build: $(IBIN)
35 LIBS_DEPENDS := lib/libvhd.so lib/vhd.a
36 $(LIBS_DEPENDS):subdirs-all
38 vhd-util: vhd-util.o $(LIBS_DEPENDS)
39 $(CC) $(CFLAGS) -o vhd-util vhd-util.o $(LDFLAGS) $(LIBS)
41 vhd-update: vhd-update.o $(LIBS_DEPENDS)
42 $(CC) $(CFLAGS) -o vhd-update vhd-update.o $(LDFLAGS) $(LIBS)
44 install: all
45 $(MAKE) subdirs-install
46 $(INSTALL_DIR) -p $(DESTDIR)$(INST_DIR)
47 $(INSTALL_PROG) $(IBIN) $(DESTDIR)$(INST_DIR)
49 clean: subdirs-clean
50 rm -rf *.o *~ $(DEPS) $(IBIN)
52 .PHONY: all build clean install vhd-util vhd-update
54 -include $(DEPS)