direct-io.hg

view tools/libxc/Makefile @ 8670:d8232e9f7988

Remove unneeded /proc/xen/grant and its libxc wrapper.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Jan 26 00:17:06 2006 +0100 (2006-01-26)
parents 8d5d4d58407f
children f1b361b05bf3
line source
2 INSTALL = install
3 INSTALL_PROG = $(INSTALL) -m0755
4 INSTALL_DATA = $(INSTALL) -m0644
5 INSTALL_DIR = $(INSTALL) -d -m0755
7 MAJOR = 3.0
8 MINOR = 0
10 CC = gcc
12 XEN_ROOT = ../..
13 include $(XEN_ROOT)/tools/Rules.mk
15 SRCS :=
16 SRCS += xc_bvtsched.c
17 SRCS += xc_core.c
18 SRCS += xc_domain.c
19 SRCS += xc_evtchn.c
20 SRCS += xc_misc.c
21 SRCS += xc_physdev.c
22 SRCS += xc_private.c
23 SRCS += xc_sedf.c
24 SRCS += xc_tbuf.c
26 ifeq ($(XEN_TARGET_ARCH),x86_32)
27 SRCS += xc_ptrace.c
28 SRCS += xc_ptrace_core.c
29 SRCS += xc_pagetab.c
30 endif
32 ifeq ($(XEN_TARGET_ARCH),x86_64)
33 SRCS += xc_pagetab.c
34 endif
36 BUILD_SRCS :=
37 BUILD_SRCS += xc_linux_build.c
38 BUILD_SRCS += xc_load_bin.c
39 BUILD_SRCS += xc_load_elf.c
40 BUILD_SRCS += xg_private.c
42 ifeq ($(XEN_TARGET_ARCH),ia64)
43 BUILD_SRCS += xc_ia64_stubs.c
44 else
45 BUILD_SRCS += xc_load_aout9.c
46 BUILD_SRCS += xc_linux_restore.c
47 BUILD_SRCS += xc_linux_save.c
48 BUILD_SRCS += xc_vmx_build.c
49 endif
51 CFLAGS += -Wall
52 CFLAGS += -Werror
53 CFLAGS += -O3
54 CFLAGS += -fno-strict-aliasing
55 CFLAGS += $(INCLUDES) -I.
57 # Define this to make it possible to run valgrind on code linked with these
58 # libraries.
59 #CFLAGS += -DVALGRIND -O0 -ggdb3
61 # Get gcc to generate the dependencies for us.
62 CFLAGS += -Wp,-MD,.$(@F).d
63 LDFLAGS += -L.
64 DEPS = .*.d
66 LIB_OBJS := $(patsubst %.c,%.o,$(SRCS))
67 PIC_OBJS := $(patsubst %.c,%.opic,$(SRCS))
69 LIB_BUILD_OBJS := $(patsubst %.c,%.o,$(BUILD_SRCS))
70 PIC_BUILD_OBJS := $(patsubst %.c,%.opic,$(BUILD_SRCS))
72 LIB := libxenctrl.a
73 LIB += libxenctrl.so libxenctrl.so.$(MAJOR) libxenctrl.so.$(MAJOR).$(MINOR)
75 LIB += libxenguest.a
76 LIB += libxenguest.so libxenguest.so.$(MAJOR) libxenguest.so.$(MAJOR).$(MINOR)
78 all: build
79 build: check-for-zlib mk-symlinks
80 $(MAKE) $(LIB)
82 check-for-zlib:
83 @if [ ! -e /usr/include/zlib.h ]; then \
84 echo "***********************************************************"; \
85 echo "ERROR: install zlib header files (http://www.gzip.org/zlib)"; \
86 echo "***********************************************************"; \
87 false; \
88 fi
90 install: build
91 [ -d $(DESTDIR)/usr/$(LIBDIR) ] || $(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)
92 [ -d $(DESTDIR)/usr/include ] || $(INSTALL_DIR) $(DESTDIR)/usr/include
93 $(INSTALL_PROG) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)
94 $(INSTALL_DATA) libxenctrl.a $(DESTDIR)/usr/$(LIBDIR)
95 ln -sf libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxenctrl.so.$(MAJOR)
96 ln -sf libxenctrl.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxenctrl.so
97 $(INSTALL_DATA) xenctrl.h $(DESTDIR)/usr/include
99 $(INSTALL_PROG) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)
100 $(INSTALL_DATA) libxenguest.a $(DESTDIR)/usr/$(LIBDIR)
101 ln -sf libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxenguest.so.$(MAJOR)
102 ln -sf libxenguest.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxenguest.so
103 $(INSTALL_DATA) xenguest.h $(DESTDIR)/usr/include
105 .PHONY: TAGS clean rpm install all
107 TAGS:
108 etags -t *.c *.h
110 clean:
111 rm -rf *.a *.so* *.o *.opic *.rpm $(LIB) *~ $(DEPS) xen
113 rpm: build
114 rm -rf staging
115 mkdir staging
116 mkdir staging/i386
117 rpmbuild --define "staging$$PWD/staging" --define '_builddir.' \
118 --define "_rpmdir$$PWD/staging" -bb rpm.spec
119 mv staging/i386/*.rpm .
120 rm -rf staging
122 # libxenctrl
124 libxenctrl.a: $(LIB_OBJS)
125 $(AR) rc $@ $^
127 libxenctrl.so: libxenctrl.so.$(MAJOR)
128 ln -sf $< $@
129 libxenctrl.so.$(MAJOR): libxenctrl.so.$(MAJOR).$(MINOR)
130 ln -sf $< $@
132 libxenctrl.so.$(MAJOR).$(MINOR): $(PIC_OBJS)
133 $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenctrl.so.$(MAJOR) -shared -o $@ $^
135 # libxenguest
137 libxenguest.a: $(LIB_BUILD_OBJS)
138 $(AR) rc $@ $^
140 libxenguest.so: libxenguest.so.$(MAJOR)
141 ln -sf $< $@
142 libxenguest.so.$(MAJOR): libxenguest.so.$(MAJOR).$(MINOR)
143 ln -sf $< $@
145 libxenguest.so.$(MAJOR).$(MINOR): $(PIC_BUILD_OBJS) libxenctrl.so
146 $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenguest.so.$(MAJOR) -shared -o $@ $^ -lz -lxenctrl
148 -include $(DEPS)