direct-io.hg

view tools/libxc/Makefile @ 13525:9f27746eff43

[LIBXC] Refactor xc_domain_resume() into its own source file.

The idea is that this file is where we will have two implementations
of 'suspend cancellation': one which the guest is aware of (and is
faster) and the other which does more work to avoid requiring guest
modifications.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Fri Jan 19 18:32:28 2007 +0000 (2007-01-19)
parents 1e590ddb1277
children a754192ffce6
line source
1 XEN_ROOT = ../..
2 include $(XEN_ROOT)/tools/Rules.mk
4 MAJOR = 3.0
5 MINOR = 0
7 CTRL_SRCS-y :=
8 CTRL_SRCS-y += xc_core.c
9 CTRL_SRCS-y += xc_domain.c
10 CTRL_SRCS-y += xc_evtchn.c
11 CTRL_SRCS-y += xc_misc.c
12 CTRL_SRCS-y += xc_acm.c
13 CTRL_SRCS-y += xc_physdev.c
14 CTRL_SRCS-y += xc_private.c
15 CTRL_SRCS-y += xc_sedf.c
16 CTRL_SRCS-y += xc_csched.c
17 CTRL_SRCS-y += xc_tbuf.c
18 CTRL_SRCS-y += xc_resume.c
19 CTRL_SRCS-$(CONFIG_X86) += xc_pagetab.c
20 CTRL_SRCS-$(CONFIG_Linux) += xc_linux.c
21 CTRL_SRCS-$(CONFIG_SunOS) += xc_solaris.c
22 CTRL_SRCS-$(CONFIG_X86_Linux) += xc_ptrace.c xc_ptrace_core.c
24 GUEST_SRCS-y :=
25 GUEST_SRCS-y += xc_load_bin.c
26 GUEST_SRCS-y += xc_load_elf.c
27 GUEST_SRCS-y += xg_private.c
28 GUEST_SRCS-$(CONFIG_X86) += xc_linux_build.c
29 GUEST_SRCS-$(CONFIG_IA64) += xc_linux_build.c
30 GUEST_SRCS-$(CONFIG_MIGRATE) += xc_linux_restore.c xc_linux_save.c
31 GUEST_SRCS-$(CONFIG_HVM) += xc_hvm_build.c xc_hvm_restore.c xc_hvm_save.c
33 -include $(XEN_TARGET_ARCH)/Makefile
35 CFLAGS += -Werror -Wmissing-prototypes
36 CFLAGS += -fno-strict-aliasing
37 CFLAGS += $(INCLUDES) -I.
39 # Define this to make it possible to run valgrind on code linked with these
40 # libraries.
41 #CFLAGS += -DVALGRIND -O0 -ggdb3
43 # Get gcc to generate the dependencies for us.
44 CFLAGS += -Wp,-MD,.$(@F).d
45 LDFLAGS += -L.
46 DEPS = .*.d
48 CTRL_LIB_OBJS := $(patsubst %.c,%.o,$(CTRL_SRCS-y))
49 CTRL_PIC_OBJS := $(patsubst %.c,%.opic,$(CTRL_SRCS-y))
51 GUEST_LIB_OBJS := $(patsubst %.c,%.o,$(GUEST_SRCS-y))
52 GUEST_PIC_OBJS := $(patsubst %.c,%.opic,$(GUEST_SRCS-y))
54 LIB := libxenctrl.a
55 LIB += libxenctrl.so libxenctrl.so.$(MAJOR) libxenctrl.so.$(MAJOR).$(MINOR)
57 LIB += libxenguest.a
58 LIB += libxenguest.so libxenguest.so.$(MAJOR) libxenguest.so.$(MAJOR).$(MINOR)
60 .PHONY: all
61 all: build
63 .PHONY: build
64 build: check-for-zlib mk-symlinks
65 $(MAKE) $(LIB)
67 .PHONY: check-for-zlib
68 check-for-zlib:
69 @if [ ! -e /usr/include/zlib.h ]; then \
70 echo "***********************************************************"; \
71 echo "ERROR: install zlib header files (http://www.gzip.org/zlib)"; \
72 echo "***********************************************************"; \
73 false; \
74 fi
76 .PHONY: install
77 install: build
78 [ -d $(DESTDIR)/usr/$(LIBDIR) ] || $(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)
79 [ -d $(DESTDIR)/usr/include ] || $(INSTALL_DIR) $(DESTDIR)/usr/include
80 $(INSTALL_PROG) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)
81 $(INSTALL_DATA) libxenctrl.a $(DESTDIR)/usr/$(LIBDIR)
82 ln -sf libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxenctrl.so.$(MAJOR)
83 ln -sf libxenctrl.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxenctrl.so
84 $(INSTALL_DATA) xenctrl.h $(DESTDIR)/usr/include
86 $(INSTALL_PROG) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)
87 $(INSTALL_DATA) libxenguest.a $(DESTDIR)/usr/$(LIBDIR)
88 ln -sf libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxenguest.so.$(MAJOR)
89 ln -sf libxenguest.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxenguest.so
90 $(INSTALL_DATA) xenguest.h $(DESTDIR)/usr/include
92 .PHONY: TAGS
93 TAGS:
94 etags -t *.c *.h
96 .PHONY: clean
97 clean:
98 rm -rf *.rpm $(LIB) *~ $(DEPS) xen \
99 $(CTRL_LIB_OBJS) $(CTRL_PIC_OBJS) \
100 $(GUEST_LIB_OBJS) $(GUEST_PIC_OBJS)
102 .PHONY: rpm
103 rpm: build
104 rm -rf staging
105 mkdir staging
106 mkdir staging/i386
107 rpmbuild --define "staging$$PWD/staging" --define '_builddir.' \
108 --define "_rpmdir$$PWD/staging" -bb rpm.spec
109 mv staging/i386/*.rpm .
110 rm -rf staging
112 # libxenctrl
114 libxenctrl.a: $(CTRL_LIB_OBJS)
115 $(AR) rc $@ $^
117 libxenctrl.so: libxenctrl.so.$(MAJOR)
118 ln -sf $< $@
119 libxenctrl.so.$(MAJOR): libxenctrl.so.$(MAJOR).$(MINOR)
120 ln -sf $< $@
122 libxenctrl.so.$(MAJOR).$(MINOR): $(CTRL_PIC_OBJS)
123 $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenctrl.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^ -lpthread
125 # libxenguest
127 libxenguest.a: $(GUEST_LIB_OBJS)
128 $(AR) rc $@ $^
130 libxenguest.so: libxenguest.so.$(MAJOR)
131 ln -sf $< $@
132 libxenguest.so.$(MAJOR): libxenguest.so.$(MAJOR).$(MINOR)
133 ln -sf $< $@
135 libxenguest.so.$(MAJOR).$(MINOR): $(GUEST_PIC_OBJS) libxenctrl.so
136 $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenguest.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $(GUEST_PIC_OBJS) -lz -lxenctrl -lpthread
138 -include $(DEPS)