direct-io.hg

view tools/libxc/Makefile @ 2821:724449a888fe

bitkeeper revision 1.1159.1.332 (41874e954CLIDA2J3phVFD2RnzVTpA)

Clean up public XenLinux header files. Now accessible from userspace as
#include <xen/linux...>
Got rid of the linux-xen-sparse symlink as it's no longer needed.
author kaf24@freefall.cl.cam.ac.uk
date Tue Nov 02 09:08:37 2004 +0000 (2004-11-02)
parents 5e2a9d23a580
children 4bf285a87365 eb0280fe0abf
line source
2 MAJOR = 1.3
3 MINOR = 0
4 SONAME = libxc.so.$(MAJOR)
6 CC = gcc
8 XEN_ROOT = ../..
9 include $(XEN_ROOT)/tools/Make.defs
11 vpath %c $(XEN_LIBXUTIL)
12 INCLUDES += -I $(XEN_LIBXUTIL)
14 SRCS :=
15 SRCS += xc_atropos.c
16 SRCS += xc_bvtsched.c
17 SRCS += xc_domain.c
18 SRCS += xc_evtchn.c
19 SRCS += xc_io.c
20 SRCS += xc_linux_build.c
21 SRCS += xc_linux_restore.c
22 SRCS += xc_linux_save.c
23 SRCS += xc_misc.c
24 SRCS += xc_physdev.c
25 SRCS += xc_private.c
26 SRCS += xc_rrobin.c
28 CFLAGS += -Wall
29 CFLAGS += -Werror
30 CFLAGS += -O3
31 CFLAGS += -fno-strict-aliasing
32 CFLAGS += $(INCLUDES) -I.
33 # Get gcc to generate the dependencies for us.
34 CFLAGS += -Wp,-MD,.$(@F).d
35 DEPS = .*.d
37 OBJS = $(patsubst %.c,%.o,$(SRCS))
39 LIB = libxc.so libxc.so.$(MAJOR) libxc.so.$(MAJOR).$(MINOR)
41 all: check-for-zlib mk-symlinks $(LIB)
43 check-for-zlib:
44 @if [ ! -e /usr/include/zlib.h ]; then \
45 echo "***********************************************************"; \
46 echo "ERROR: install zlib header files (http://www.gzip.org/zlib)"; \
47 echo "***********************************************************"; \
48 false; \
49 fi
51 LINUX_ROOT := $(wildcard $(XEN_ROOT)/linux-2.6.*-xen-sparse)
52 mk-symlinks:
53 [ -e xen/linux ] || mkdir -p xen/linux
54 lndir -silent ../$(XEN_ROOT)/xen/include/public xen
55 lndir -silent ../../$(LINUX_ROOT)/include/asm-xen/linux-public xen/linux
57 install: all
58 mkdir -p $(prefix)/usr/lib
59 mkdir -p $(prefix)/usr/include
60 install -m0755 $(LIB) $(prefix)/usr/lib
61 ln -sf libxc.so.$(MAJOR).$(MINOR) $(prefix)/usr/lib/libxc.so.$(MAJOR)
62 ln -sf libxc.so.$(MAJOR) $(prefix)/usr/lib/libxc.so
63 install -m0644 xc.h $(prefix)/usr/include
65 clean:
66 rm -rf *.a *.so *.o *.rpm $(LIB) *~ $(DEPS) xen
68 rpm: all
69 rm -rf staging
70 mkdir staging
71 mkdir staging/i386
72 rpmbuild --define "staging$$PWD/staging" --define '_builddir.' \
73 --define "_rpmdir$$PWD/staging" -bb rpm.spec
74 mv staging/i386/*.rpm .
75 rm -rf staging
77 libxc.so:
78 ln -sf libxc.so.$(MAJOR) $@
79 libxc.so.$(MAJOR):
80 ln -sf libxc.so.$(MAJOR).$(MINOR) $@
81 libxc.so.$(MAJOR).$(MINOR): $(OBJS)
82 $(CC) -Wl,-soname -Wl,$(SONAME) -shared -o $@ $^ -L../libxutil -lxutil -lz
84 -include $(DEPS)