#! /bin/sh /usr/share/dpatch/dpatch-run ## libs.dpatch by Bastian Blank ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: No description. @DPATCH@ diff -urNad xen-3.0~/tools/libxc/Makefile xen-3.0/tools/libxc/Makefile --- xen-3.0~/tools/libxc/Makefile 2007-01-23 18:26:00.000000000 +0100 +++ xen-3.0/tools/libxc/Makefile 2007-01-23 18:29:25.464054877 +0100 @@ -1,9 +1,6 @@ XEN_ROOT = ../.. include $(XEN_ROOT)/tools/Rules.mk -MAJOR = 3.0 -MINOR = 0 - CTRL_SRCS-y := CTRL_SRCS-y += xc_core.c CTRL_SRCS-y += xc_domain.c @@ -30,7 +30,7 @@ GUEST_SRCS-$(CONFIG_HVM) += xc_hvm_build.c # symlink libelf from xen/common/libelf/ -LIBELF_SRCS := libelf-tools.c libelf-loader.c +LIBELF_SRCS := libelf-private.h libelf-tools.c libelf-loader.c LIBELF_SRCS += libelf-dominfo.c libelf-relocate.c libelf-tools.o: libelf-tools.c libelf-private.h @@ -39,7 +39,7 @@ libelf-relocate.o: libelf-relocate.c libelf-private.h $(LIBELF_SRCS) libelf-private.h: - ln -s ../../xen/common/libelf/$@ $@ + ln -sf ../../xen/common/libelf/$@ $@ # add libelf bits to libxc GUEST_SRCS-y += $(LIBELF_SRCS) @@ -50,11 +47,9 @@ GUEST_LIB_OBJS := $(patsubst %.c,%.o,$(GUEST_SRCS-y)) GUEST_PIC_OBJS := $(patsubst %.c,%.opic,$(GUEST_SRCS-y)) -LIB := libxenctrl.a -LIB += libxenctrl.so libxenctrl.so.$(MAJOR) libxenctrl.so.$(MAJOR).$(MINOR) +LIB += libxenctrl.so -LIB += libxenguest.a -LIB += libxenguest.so libxenguest.so.$(MAJOR) libxenguest.so.$(MAJOR).$(MINOR) +LIB += libxenguest.so .PHONY: all all: build @@ -76,16 +71,10 @@ install: build [ -d $(DESTDIR)/usr/$(LIBDIR) ] || $(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR) [ -d $(DESTDIR)/usr/include ] || $(INSTALL_DIR) $(DESTDIR)/usr/include - $(INSTALL_PROG) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR) - $(INSTALL_DATA) libxenctrl.a $(DESTDIR)/usr/$(LIBDIR) - ln -sf libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxenctrl.so.$(MAJOR) - ln -sf libxenctrl.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxenctrl.so + $(INSTALL_DATA) libxenctrl.so $(DESTDIR)/usr/$(LIBDIR) $(INSTALL_DATA) xenctrl.h $(DESTDIR)/usr/include - $(INSTALL_PROG) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR) - $(INSTALL_DATA) libxenguest.a $(DESTDIR)/usr/$(LIBDIR) - ln -sf libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxenguest.so.$(MAJOR) - ln -sf libxenguest.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxenguest.so + $(INSTALL_DATA) libxenguest.so $(DESTDIR)/usr/$(LIBDIR) $(INSTALL_DATA) xenguest.h $(DESTDIR)/usr/include .PHONY: TAGS @@ -113,26 +102,16 @@ libxenctrl.a: $(CTRL_LIB_OBJS) $(AR) rc $@ $^ -libxenctrl.so: libxenctrl.so.$(MAJOR) - ln -sf $< $@ -libxenctrl.so.$(MAJOR): libxenctrl.so.$(MAJOR).$(MINOR) - ln -sf $< $@ - -libxenctrl.so.$(MAJOR).$(MINOR): $(CTRL_PIC_OBJS) - $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenctrl.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^ -lpthread +libxenctrl.so: $(CTRL_PIC_OBJS) + $(CC) $(CFLAGS) $(LDFLAGS) $(SHLIB_CFLAGS) -o $@ $^ -lpthread # libxenguest libxenguest.a: $(GUEST_LIB_OBJS) $(AR) rc $@ $^ -libxenguest.so: libxenguest.so.$(MAJOR) - ln -sf $< $@ -libxenguest.so.$(MAJOR): libxenguest.so.$(MAJOR).$(MINOR) - ln -sf $< $@ - -libxenguest.so.$(MAJOR).$(MINOR): $(GUEST_PIC_OBJS) libxenctrl.so - $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenguest.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $(GUEST_PIC_OBJS) -lz -lxenctrl -lpthread +libxenguest.so: $(GUEST_PIC_OBJS) libxenctrl.so + $(CC) $(CFLAGS) $(LDFLAGS) $(SHLIB_CFLAGS) -o $@ $(GUEST_PIC_OBJS) -lz -lxenctrl -lpthread -include $(DEPS) diff -urNad xen-3.0~/tools/xenstore/Makefile xen-3.0/tools/xenstore/Makefile --- xen-3.0~/tools/xenstore/Makefile 2007-01-23 18:29:25.200038377 +0100 +++ xen-3.0/tools/xenstore/Makefile 2007-01-23 18:30:04.722508377 +0100 @@ -2,9 +2,6 @@ include $(XEN_ROOT)/tools/Rules.mk XEN_LIBXC = $(XEN_ROOT)/tools/libxc -MAJOR = 3.0 -MINOR = 0 - PROFILE=#-pg BASECFLAGS=-Werror # Make gcc generate dependencies. @@ -85,13 +82,8 @@ talloc_test.o: talloc.c $(COMPILE.c) -o $@ $< -libxenstore.so: libxenstore.so.$(MAJOR) - ln -sf $< $@ -libxenstore.so.$(MAJOR): libxenstore.so.$(MAJOR).$(MINOR) - ln -sf $< $@ - -libxenstore.so.$(MAJOR).$(MINOR): xs.opic xs_lib.opic - $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenstore.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^ $(SOCKET_LIBS) -lpthread +libxenstore.so: xs.opic xs_lib.opic + $(CC) $(CFLAGS) $(LDFLAGS) $(SHLIB_CFLAGS) -o $@ $^ $(SOCKET_LIBS) -lpthread libxenstore.a: xs.o xs_lib.o $(AR) rcs libxenstore.a $^ @@ -177,9 +169,7 @@ $(INSTALL_PROG) xenstore-control $(DESTDIR)/usr/$(BINDIR) $(INSTALL_PROG) xenstore-ls $(DESTDIR)/usr/$(BINDIR) $(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR) - $(INSTALL_PROG) libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR) - ln -sf libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxenstore.so.$(MAJOR) - ln -sf libxenstore.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxenstore.so + $(INSTALL_DATA) libxenstore.so $(DESTDIR)/usr/$(LIBDIR) $(INSTALL_DATA) libxenstore.a $(DESTDIR)/usr/$(LIBDIR) $(INSTALL_DATA) xs.h $(DESTDIR)/usr/include $(INSTALL_DATA) xs_lib.h $(DESTDIR)/usr/include diff -urNad xen-3.0~/tools/xenstore/Makefile.rej xen-3.0/tools/xenstore/Makefile.rej --- xen-3.0~/tools/xenstore/Makefile.rej 1970-01-01 01:00:00.000000000 +0100 +++ xen-3.0/tools/xenstore/Makefile.rej 2007-01-23 18:29:25.464054877 +0100 @@ -0,0 +1,24 @@ +*************** +*** 85,97 **** + talloc_test.o: talloc.c + $(COMPILE.c) -o $@ $< + +- libxenstore.so: libxenstore.so.$(MAJOR) +- ln -sf $< $@ +- libxenstore.so.$(MAJOR): libxenstore.so.$(MAJOR).$(MINOR) +- ln -sf $< $@ +- +- libxenstore.so.$(MAJOR).$(MINOR): xs.opic xs_lib.opic +- $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenstore.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^ -lpthread + + libxenstore.a: xs.o xs_lib.o + $(AR) rcs libxenstore.a $^ +--- 82,89 ---- + talloc_test.o: talloc.c + $(COMPILE.c) -o $@ $< + ++ libxenstore.so: xs.opic xs_lib.opic ++ $(CC) $(CFLAGS) $(LDFLAGS) $(SHLIB_CFLAGS) -o $@ $^ -lpthread + + libxenstore.a: xs.o xs_lib.o + $(AR) rcs libxenstore.a $^