diff options
author | Stefan Reinauer <stepan@openbios.org> | 2003-09-18 14:16:08 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2003-09-18 14:16:08 +0000 |
commit | dcdbdfb46e7075515fef5be386e14c42463f7a5e (patch) | |
tree | ca43f548ddcb695d4843fe8a69a55e68ba325ca8 /util/extensions/legacybios/Makefile | |
parent | 59549598c08d5bdcee01bfb91dd9d147edf9fee7 (diff) | |
download | coreboot-dcdbdfb46e7075515fef5be386e14c42463f7a5e.tar.xz |
first shot of legacybios emulation.
does not work yet.. sorry :-(
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1119 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/extensions/legacybios/Makefile')
-rw-r--r-- | util/extensions/legacybios/Makefile | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/util/extensions/legacybios/Makefile b/util/extensions/legacybios/Makefile new file mode 100644 index 0000000000..477a3af7b0 --- /dev/null +++ b/util/extensions/legacybios/Makefile @@ -0,0 +1,71 @@ +# tag: Makefile for the legacy bios emulation +# +# Copyright (C) 2003 Stefan Reinauer +# +# See the file "COPYING" for further information about +# the copyright and warranty status of this work. +# + +# FIXME: limitations of this makefile: +# - needs vgabios.rom even if its not used +# - builds x86emu even if it's not used. + + +ARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/) +TOPDIR := $(shell /bin/pwd) +BUILDDIR ?= $(TOPDIR)/obj-$(ARCH) +VPATH := $(TOPDIR)/include:$(TOPDIR)/util:$(BUILDDIR) + +include $(TOPDIR)/Rules.make + +CFLAGS_DEBUG := -Wall -Wstrict-prototypes -Wshadow + +CFLAGS ?= -Os -fcaller-saves -fomit-frame-pointer $(CFLAGS_ARCH) $(CFLAGS_DEBUG) + +export ARCH TOPDIR VPATH CFLAGS BUILDDIR + +all: main $(ARCH) + @echo -e "\nlegacy bios plugin build finished for platform $(ARCH).\n" + +.PHONY: kernel $(ARCH) + +types.h: types.sh + @echo -n "Checking types..." + @cd $(BUILDDIR) && $(TOPDIR)/util/types.sh + +bin2hex: bin2hex.c + @echo -n "Building binary converter..." + @cd $(BUILDDIR) && $(CC) -o bin2hex $(TOPDIR)/util/bin2hex.c + @echo -e "\t\tok" + +kernel: + @make -s -C kernel + +main: + @echo -e "\nWelcome to LegacyBIOS..." + @test -r $(BUILDDIR) || ( mkdir -p $(BUILDDIR); \ + echo -e "\nCreating build directory $(BUILDDIR)" ) + +libx86emu.a: + make -s -C arch/x86emu/src/x86emu + +$(ARCH): types.h bin2hex kernel vgabios.rom libx86emu.a + @make -s -C arch/$(ARCH) + +vgabios.rom: + @cp $(TOPDIR)/roms/vgabios.rom $(BUILDDIR) + +clean: + @test ! -d $(BUILDDIR) && \ + echo "Architecture $(ARCH) is already clean." || \ + ( \ + echo "Cleaning up architecture $(ARCH)"; \ + rm -rf $(BUILDDIR) \ + rm forth.dict.core \ + ) + +indent: + find -path './{arch}' -prune -o -name '*.[ch]' \ + -exec indent -kr -i8 {} \; + find -name '*~' -exec rm {} \; + |