WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [patch 2/2] rename libxc Makefile variables

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [patch 2/2] rename libxc Makefile variables
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Tue, 20 Sep 2005 09:49:46 -0500
Delivery-date: Tue, 20 Sep 2005 14:48:54 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <200509200946.07817.hollisb@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: IBM Linux Technology Center
References: <200509200946.07817.hollisb@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.8.2
This illustrates the concept I was talking about earlier, where we can remove 
XEN_TARGET_ARCH tests. This patch includes a slight hack to set the 
appropriate makefile variables, and obviously that should move into a global 
Config.mk as I mentioned earlier.

This will greatly ease trying to insert PowerPC-specific files into the libxc 
build.

Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>

diff -r dfe0a61a0099 -r 02f9fedb6b68 tools/libxc/Makefile
--- a/tools/libxc/Makefile      Mon Sep 19 21:29:57 2005
+++ b/tools/libxc/Makefile      Tue Sep 20 14:43:29 2005
@@ -12,35 +12,35 @@
 XEN_ROOT = ../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-CTRL_SRCS  :=
-GUEST_SRCS :=
-CTRL_SRCS  += xc_bvtsched.c
-CTRL_SRCS  += xc_core.c
-CTRL_SRCS  += xc_domain.c
-CTRL_SRCS  += xc_evtchn.c
-CTRL_SRCS  += xc_gnttab.c
-CTRL_SRCS  += xc_misc.c
-CTRL_SRCS  += xc_physdev.c
-CTRL_SRCS  += xc_private.c
-CTRL_SRCS  += xc_sedf.c
-GUEST_SRCS += xc_linux_build.c
-GUEST_SRCS += xc_load_bin.c
-GUEST_SRCS += xc_load_elf.c
+$(XEN_TARGET_ARCH) = y
+TARGET_ARCH := $(patsubst x86%,x86,$(XEN_TARGET_ARCH))
+$(TARGET_ARCH) = y
 
-ifeq ($(XEN_TARGET_ARCH),ia64)
-GUEST_SRCS += xc_ia64_stubs.c
-else
-ifeq ($(XEN_TARGET_ARCH),x86_32)
-CTRL_SRCS       += xc_ptrace.c
-CTRL_SRCS       += xc_ptrace_core.c
-endif
-GUEST_SRCS += xc_load_aout9.c
-GUEST_SRCS += xc_linux_restore.c
-GUEST_SRCS += xc_linux_save.c
-GUEST_SRCS += xc_vmx_build.c
-endif
+CTRL_SRCS-y  :=
+GUEST_SRCS-y :=
+CTRL_SRCS-y  += xc_bvtsched.c
+CTRL_SRCS-y  += xc_core.c
+CTRL_SRCS-y  += xc_domain.c
+CTRL_SRCS-y  += xc_evtchn.c
+CTRL_SRCS-y  += xc_gnttab.c
+CTRL_SRCS-y  += xc_misc.c
+CTRL_SRCS-y  += xc_physdev.c
+CTRL_SRCS-y  += xc_private.c
+CTRL_SRCS-y  += xc_sedf.c
+GUEST_SRCS-y += xc_linux_build.c
+GUEST_SRCS-y += xc_load_bin.c
+GUEST_SRCS-y += xc_load_elf.c
 
-GUEST_SRCS += xg_private.c
+GUEST_SRCS-$(ia64) += xc_ia64_stubs.c
+
+CTRL_SRCS-$(x86_32) += xc_ptrace.c
+CTRL_SRCS-$(x86_32) += xc_ptrace_core.c
+GUEST_SRCS-$(x86) += xc_load_aout9.c
+GUEST_SRCS-$(x86) += xc_linux_restore.c
+GUEST_SRCS-$(x86) += xc_linux_save.c
+GUEST_SRCS-$(x86) += xc_vmx_build.c
+
+GUEST_SRCS-y += xg_private.c
 
 CFLAGS   += -Wall
 CFLAGS   += -Werror
@@ -52,11 +52,11 @@
 LDFLAGS  += -L.
 DEPS     = .*.d
 
-LIB_CTRL_OBJS := $(patsubst %.c,%.o,$(CTRL_SRCS))
-PIC_CTRL_OBJS := $(patsubst %.c,%.opic,$(CTRL_SRCS))
+LIB_CTRL_OBJS := $(patsubst %.c,%.o,$(CTRL_SRCS-y))
+PIC_CTRL_OBJS := $(patsubst %.c,%.opic,$(CTRL_SRCS-y))
 
-LIB_GUEST_OBJS := $(patsubst %.c,%.o,$(GUEST_SRCS))
-PIC_GUEST_OBJS := $(patsubst %.c,%.opic,$(GUEST_SRCS))
+LIB_GUEST_OBJS := $(patsubst %.c,%.o,$(GUEST_SRCS-y))
+PIC_GUEST_OBJS := $(patsubst %.c,%.opic,$(GUEST_SRCS-y))
 
 LIB := libxenctrl.a
 LIB += libxenctrl.so libxenctrl.so.$(MAJOR) libxenctrl.so.$(MAJOR).$(MINOR)

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>