[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [patch 2/2] rename libxc Makefile variables
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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |