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] Makefile reworking

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Makefile reworking
From: John Levon <levon@xxxxxxxxxxxxxxxxx>
Date: Mon, 7 Nov 2005 14:44:41 +0000
Delivery-date: Mon, 07 Nov 2005 14:45:10 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
# HG changeset patch
# User levon@xxxxxxxxxxxxxxxxx
# Node ID 31053d3bc7d9d81c682bed791b9d099ada7ff313
# Parent  d1b5ad8e8b03b5e79d86d0844b46345a0f931390
Create a configs/ directory for OS-specific makefile settings.
Add an initial Solaris config.
Consolidate definitions of INSTALL and friends.

diff -r d1b5ad8e8b03 -r 31053d3bc7d9 Config.mk
--- a/Config.mk Mon Nov  7 13:04:27 2005 +0100
+++ b/Config.mk Mon Nov  7 14:41:39 2005 +0000
@@ -1,60 +1,6 @@
 # -*- mode: Makefile; -*-
 
-# Currently supported architectures: x86_32, x86_64
-XEN_COMPILE_ARCH    ?= $(shell uname -m | sed -e s/i.86/x86_32/)
-XEN_TARGET_ARCH     ?= $(XEN_COMPILE_ARCH)
-XEN_TARGET_X86_PAE  ?= n
+OS = $(shell uname -s)
 
-# Tools to run on system hosting the build
-HOSTCC     = gcc
-HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
-
-AS         = $(CROSS_COMPILE)as
-LD         = $(CROSS_COMPILE)ld
-CC         = $(CROSS_COMPILE)gcc
-CPP        = $(CROSS_COMPILE)gcc -E
-AR         = $(CROSS_COMPILE)ar
-RANLIB     = $(CROSS_COMPILE)ranlib
-NM         = $(CROSS_COMPILE)nm
-STRIP      = $(CROSS_COMPILE)strip
-OBJCOPY    = $(CROSS_COMPILE)objcopy
-OBJDUMP    = $(CROSS_COMPILE)objdump
-
-DISTDIR     ?= $(XEN_ROOT)/dist
-
-INSTALL      = install
-INSTALL_DIR  = $(INSTALL) -d -m0755
-INSTALL_DATA = $(INSTALL) -m0644
-INSTALL_PROG = $(INSTALL) -m0755
-
-ifeq ($(XEN_TARGET_ARCH),x86_64)
-LIBDIR = lib64
-else
-LIBDIR = lib
-endif
-
-ifneq ($(EXTRA_PREFIX),)
-EXTRA_INCLUDES += $(EXTRA_PREFIX)/include
-EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBDIR)
-endif
-
-LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i)) 
-CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
-
-# Choose the best mirror to download linux kernel
-KERNEL_REPO = http://www.kernel.org
-
-# ACM_USE_SECURITY_POLICY is set to security policy of Xen
-# Supported models are:
-#      ACM_NULL_POLICY (ACM will not be built with this policy)
-#      ACM_CHINESE_WALL_POLICY
-#      ACM_SIMPLE_TYPE_ENFORCEMENT_POLICY
-#      ACM_CHINESE_WALL_AND_SIMPLE_TYPE_ENFORCEMENT_POLICY
-ACM_USE_SECURITY_POLICY ?= ACM_NULL_POLICY
-
-# Optional components
-XENSTAT_XENTOP ?= y
-
-VTPM_TOOLS ?= n
-
--include $(XEN_ROOT)/.config
+include $(XEN_ROOT)/configs/$(OS).mk
+include $(XEN_ROOT)/configs/common.mk
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 Makefile
--- a/Makefile  Mon Nov  7 13:04:27 2005 +0100
+++ b/Makefile  Mon Nov  7 14:41:39 2005 +0000
@@ -2,8 +2,12 @@
 # Grand Unified Makefile for Xen.
 #
 
-KERNELS ?= linux-2.6-xen0 linux-2.6-xenU
-# You may use wildcards in the above e.g. KERNELS=*2.6*
+# Default target must appear before any include lines
+all: dist
+
+XEN_ROOT=$(CURDIR)
+include Config.mk
+include buildconfigs/Rules.mk
 
 XKERNELS := $(foreach kernel, $(KERNELS), $(patsubst 
buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.$(kernel))) )
 
@@ -12,13 +16,6 @@
 SUBARCH := $(subst x86_32,i386,$(XEN_TARGET_ARCH))
 export XEN_TARGET_ARCH SUBARCH
 endif
