debuggers.hg

annotate tools/libxc/Makefile @ 3624:c3c66a2762cb

bitkeeper revision 1.1159.212.54 (41fac89fnck8lIgXT0fcIHlQ9aM_7Q)

Merge scramble.cl.cam.ac.uk:/local/scratch/kaf24/xen-2.0-testing.bk
into scramble.cl.cam.ac.uk:/local/scratch/kaf24/xen-unstable.bk
author kaf24@scramble.cl.cam.ac.uk
date Fri Jan 28 23:19:59 2005 +0000 (2005-01-28)
parents 30ee9c427a5b 0c8d62df84ae
children bbe8541361dd 09723a1de726
rev   line source
iap10@3529 1 INSTALL = install
iap10@3529 2 INSTALL_PROG = $(INSTALL) -m0755
iap10@3529 3 INSTALL_DATA = $(INSTALL) -m0644
iap10@3529 4 INSTALL_DIR = $(INSTALL) -d -m0755
mjw@1661 5
kaf24@3577 6 MAJOR = 3.0
kaf24@3574 7 MINOR = 0
kaf24@3574 8 SONAME = libxc.so.$(MAJOR)
mjw@1661 9
mjw@1661 10 CC = gcc
mjw@1661 11
mjw@1661 12 XEN_ROOT = ../..
kaf24@3587 13 include $(XEN_ROOT)/tools/Rules.mk
mjw@1661 14
mjw@1661 15 vpath %c $(XEN_LIBXUTIL)
mjw@1661 16 INCLUDES += -I $(XEN_LIBXUTIL)
mjw@1661 17
mjw@1661 18 SRCS :=
mjw@1661 19 SRCS += xc_atropos.c
mjw@1661 20 SRCS += xc_bvtsched.c
mjw@1661 21 SRCS += xc_domain.c
mjw@1661 22 SRCS += xc_evtchn.c
mjw@1661 23 SRCS += xc_io.c
mjw@1661 24 SRCS += xc_linux_build.c
iap10@3364 25 SRCS += xc_plan9_build.c
mjw@1661 26 SRCS += xc_linux_restore.c
mjw@1661 27 SRCS += xc_linux_save.c
mjw@1661 28 SRCS += xc_misc.c
mjw@1661 29 SRCS += xc_physdev.c
mjw@1661 30 SRCS += xc_private.c
mjw@1661 31 SRCS += xc_rrobin.c
iap10@3430 32 SRCS += xc_vmx_build.c
mjw@1661 33
mjw@1661 34 CFLAGS += -Wall
mjw@1661 35 CFLAGS += -Werror
mjw@1661 36 CFLAGS += -O3
mjw@1661 37 CFLAGS += -fno-strict-aliasing
kaf24@2859 38 CFLAGS += $(INCLUDES) -I.
mjw@1661 39 # Get gcc to generate the dependencies for us.
mjw@1661 40 CFLAGS += -Wp,-MD,.$(@F).d
mjw@1661 41 DEPS = .*.d
mjw@1661 42
kaf24@3574 43 OBJS = $(patsubst %.c,%.o,$(SRCS))
mjw@1661 44
kaf24@3574 45 LIB = libxc.so libxc.so.$(MAJOR) libxc.so.$(MAJOR).$(MINOR)
mjw@1661 46
kaf24@2878 47 all: check-for-zlib mk-symlinks
kaf24@2878 48 $(MAKE) $(LIB)
mjw@1661 49
mjw@1661 50 check-for-zlib:
mjw@1661 51 @if [ ! -e /usr/include/zlib.h ]; then \
mjw@1661 52 echo "***********************************************************"; \
mjw@1661 53 echo "ERROR: install zlib header files (http://www.gzip.org/zlib)"; \
mjw@1661 54 echo "***********************************************************"; \
mjw@1661 55 false; \
mjw@1661 56 fi
mjw@1661 57
kaf24@2859 58 LINUX_ROOT := $(wildcard $(XEN_ROOT)/linux-2.6.*-xen-sparse)
kaf24@2825 59 mk-symlinks:
kaf24@2859 60 [ -e xen/linux ] || mkdir -p xen/linux
kaf24@2864 61 [ -e xen/io ] || mkdir -p xen/io
kaf24@2864 62 ( cd xen >/dev/null ; \
kaf24@2864 63 ln -sf ../$(XEN_ROOT)/xen/include/public/*.h . )
kaf24@2864 64 ( cd xen/io >/dev/null ; \
kaf24@2864 65 ln -sf ../../$(XEN_ROOT)/xen/include/public/io/*.h . )
kaf24@2864 66 ( cd xen/linux >/dev/null ; \
kaf24@2864 67 ln -sf ../../$(LINUX_ROOT)/include/asm-xen/linux-public/*.h . )
kaf24@2825 68
mjw@1661 69 install: all
cl349@3599 70 [ -d $(DESTDIR)/usr/lib ] || $(INSTALL_DIR) $(DESTDIR)/usr/lib
cl349@3599 71 [ -d $(DESTDIR)/usr/include ] || $(INSTALL_DIR) $(DESTDIR)/usr/include
kaf24@3623 72 $(INSTALL_PROG) libxc.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/lib
kaf24@3582 73 ln -sf libxc.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/lib/libxc.so.$(MAJOR)
kaf24@3582 74 ln -sf libxc.so.$(MAJOR) $(DESTDIR)/usr/lib/libxc.so
iap10@3537 75 $(INSTALL_DATA) xc.h $(DESTDIR)/usr/include
mjw@1661 76
mjw@1661 77 clean:
kaf24@3574 78 rm -rf *.a *.so *.o *.rpm $(LIB) *~ $(DEPS) xen
mjw@1661 79
mjw@1661 80 rpm: all
mjw@1661 81 rm -rf staging
mjw@1661 82 mkdir staging
mjw@1661 83 mkdir staging/i386
mjw@1661 84 rpmbuild --define "staging$$PWD/staging" --define '_builddir.' \
mjw@1661 85 --define "_rpmdir$$PWD/staging" -bb rpm.spec
mjw@1661 86 mv staging/i386/*.rpm .
mjw@1661 87 rm -rf staging
mjw@1661 88
kaf24@3574 89 libxc.so:
kaf24@3574 90 ln -sf libxc.so.$(MAJOR) $@
kaf24@3574 91 libxc.so.$(MAJOR):
kaf24@3574 92 ln -sf libxc.so.$(MAJOR).$(MINOR) $@
kaf24@3574 93 libxc.so.$(MAJOR).$(MINOR): $(OBJS)
kaf24@1664 94 $(CC) -Wl,-soname -Wl,$(SONAME) -shared -o $@ $^ -L../libxutil -lxutil -lz
mjw@1661 95
mjw@1661 96 -include $(DEPS)