From: Stefan Berger Subject: [PATCH] [Bochs/32-Bit BIOS] Fixes for makefiles Date: Sat, 06 Jan 2007 08:56:28 -0500 Message-ID: <1168091788.18103.4.camel@lt2.watson.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-lBDRv0A/oz2Smutaolar" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Xen-devel Cc: keir@xensource.com List-Id: xen-devel@lists.xenproject.org --=-lBDRv0A/oz2Smutaolar Content-Type: text/plain Content-Transfer-Encoding: 7bit This patch fixes some problems in makefiles of this previously posted patch: http://lists.xensource.com/archives/html/xen-devel/2007-01/msg00071.html Signed-off-by: Stefan Berger --=-lBDRv0A/oz2Smutaolar Content-Disposition: attachment; filename=tcgbios_makefile_fix.diff Content-Type: text/x-patch; name=tcgbios_makefile_fix.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit Index: root/xen-unstable.hg/tools/firmware/rombios/32bit/Makefile =================================================================== --- root.orig/xen-unstable.hg/tools/firmware/rombios/32bit/Makefile +++ root/xen-unstable.hg/tools/firmware/rombios/32bit/Makefile @@ -7,33 +7,32 @@ CFLAGS += -I../ SUBDIRS = tcgbios -MODULES = 32bitbios.o -MODULES += tcgbios/tcgbiosext.o -MODULES += util.o +MODULES = tcgbios/tcgbiosext.o -.PHONY: all subdirs +.PHONY: all subdirs clean -all : subdirs $(TARGET) +all : $(TARGET) subdirs : @for subdir in $(SUBDIRS); do \ $(MAKE) -C $$subdir all; \ done; \ -clean :: +clean : rm -rf *.o $(TARGET) @for subdir in $(SUBDIRS); do \ $(MAKE) -C $$subdir $@; \ done; \ -$(TARGET) : 32bitbios_all.o $(SOURCES) - unref=`nm -u 32bitbios_all.o` - if [ "$$unref" != "" ]; then \ - echo "There are unresolved symbols in the BIOS."; \ - echo $$unref ; \ - else \ - bash mkhex highbios_array 32bitbios_all.o > $(TARGET); \ - fi +%.o : %.c + gcc $(CFLAGS) -c $^ -o $@ -32bitbios_all.o : $(MODULES) - ld -r $(MODULES) -o 32bitbios_all.o +$(TARGET) : subdirs 32bitbios.o util.o + ld -r 32bitbios.o $(MODULES) util.o -o 32bitbios_all.o + @nm 32bitbios_all.o | \ + grep -E -q '^ +U ' && { \ + echo "There are undefined symbols in the BIOS:"; \ + nm -u 32bitbios_all.o; \ + exit 11; \ + } || : + bash mkhex highbios_array 32bitbios_all.o > $@ Index: root/xen-unstable.hg/tools/firmware/rombios/32bit/tcgbios/Makefile =================================================================== --- root.orig/xen-unstable.hg/tools/firmware/rombios/32bit/tcgbios/Makefile +++ root/xen-unstable.hg/tools/firmware/rombios/32bit/tcgbios/Makefile @@ -6,9 +6,11 @@ CFLAGS = -Wall -Werror -Wunused -Werror CFLAGS += -fomit-frame-pointer -fno-builtin -nostdlib CFLAGS += -I../ -I../../ +.PHONY: all clean + all : $(TARGET) -clean:: +clean : rm -rf *.o $(TARGET) %.o : %.c --=-lBDRv0A/oz2Smutaolar Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-lBDRv0A/oz2Smutaolar--