-
-# Default target must appear before any include lines
-all: dist
-
-XEN_ROOT=$(CURDIR)
-include Config.mk
-include buildconfigs/Rules.mk
 
 ifeq ($(XEN_TARGET_X86_PAE),y)
 export pae=y
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 buildconfigs/Rules.mk
--- a/buildconfigs/Rules.mk     Mon Nov  7 13:04:27 2005 +0100
+++ b/buildconfigs/Rules.mk     Mon Nov  7 14:41:39 2005 +0000
@@ -1,5 +1,5 @@
 
-include Config.mk
+include $(XEN_ROOT)/Config.mk
 
 export DESTDIR
 
@@ -49,7 +49,7 @@
 netbsd-%.tar.bz2: netbsd-%-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2
        ln -fs $< $@
 
-ifeq ($(OS),linux)
+ifeq ($(KERNEL_OS),linux)
 OS_VER = $(LINUX_VER)
 else
 OS_VER = $(NETBSD_VER)
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 buildconfigs/mk.linux-2.6-xen
--- a/buildconfigs/mk.linux-2.6-xen     Mon Nov  7 13:04:27 2005 +0100
+++ b/buildconfigs/mk.linux-2.6-xen     Mon Nov  7 14:41:39 2005 +0000
@@ -1,12 +1,14 @@
 
-OS           = linux
+XEN_ROOT = .
+
+KERNEL_OS    = linux
 
 LINUX_SERIES = 2.6
 LINUX_VER    = 2.6.12
 
 EXTRAVERSION ?= xen
 
-LINUX_DIR    = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
+LINUX_DIR    = $(KERNEL_OS)-$(LINUX_VER)-$(EXTRAVERSION)
 
 include buildconfigs/Rules.mk
 
@@ -20,7 +22,7 @@
        fi
        $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) 
install
 
