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-changelog

[Xen-changelog] Makefile fixes. mbootpack dependencies now work properly

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Makefile fixes. mbootpack dependencies now work properly.
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Sat, 02 Apr 2005 20:18:09 +0000
Delivery-date: Sun, 03 Apr 2005 09:02:57 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1436, 2005/04/02 21:18:09+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        Makefile fixes. mbootpack dependencies now work properly.
        Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>



 Config.mk                     |    9 -------
 tools/misc/mbootpack/Makefile |   52 +++++++++++-------------------------------
 xen/Rules.mk                  |    6 ----
 3 files changed, 15 insertions(+), 52 deletions(-)


diff -Nru a/Config.mk b/Config.mk
--- a/Config.mk 2005-04-03 05:03:00 -04:00
+++ b/Config.mk 2005-04-03 05:03:00 -04:00
@@ -10,9 +10,7 @@
 override COMPILE_ARCH    := $(patsubst x86%,x86,$(XEN_COMPILE_ARCH))
 override TARGET_ARCH     := $(patsubst x86%,x86,$(XEN_TARGET_ARCH))
 
-#
-# Tool configuration Makefile fragment
-#
+# Tools to run on system hosting the build
 HOSTCC     = gcc
 HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer 
 
@@ -26,7 +24,6 @@
 OBJCOPY    = $(CROSS_COMPILE)objcopy
 OBJDUMP    = $(CROSS_COMPILE)objdump
 
-
 ifneq ($(EXTRA_PREFIX),)
 EXTRA_INCLUDES += $(EXTRA_PREFIX)/include
 EXTRA_LIB += $(EXTRA_PREFIX)/lib
@@ -34,7 +31,3 @@
 
 LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i)) 
 CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
-
-CFLAGS += -g
-
-
diff -Nru a/tools/misc/mbootpack/Makefile b/tools/misc/mbootpack/Makefile
--- a/tools/misc/mbootpack/Makefile     2005-04-03 05:03:00 -04:00
+++ b/tools/misc/mbootpack/Makefile     2005-04-03 05:03:00 -04:00
@@ -8,56 +8,36 @@
 XEN_ROOT=../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-CFLAGS   += -Wall -Werror -O3 
-
-INCLUDES += -I $(XEN_XC)
-INCLUDES += -I $(XEN_LIBXC)
-CFLAGS   += $(INCLUDES)
-
-HDRS     = $(wildcard *.h)
-
-TARGETS  = mbootpack
-
-INSTALL_BIN  = mbootpack
-INSTALL_SBIN =
-
 all: build
-build: $(TARGETS)
+build: mbootpack
 
 install: build
-       $(INSTALL_PROG) $(INSTALL_BIN) $(DESTDIR)/usr/bin
-
-#
-#  What object files need building for the program
-#
+       $(INSTALL_PROG) mbootpack $(DESTDIR)/usr/bin
 
-OBJS   := mbootpack.o buildimage.o
-DEPS   := mbootpack.d buildimage.d
-
-# 
 #  Tools etc.
-#
-
 RM     := rm -f
 GDB    := gdb
 INCS   := -I. -I-
 DEFS   := 
 LDFLAGS        := 
 CC     := gcc
-CFLAGS         := -W -Wall -Wpointer-arith -Wcast-qual -Wno-unused -Wno-format
+CFLAGS         := -Wall -Wpointer-arith -Wcast-qual -Wno-unused -Wno-format
 CFLAGS += -Wmissing-prototypes
 #CFLAGS        += -pipe -g -O0 -Wcast-align
 CFLAGS += -pipe -O3 
 
-#
-#  Rules
-#
+#  What object files need building for the program
+OBJS   := mbootpack.o buildimage.o
+
+# Get gcc to generate the dependencies for us.
+DEPFLAGS = -Wp,-MD,.$(@F).d
+DEPS     = .*.d
 
 mbootpack: $(OBJS)
        $(CC) -o $@ $(filter-out %.a, $^) $(LDFLAGS)
 
-clean: FRC
-       $(RM) mbootpack *.o *.d bootsect setup bzimage_header.c bin2c
+clean:
+       $(RM) mbootpack *.o $(DEPS) bootsect setup bzimage_header.c bin2c
 
 bootsect: bootsect.S
        $(CC) $(CFLAGS) $(INCS) $(DEFS) -D__MB_ASM -c bootsect.S -o bootsect.o
@@ -78,16 +58,12 @@
        @
 
 %.o: %.S
-       $(CC) $(CFLAGS) $(INCS) $(DEFS) -c $< -o $@
+       $(CC) $(DEPFLAGS) $(CFLAGS) $(INCS) $(DEFS) -c $< -o $@
 
 %.o: %.c
-       $(CC) $(CFLAGS) $(INCS) $(DEFS) -c $< -o $@
-
-%.d: %.c
-       $(CC) $(CFLAGS) $(INCS) $(DEFS) -M $< > $@
+       $(CC) $(DEPFLAGS) $(CFLAGS) $(INCS) $(DEFS) -c $< -o $@
 
-FRC: 
-.PHONY:: all FRC clean gdb
+.PHONY: all clean gdb
 .PRECIOUS: $(OBJS) $(OBJS:.o=.c) $(DEPS)
 .SUFFIXES: 
 
diff -Nru a/xen/Rules.mk b/xen/Rules.mk
--- a/xen/Rules.mk      2005-04-03 05:03:00 -04:00
+++ b/xen/Rules.mk      2005-04-03 05:03:00 -04:00
@@ -9,12 +9,6 @@
 
 include $(BASEDIR)/../Config.mk
 
-# Set ARCH/SUBARCH appropriately.
-override COMPILE_SUBARCH := $(XEN_COMPILE_ARCH)
-override TARGET_SUBARCH  := $(XEN_TARGET_ARCH)
-override COMPILE_ARCH    := $(patsubst x86%,x86,$(XEN_COMPILE_ARCH))
-override TARGET_ARCH     := $(patsubst x86%,x86,$(XEN_TARGET_ARCH))
-
 TARGET  := $(BASEDIR)/xen
 HDRS    := $(wildcard $(BASEDIR)/include/xen/*.h)
 HDRS    += $(wildcard $(BASEDIR)/include/public/*.h)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Makefile fixes. mbootpack dependencies now work properly., BitKeeper Bot <=