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