-$(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
+$(LINUX_DIR)/include/linux/autoconf.h: ref-$(KERNEL_OS)-$(LINUX_VER)/.valid-ref
        rm -rf $(LINUX_DIR)
        cp -al $(<D) $(LINUX_DIR)
        # Apply arch-xen patches
@@ -33,7 +35,7 @@
          || cp 
$(LINUX_DIR)/arch/xen/configs/$(EXTRAVERSION)_defconfig_$(XEN_TARGET_ARCH) \
                $(LINUX_DIR)/.config
        # See if we need to munge config to enable PAE
-       $(MAKE) CONFIG_FILE=$(LINUX_DIR)/.config -f buildconfigs/Rules.mk 
config-update-pae
+       $(MAKE) CONFIG_FILE=$(LINUX_DIR)/.config -f buildconfigs/Rules.mk 
config-update-pae XEN_ROOT=$(XEN_ROOT)
        # Patch kernel Makefile to set EXTRAVERSION
        ( cd $(LINUX_DIR) ; \
          sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = 
-$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
@@ -48,4 +50,4 @@
        $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
 
 delete: 
-       rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR) 
+       rm -rf tmp-$(KERNEL_OS)-$(LINUX_VER) $(LINUX_DIR) 
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 buildconfigs/mk.netbsd-2.0-xenU
--- a/buildconfigs/mk.netbsd-2.0-xenU   Mon Nov  7 13:04:27 2005 +0100
+++ b/buildconfigs/mk.netbsd-2.0-xenU   Mon Nov  7 14:41:39 2005 +0000
@@ -1,3 +1,5 @@
+
+XEN_ROOT = .
 
 OS                = netbsd
 
@@ -8,13 +10,13 @@
 
 FULLVERSION  = $(NETBSD_VER)-$(EXTRAVERSION)
 
-NETBSD_DIR   = $(OS)-$(FULLVERSION)
+NETBSD_DIR   = $(KERNEL_OS)-$(FULLVERSION)
 
 .PHONY: build clean mrproper mkpatch
 
 include buildconfigs/Rules.mk
 
-build: $(OS)-$(EXTRAVERSION)
+build: $(KERNEL_OS)-$(EXTRAVERSION)
 
 netbsd-%-tools.tar.bz2:
        @echo "Cannot find netbsd-$(NETBSD_VER)-tools.tar.gz in path 
$(NETBSD_SRC_PATH)"
@@ -24,7 +26,7 @@
        tar -jxf $<
        touch $@ # update timestamp to avoid rebuild
 
-$(NETBSD_DIR)/.valid: ref-$(OS)-$(NETBSD_VER)/.valid-ref
+$(NETBSD_DIR)/.valid: ref-$(KERNEL_OS)-$(NETBSD_VER)/.valid-ref
        $(RM) -rf $(NETBSD_DIR)
        cp -al $(<D) $(NETBSD_DIR)
        # Apply arch-xen patches
@@ -42,4 +44,4 @@
        $(MAKE) -C netbsd-$(FULLVERSION) clean
 
 delete:
-       rm -rf tmp-$(OS)-$(NETBSD_VER) $(NETBSD_DIR)
+       rm -rf tmp-$(KERNEL_OS)-$(NETBSD_VER) $(NETBSD_DIR)
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 docs/Makefile
--- a/docs/Makefile     Mon Nov  7 13:04:27 2005 +0100
+++ b/docs/Makefile     Mon Nov  7 14:41:39 2005 +0000
@@ -1,8 +1,7 @@
-#!/usr/bin/make -f
+XEN_ROOT = ../
+include $(XEN_ROOT)/Config.mk
 
 VERSION                = xen-unstable
-INSTALL                = install
-INSTALL_DIR    = $(INSTALL) -d -m0755
 
 PS2PDF         := ps2pdf
 DVIPS          := dvips
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 tools/blktap/Makefile
--- a/tools/blktap/Makefile     Mon Nov  7 13:04:27 2005 +0100
+++ b/tools/blktap/Makefile     Mon Nov  7 14:41:39 2005 +0000
@@ -10,10 +10,6 @@
 #SUBDIRS += parallax
 
 BLKTAP_INSTALL_DIR = /usr/sbin
-
-INSTALL            = install
-INSTALL_PROG       = $(INSTALL) -m0755
-INSTALL_DIR        = $(INSTALL) -d -m0755
 
 INCLUDES += -I. -I $(XEN_LIBXC) -I $(XEN_XENSTORE)
 
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 tools/blktap/parallax/Makefile
--- a/tools/blktap/parallax/Makefile    Mon Nov  7 13:04:27 2005 +0100
+++ b/tools/blktap/parallax/Makefile    Mon Nov  7 14:41:39 2005 +0000
@@ -2,10 +2,6 @@
 include $(XEN_ROOT)/tools/Rules.mk
 
 PARALLAX_INSTALL_DIR   = /usr/sbin
-
-INSTALL         = install
-INSTALL_PROG    = $(INSTALL) -m0755
-INSTALL_DIR     = $(INSTALL) -d -m0755
 
 INCLUDES += -I.. -I/usr/include -I $(XEN_LIBXC)
 
@@ -61,4 +57,4 @@
        $(CC) $(CFLAGS) -g3 -o $@ $@.c $(LDFLAGS) $(VDI_SRCS)
 
 .PHONY: TAGS clean install rpm
--include $(DEPS)
\ No newline at end of file
+-include $(DEPS)
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 tools/blktap/ublkback/Makefile
--- a/tools/blktap/ublkback/Makefile    Mon Nov  7 13:04:27 2005 +0100
+++ b/tools/blktap/ublkback/Makefile    Mon Nov  7 14:41:39 2005 +0000
@@ -4,8 +4,6 @@
 
 INCLUDES += -I..
 
-INSTALL            = install
-INSTALL_PROG = $(INSTALL) -m0755
 IBIN         = ublkback
 INSTALL_DIR  = /usr/sbin
 
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 tools/console/Makefile
--- a/tools/console/Makefile    Mon Nov  7 13:04:27 2005 +0100
+++ b/tools/console/Makefile    Mon Nov  7 14:41:39 2005 +0000
@@ -5,10 +5,7 @@
 DAEMON_INSTALL_DIR = /usr/sbin
 CLIENT_INSTALL_DIR = /usr/$(LIBDIR)/xen/bin
 
-INSTALL         = install
-INSTALL_PROG    = $(INSTALL) -m0755
-INSTALL_DIR     = $(INSTALL) -d -m0755
-
+CFLAGS  += $(TOOL_CFLAGS)
 CFLAGS  += -Wall -Werror -g3
 
 CFLAGS  += -I $(XEN_LIBXC)
@@ -24,11 +21,11 @@
 
 xenconsoled: $(patsubst %.c,%.o,$(wildcard daemon/*.c))
        $(CC) $(CFLAGS) $^ -o $@ -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
-              -lxenctrl -lxenstore
+              $(SOCKET_LIBS) -lxenctrl -lxenstore
 
 xenconsole: $(patsubst %.c,%.o,$(wildcard client/*.c))
        $(CC) $(CFLAGS) $^ -o $@ -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
-             -lxenctrl -lxenstore
+             $(SOCKET_LIBS) -lxenctrl -lxenstore
 
 install: $(BIN)
        $(INSTALL_DIR) -p $(DESTDIR)/$(DAEMON_INSTALL_DIR)
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 tools/debugger/libxendebug/Makefile
--- a/tools/debugger/libxendebug/Makefile       Mon Nov  7 13:04:27 2005 +0100
+++ b/tools/debugger/libxendebug/Makefile       Mon Nov  7 14:41:39 2005 +0000
@@ -1,8 +1,3 @@
-
-INSTALL                = install
-INSTALL_PROG   = $(INSTALL) -m0755
-INSTALL_DATA   = $(INSTALL) -m0644
-INSTALL_DIR    = $(INSTALL) -d -m0755
 
 MAJOR    = 3.0
 MINOR    = 0
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 tools/examples/Makefile
--- a/tools/examples/Makefile   Mon Nov  7 13:04:27 2005 +0100
+++ b/tools/examples/Makefile   Mon Nov  7 14:41:39 2005 +0000
@@ -1,10 +1,5 @@
 XEN_ROOT = ../../
 include $(XEN_ROOT)/tools/Rules.mk
-
-INSTALL                = install
-INSTALL_DIR    = $(INSTALL) -d -m0755
-INSTALL_PROG   = $(INSTALL) -m0755
-INSTALL_DATA   = $(INSTALL) -m0644
 
 # Init scripts.
 XEND_INITD = init.d/xend
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 tools/firmware/Makefile
--- a/tools/firmware/Makefile   Mon Nov  7 13:04:27 2005 +0100
+++ b/tools/firmware/Makefile   Mon Nov  7 14:41:39 2005 +0000
@@ -4,7 +4,7 @@
 # vmxloader is a 32-bit protected mode binary.
 # It belongs in /usr/lib, not /usr/lib64.
 TARGET      := vmxassist/vmxloader
-INSTALL_DIR := $(DESTDIR)/usr/lib/xen/boot
+TARGET_DIR := $(DESTDIR)/usr/lib/xen/boot
 
 SUBDIRS :=
 SUBDIRS += rombios
@@ -28,8 +28,8 @@
 
 
 install: all
-       [ -d $(INSTALL_DIR) ] || install -d -m0755 $(INSTALL_DIR)
-       [ ! -e $(TARGET) ] || install -m0644 $(TARGET) $(INSTALL_DIR)
+       [ -d $(TARGET_DIR) ] || $(INSTALL_DIR) $(TARGET_DIR)
+       [ ! -e $(TARGET) ] || $(INSTALL_DATA) $(TARGET) $(TARGET_DIR)
 
 clean: 
        @set -e; for subdir in $(SUBDIRS); do \
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 tools/libxc/Makefile
--- a/tools/libxc/Makefile      Mon Nov  7 13:04:27 2005 +0100
+++ b/tools/libxc/Makefile      Mon Nov  7 14:41:39 2005 +0000
@@ -1,8 +1,3 @@
-
-INSTALL                = install
-INSTALL_PROG   = $(INSTALL) -m0755
-INSTALL_DATA   = $(INSTALL) -m0644
-INSTALL_DIR    = $(INSTALL) -d -m0755
 
 MAJOR    = 3.0
 MINOR    = 0
@@ -43,6 +38,7 @@
 
 BUILD_SRCS += xg_private.c
 
+CFLAGS   += $(TOOL_CFLAGS)
 CFLAGS   += -Wall
 CFLAGS   += -Werror
 CFLAGS   += -O3
@@ -130,7 +126,7 @@
        ln -sf $< $@
 
 libxenctrl.so.$(MAJOR).$(MINOR): $(PIC_OBJS)
-       $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenctrl.so.$(MAJOR) 
-shared -o $@ $^
+       $(CC) $(CFLAGS) $(LDFLAGS) $(SONAME_LDFLAG) -Wl,libxenctrl.so.$(MAJOR) 
-shared -o $@ $^
 
 # libxenguest
 
@@ -143,6 +139,6 @@
        ln -sf $< $@
 
 libxenguest.so.$(MAJOR).$(MINOR): $(PIC_BUILD_OBJS) libxenctrl.so
-       $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenguest.so.$(MAJOR) 
-shared -o $@ $^ -lz -lxenctrl
+       $(CC) $(CFLAGS) $(LDFLAGS) $(SONAME_LDFLAG) -Wl,libxenguest.so.$(MAJOR) 
-shared -o $@ $(PIC_BUILD_OBJS) -lz -lxenctrl
 
 -include $(DEPS)
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 tools/misc/Makefile
--- a/tools/misc/Makefile       Mon Nov  7 13:04:27 2005 +0100
+++ b/tools/misc/Makefile       Mon Nov  7 14:41:39 2005 +0000
@@ -1,11 +1,8 @@
-INSTALL                = install
-INSTALL_PROG   = $(INSTALL) -m0755
-INSTALL_DIR    = $(INSTALL) -d -m0755
-
 XEN_ROOT=../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS   += -Wall -Werror -O3 
+CFLAGS   += $(TOOL_CFLAGS)
 
 INCLUDES += -I $(XEN_XC)
 INCLUDES += -I $(XEN_LIBXC)
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 tools/misc/cpuperf/Makefile
--- a/tools/misc/cpuperf/Makefile       Mon Nov  7 13:04:27 2005 +0100
+++ b/tools/misc/cpuperf/Makefile       Mon Nov  7 14:41:39 2005 +0000
@@ -8,10 +8,6 @@
 # Initial revision
 #
 #
-
-INSTALL                = install
-INSTALL_PROG   = $(INSTALL) -m0755
-INSTALL_DIR    = $(INSTALL) -d -m0755
 
 # these are for Xen
 XEN_ROOT=../../..
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 tools/misc/lomount/Makefile
--- a/tools/misc/lomount/Makefile       Mon Nov  7 13:04:27 2005 +0100
+++ b/tools/misc/lomount/Makefile       Mon Nov  7 14:41:39 2005 +0000
@@ -1,8 +1,3 @@
-INSTALL                = install
-INSTALL_PROG   = $(INSTALL) -m0755
-INSTALL_DIR    = $(INSTALL) -d -m0755
-INSTALL_DATA   = $(INSTALL) -m0644
-
 XEN_ROOT=../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 tools/misc/mbootpack/Makefile
--- a/tools/misc/mbootpack/Makefile     Mon Nov  7 13:04:27 2005 +0100
+++ b/tools/misc/mbootpack/Makefile     Mon Nov  7 14:41:39 2005 +0000
@@ -1,10 +1,6 @@
 #
 #  Makefile for mbootpack
 #
-INSTALL                = install
-INSTALL_PROG   = $(INSTALL) -m0755
-INSTALL_DIR    = $(INSTALL) -d -m0755
-
 XEN_ROOT=../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 tools/misc/miniterm/Makefile
--- a/tools/misc/miniterm/Makefile      Mon Nov  7 13:04:27 2005 +0100
+++ b/tools/misc/miniterm/Makefile      Mon Nov  7 14:41:39 2005 +0000
@@ -1,7 +1,3 @@
-INSTALL                = install
-INSTALL_PROG   = $(INSTALL) -m0755
-INSTALL_DIR    = $(INSTALL) -d -m0755
-
 CC     = gcc
 CFLAGS = -Wall -O3
 TARGET = miniterm
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 tools/python/Makefile
--- a/tools/python/Makefile     Mon Nov  7 13:04:27 2005 +0100
+++ b/tools/python/Makefile     Mon Nov  7 14:41:39 2005 +0000
@@ -2,6 +2,8 @@
 include $(XEN_ROOT)/tools/Rules.mk
 
 .PHONY: all build install clean
+
+CFLAGS += $(TOOL_CFLAGS)
 
 all: build
 build:
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 tools/vnet/libxutil/Makefile
--- a/tools/vnet/libxutil/Makefile      Mon Nov  7 13:04:27 2005 +0100
+++ b/tools/vnet/libxutil/Makefile      Mon Nov  7 14:41:39 2005 +0000
@@ -2,11 +2,6 @@
 export VNET_ROOT = $(shell cd .. && pwd)
 include $(VNET_ROOT)/Make.env
 endif
-
-INSTALL                = install
-INSTALL_DATA   = $(INSTALL) -m0644
-INSTALL_PROG   = $(INSTALL) -m0755
-INSTALL_DIR    = $(INSTALL) -d -m0755
 
 include $(XEN_ROOT)/tools/Rules.mk
 
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 tools/vtpm/Rules.mk
--- a/tools/vtpm/Rules.mk       Mon Nov  7 13:04:27 2005 +0100
+++ b/tools/vtpm/Rules.mk       Mon Nov  7 14:41:39 2005 +0000
@@ -4,11 +4,6 @@
 #
 # Tool definitions
 #
-
-# Installation program and options
-INSTALL         = install
-INSTALL_PROG    = $(INSTALL) -m0755
-INSTALL_DIR     = $(INSTALL) -d -m0755
 
 # Xen tools installation directory
 TOOLS_INSTALL_DIR = $(DESTDIR)/usr/bin
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 tools/vtpm_manager/Rules.mk
--- a/tools/vtpm_manager/Rules.mk       Mon Nov  7 13:04:27 2005 +0100
+++ b/tools/vtpm_manager/Rules.mk       Mon Nov  7 14:41:39 2005 +0000
@@ -4,11 +4,6 @@
 #
 # Tool definitions
 #
-
-# Installation program and options
-INSTALL         = install
-INSTALL_PROG    = $(INSTALL) -m0755
-INSTALL_DIR     = $(INSTALL) -d -m0755
 
 # Xen tools installation directory
 TOOLS_INSTALL_DIR = $(DESTDIR)/usr/bin
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 tools/xcutils/Makefile
--- a/tools/xcutils/Makefile    Mon Nov  7 13:04:27 2005 +0100
+++ b/tools/xcutils/Makefile    Mon Nov  7 14:41:39 2005 +0000
@@ -7,10 +7,6 @@
 #
 # Copyright (C) 2005 by Christian Limpach
 #
-
-INSTALL                = install
-INSTALL_PROG   = $(INSTALL) -m0755
-INSTALL_DIR    = $(INSTALL) -d -m0755
 
 XEN_ROOT       = ../..
 include $(XEN_ROOT)/tools/Rules.mk
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 tools/xenstat/libxenstat/Makefile
--- a/tools/xenstat/libxenstat/Makefile Mon Nov  7 13:04:27 2005 +0100
+++ b/tools/xenstat/libxenstat/Makefile Mon Nov  7 14:41:39 2005 +0000
@@ -14,11 +14,6 @@
 
 XEN_ROOT=../../..
 include $(XEN_ROOT)/tools/Rules.mk
-LINUX_ROOT := $(XEN_ROOT)/linux-2.6-xen-sparse
-
-INSTALL         = install
-INSTALL_PROG    = $(INSTALL) -m0755 -D
-INSTALL_DATA    = $(INSTALL) -m0644 -D
 
 prefix=/usr
 includedir=$(prefix)/include
@@ -38,6 +33,7 @@
 
 WARN_FLAGS=-Wall -Werror
 
+CFLAGS+=$(TOOL_CFLAGS)
 CFLAGS+=-Isrc -I$(XEN_LIBXC) -I$(XEN_XENSTORE)
 LDFLAGS+=-Lsrc
 
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 tools/xenstat/xentop/Makefile
--- a/tools/xenstat/xentop/Makefile     Mon Nov  7 13:04:27 2005 +0100
+++ b/tools/xenstat/xentop/Makefile     Mon Nov  7 14:41:39 2005 +0000
@@ -17,10 +17,6 @@
 all install xentop:
 else
 
-INSTALL         = install
-INSTALL_PROG    = $(INSTALL) -m0755 -D
-INSTALL_DATA    = $(INSTALL) -m0644 -D
-
 prefix=/usr
 mandir=$(prefix)/share/man
 man1dir=$(mandir)/man1
@@ -28,15 +24,15 @@
 
 CFLAGS += -DGCC_PRINTF -Wall -Werror -I$(XEN_LIBXENSTAT)
 LDFLAGS += -L$(XEN_LIBXENSTAT)
-LDLIBS += -lxenstat -lncurses
+LDLIBS += -lxenstat -lncurses $(SOCKET_LIBS)
 
 all: xentop
 
 xentop: xentop.o
 
 install: xentop xentop.1
-       $(INSTALL_PROG) xentop $(DESTDIR)$(sbindir)/xentop
-       $(INSTALL_DATA) xentop.1 $(DESTDIR)$(man1dir)/xentop.1
+       $(INSTALL_PROG) -D xentop $(DESTDIR)$(sbindir)/xentop
+       $(INSTALL_DATA) -D xentop.1 $(DESTDIR)$(man1dir)/xentop.1
 
 endif
 
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 tools/xenstore/Makefile
--- a/tools/xenstore/Makefile   Mon Nov  7 13:04:27 2005 +0100
+++ b/tools/xenstore/Makefile   Mon Nov  7 14:41:39 2005 +0000
@@ -2,13 +2,9 @@
 include $(XEN_ROOT)/tools/Rules.mk
 XEN_LIBXC          = $(XEN_ROOT)/tools/libxc
 
-INSTALL         = install
-INSTALL_DATA   = $(INSTALL) -m0644
-INSTALL_PROG    = $(INSTALL) -m0755
-INSTALL_DIR     = $(INSTALL) -d -m0755
-
 PROFILE=#-pg
 BASECFLAGS=-Wall -g -Werror
+BASECFLAGS += $(TOOL_CFLAGS)
 # Make gcc generate dependencies.
 BASECFLAGS += -Wp,-MD,.$(@F).d
 PROG_DEP = .*.d
@@ -32,16 +28,16 @@
 testcode: xs_test xenstored_test xs_random
 
 xenstored: xenstored_core.o xenstored_watch.o xenstored_domain.o 
xenstored_transaction.o xs_lib.o talloc.o utils.o tdb.o
-       $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -lxenctrl -o $@
+       $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -lxenctrl $(SOCKET_LIBS) -o $@
 
 $(CLIENTS): xenstore-%: xenstore_%.o libxenstore.so
-       $(LINK.o) $< $(LOADLIBES) $(LDLIBS) -lxenctrl -L. -lxenstore -o $@
+       $(LINK.o) $< $(LOADLIBES) $(LDLIBS) -lxenctrl $(SOCKET_LIBS) -L. 
-lxenstore -o $@
 
 $(CLIENTS_OBJS): xenstore_%.o: xenstore_client.c
        $(COMPILE.c) -DCLIENT_$(*F) -o $@ $<
 
 xsls: xsls.o libxenstore.so
-       $(LINK.o) $< $(LOADLIBES) $(LDLIBS) -lxenctrl -L. -lxenstore -o $@
+       $(LINK.o) $< $(LOADLIBES) $(LDLIBS) -lxenctrl $(SOCKET_LIBS) -L. 
-lxenstore -o $@
 
 xenstored_test: xenstored_core_test.o xenstored_watch_test.o 
xenstored_domain_test.o xenstored_transaction_test.o xs_lib.o talloc_test.o 
fake_libxc.o utils.o tdb.o
        $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
@@ -72,7 +68,7 @@
        $(COMPILE.c) -o $@ $<
 
 libxenstore.so: xs.opic xs_lib.opic
-       $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenstore.so -shared -o $@ 
$^ -lpthread
+       $(CC) $(CFLAGS) $(LDFLAGS) $(SONAME_LDFLAG) -Wl,libxenstore.so -shared 
-o $@ $^ -lpthread
 
 clean: testsuite-clean
        rm -f *.o *.opic *.so
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 tools/xentrace/Makefile
--- a/tools/xentrace/Makefile   Mon Nov  7 13:04:27 2005 +0100
+++ b/tools/xentrace/Makefile   Mon Nov  7 14:41:39 2005 +0000
@@ -1,8 +1,3 @@
-INSTALL                = install
-INSTALL_PROG   = $(INSTALL) -m0755
-INSTALL_DIR    = $(INSTALL) -d -m0755
-INSTALL_DATA   = $(INSTALL) -m0644
-
 XEN_ROOT=../..
 include $(XEN_ROOT)/tools/Rules.mk
 
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 xen/Makefile
--- a/xen/Makefile      Mon Nov  7 13:04:27 2005 +0100
+++ b/xen/Makefile      Mon Nov  7 14:41:39 2005 +0000
@@ -1,7 +1,3 @@
-INSTALL                        = install
-INSTALL_DATA           = $(INSTALL) -m0644
-INSTALL_DIR            = $(INSTALL) -d -m0755
-
 # This is the correct place to edit the build version.
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 3
@@ -10,6 +6,8 @@
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 
 export BASEDIR          := $(CURDIR)
+
+export XEN_ROOT                := $(CURDIR)/../
 
 include Rules.mk
 
@@ -137,4 +135,4 @@
        $(all_sources) > cscope.files
        cscope -k -b -q
 MAP:
-       $(NM) $(TARGET) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] 
\)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
+       $(NM) $(TARGET) | $(GREP) -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] 
\)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 xen/Rules.mk
--- a/xen/Rules.mk      Mon Nov  7 13:04:27 2005 +0100
+++ b/xen/Rules.mk      Mon Nov  7 14:41:39 2005 +0000
@@ -42,7 +42,7 @@
 endif
 ALL_OBJS += $(BASEDIR)/arch/$(TARGET_ARCH)/arch.o
 
-test-gcc-flag = $(shell $(CC) -v --help 2>&1 | grep -q " $(1) " && echo $(1))
+test-gcc-flag = $(shell $(CC) -v --help 2>&1 | $(GREP) -q " $(1) " && echo 
$(1))
 
 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
 
@@ -73,7 +73,7 @@
 CFLAGS := $(strip $(CFLAGS))
 
 %.o: %.c $(HDRS) Makefile
-       $(CC) $(CFLAGS) -c $< -o $@
+       $(CC) $(CFLAGS) $(GCC_ASFLAGS) -c $< -o $@
 
 %.o: %.S $(HDRS) Makefile
-       $(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $@
+       $(CC) $(CFLAGS) $(GCC_ASFLAGS) -D__ASSEMBLY__ -c $< -o $@
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 configs/Linux.mk
--- /dev/null   Thu Jan  1 00:00:00 1970 +0000
+++ b/configs/Linux.mk  Mon Nov  7 14:41:39 2005 +0000
@@ -0,0 +1,34 @@
+# -*- mode: Makefile; -*-
+
+GREP = grep
+INSTALL = install
+
+AS         = $(CROSS_COMPILE)gas
+LD         = $(CROSS_COMPILE)ld
+CC         = $(CROSS_COMPILE)gcc
+CPP        = $(CROSS_COMPILE)gcc -E
+AR         = $(CROSS_COMPILE)ar
+RANLIB     = $(CROSS_COMPILE)ranlib
+NM         = $(CROSS_COMPILE)nm
+STRIP      = $(CROSS_COMPILE)strip
+OBJCOPY    = $(CROSS_COMPILE)objcopy
+OBJDUMP    = $(CROSS_COMPILE)objdump
+
+XEN_COMPILE_ARCH ?= $(shell uname -m | sed -e s/i.86/x86_32/)
+
+ifeq ($(XEN_TARGET_ARCH),x86_64)
+LIBDIR = lib64
+else
+LIBDIR = lib
+endif
+SONAME_LDFLAG = -Wl,-soname
+SOCKET_LIBS =
+
+GCC_ASFLAGS =
+TOOL_CFLAGS =
+
+KERNELS ?= linux-2.6-xen0 linux-2.6-xenU
+# You may use wildcards in the above e.g. KERNELS=*2.6*
+
+# Choose the best mirror to download linux kernel
+KERNEL_REPO = http://www.kernel.org
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 configs/SunOS.mk
--- /dev/null   Thu Jan  1 00:00:00 1970 +0000
+++ b/configs/SunOS.mk  Mon Nov  7 14:41:39 2005 +0000
@@ -0,0 +1,27 @@
+# -*- mode: Makefile; -*-
+
+GREP = ggrep
+INSTALL = ginstall
+
+AS         = $(CROSS_COMPILE)gas
+LD         = $(CROSS_COMPILE)gld
+CC         = $(CROSS_COMPILE)gcc
+CPP        = $(CROSS_COMPILE)gcc -E
+AR         = $(CROSS_COMPILE)gar
+RANLIB     = $(CROSS_COMPILE)granlib
+NM         = $(CROSS_COMPILE)gnm
+STRIP      = $(CROSS_COMPILE)gstrip
+OBJCOPY    = $(CROSS_COMPILE)gobjcopy
+OBJDUMP    = $(CROSS_COMPILE)gobjdump
+
+XEN_COMPILE_ARCH ?= x86_32
+
+LIBDIR = lib
+SOCKET_LIBS = -lsocket
+SONAME_LDFLAG = -Wl,-h 
+
+GCC_ASFLAGS = -Wa,--divide
+TOOL_CFLAGS = -std=gnu99
+
+KERNELS =
+XEN_NO_IOEMU = 1
diff -r d1b5ad8e8b03 -r 31053d3bc7d9 configs/common.mk
--- /dev/null   Thu Jan  1 00:00:00 1970 +0000
+++ b/configs/common.mk Mon Nov  7 14:41:39 2005 +0000
@@ -0,0 +1,38 @@
+# -*- mode: Makefile; -*-
+
+XEN_TARGET_ARCH     ?= $(XEN_COMPILE_ARCH)
+XEN_TARGET_X86_PAE  ?= n
+
+SHELL = /bin/bash
+INSTALL_DIR  = $(INSTALL) -d -m0755
+INSTALL_DATA = $(INSTALL) -m0644
+INSTALL_PROG = $(INSTALL) -m0755
+
+# Tools to run on system hosting the build
+HOSTCC     = gcc
+HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
+
+DISTDIR     ?= $(XEN_ROOT)/dist
+
+ifneq ($(EXTRA_PREFIX),)
+EXTRA_INCLUDES += $(EXTRA_PREFIX)/include
+EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBDIR)
+endif
+
+LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i)) 
+CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
+
+# ACM_USE_SECURITY_POLICY is set to security policy of Xen
+# Supported models are:
+#      ACM_NULL_POLICY (ACM will not be built with this policy)
+#      ACM_CHINESE_WALL_POLICY
+#      ACM_SIMPLE_TYPE_ENFORCEMENT_POLICY
+#      ACM_CHINESE_WALL_AND_SIMPLE_TYPE_ENFORCEMENT_POLICY
+ACM_USE_SECURITY_POLICY ?= ACM_NULL_POLICY
+
+# Optional components
+XENSTAT_XENTOP ?= y
+
+VTPM_TOOLS ?= n
+
+-include $(XEN_ROOT)/.config

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

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