ia64/xen-unstable

view tools/libxc/Makefile @ 6946:e703abaf6e3d

Add behaviour to the remove methods to remove the transaction's path itself. This allows us to write Remove(path) to remove the specified path rather than having to slice the path ourselves.
author emellor@ewan
date Sun Sep 18 14:42:13 2005 +0100 (2005-09-18)
parents c27431cf81f9
children ec01850d0ee9 872cf6ee0594
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 BUILD_SRCS :=
17 SRCS += xc_bvtsched.c
18 SRCS += xc_core.c
19 SRCS += xc_domain.c
20 SRCS += xc_evtchn.c
21 SRCS += xc_gnttab.c
22 SRCS += xc_misc.c
23 SRCS += xc_physdev.c
24 SRCS += xc_private.c
25 SRCS += xc_sedf.c
26 BUILD_SRCS += xc_linux_build.c
27 BUILD_SRCS += xc_load_bin.c
28 BUILD_SRCS += xc_load_elf.c
30 ifeq ($(XEN_TARGET_ARCH),ia64)
31 BUILD_SRCS += xc_ia64_stubs.c
32 else
33 SRCS += xc_ptrace.c
34 SRCS += xc_ptrace_core.c
35 BUILD_SRCS += xc_load_aout9.c
36 BUILD_SRCS += xc_linux_restore.c
37 BUILD_SRCS += xc_linux_save.c
38 BUILD_SRCS += xc_vmx_build.c
39 endif
41 BUILD_SRCS += xg_private.c
43 CFLAGS += -Wall
44 CFLAGS += -Werror
45 CFLAGS += -O3
46 CFLAGS += -fno-strict-aliasing
47 CFLAGS += $(INCLUDES) -I.
48 # Get gcc to generate the dependencies for us.
49 CFLAGS += -Wp,-MD,.$(@F).d
50 LDFLAGS += -L.
51 DEPS = .*.d
53 LIB_OBJS := $(patsubst %.c,%.o,$(SRCS))
54 PIC_OBJS := $(patsubst %.c,%.opic,$(SRCS))
56 LIB_BUILD_OBJS := $(patsubst %.c,%.o,$(BUILD_SRCS))
57 PIC_BUILD_OBJS := $(patsubst %.c,%.opic,$(BUILD_SRCS))
59 LIB := libxenctrl.a
60 LIB += libxenctrl.so libxenctrl.so.$(MAJOR) libxenctrl.so.$(MAJOR).$(MINOR)
62 LIB += libxenguest.a
63 LIB += libxenguest.so libxenguest.so.$(MAJOR) libxenguest.so.$(MAJOR).$(MINOR)
65 all: build
66 build: check-for-zlib mk-symlinks
67 $(MAKE) $(LIB)
69 check-for-zlib:
70 @if [ ! -e /usr/include/zlib.h ]; then \
71 echo "***********************************************************"; \
72 echo "ERROR: install zlib header files (http://www.gzip.org/zlib)"; \
73 echo "***********************************************************"; \
74 false; \
75 fi
77 LINUX_ROOT := $(XEN_ROOT)/linux-2.6-xen-sparse
78 mk-symlinks:
79 [ -e xen/linux ] || mkdir -p xen/linux
80 [ -e xen/io ] || mkdir -p xen/io
81 ( cd xen >/dev/null ; \
82 ln -sf ../$(XEN_ROOT)/xen/include/public/*.h . )
83 ( cd xen/io >/dev/null ; \
84 ln -sf ../../$(XEN_ROOT)/xen/include/public/io/*.h . )
85 ( cd xen/linux >/dev/null ; \
86 ln -sf ../../$(LINUX_ROOT)/include/asm-xen/linux-public/*.h . )
88 install: build
89 [ -d $(DESTDIR)/usr/$(LIBDIR) ] || $(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)
90 [ -d $(DESTDIR)/usr/include ] || $(INSTALL_DIR) $(DESTDIR)/usr/include
91 $(INSTALL_PROG) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)
92 $(INSTALL_DATA) libxenctrl.a $(DESTDIR)/usr/$(LIBDIR)
93 ln -sf libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxenctrl.so.$(MAJOR)
94 ln -sf libxenctrl.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxenctrl.so
95 $(INSTALL_DATA) xenctrl.h $(DESTDIR)/usr/include
97 $(INSTALL_PROG) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)
98 $(INSTALL_DATA) libxenguest.a $(DESTDIR)/usr/$(LIBDIR)
99 ln -sf libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxenguest.so.$(MAJOR)
100 ln -sf libxenguest.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxenguest.so
102 .PHONY: TAGS clean rpm install all
104 TAGS:
105 etags -t $(SRCS) *.h
107 clean:
108 rm -rf *.a *.so* *.o *.opic *.rpm $(LIB) *~ $(DEPS) xen
110 rpm: build
111 rm -rf staging
112 mkdir staging
113 mkdir staging/i386
114 rpmbuild --define "staging$$PWD/staging" --define '_builddir.' \
115 --define "_rpmdir$$PWD/staging" -bb rpm.spec
116 mv staging/i386/*.rpm .
117 rm -rf staging
119 # libxenctrl
121 libxenctrl.a: $(LIB_OBJS)
122 $(AR) rc $@ $^
124 libxenctrl.so: libxenctrl.so.$(MAJOR)
125 ln -sf $< $@
126 libxenctrl.so.$(MAJOR): libxenctrl.so.$(MAJOR).$(MINOR)
127 ln -sf $< $@
129 libxenctrl.so.$(MAJOR).$(MINOR): $(PIC_OBJS)
130 $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenctrl.so.$(MAJOR) -shared -o $@ $^
132 # libxenguest
134 libxenguest.a: $(LIB_BUILD_OBJS)
135 $(AR) rc $@ $^
137 libxenguest.so: libxenguest.so.$(MAJOR)
138 ln -sf $< $@
139 libxenguest.so.$(MAJOR): libxenguest.so.$(MAJOR).$(MINOR)
140 ln -sf $< $@
142 libxenguest.so.$(MAJOR).$(MINOR): $(PIC_BUILD_OBJS) libxenctrl.so
143 $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenguest.so.$(MAJOR) -shared -o $@ $^ -lz -lxenctrl
145 -include $(DEPS)