summaryrefslogtreecommitdiff
path: root/util/x86emu/Makefile
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2009-08-11 21:28:25 +0000
committerStefan Reinauer <stepan@openbios.org>2009-08-11 21:28:25 +0000
commit38cd29ebd7282333650cf11ed50c7f2fd4031e80 (patch)
tree61008ca7d9a8e4ad5e5237e5f7cbc982a8206c55 /util/x86emu/Makefile
parentb339e10f04869a3d8da31e7d52831c32c57302a2 (diff)
Don't pull in x86emu from a foreign directory anymore. This
produced numerous problems in the past, including the fact that x86emu doesn't work in v3 anymore even though it lives in the v3 repository. Since this is a cross-repository move, keeping the history in the v2 tree would make life hard for everone. So check the v3 repository for x86emu history since the merger. The his commit is based on an svn export of r1175 of the coreboot-v3 repository. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Patrick Georgi <patrick.georgi@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4532 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/x86emu/Makefile')
-rw-r--r--util/x86emu/Makefile72
1 files changed, 72 insertions, 0 deletions
diff --git a/util/x86emu/Makefile b/util/x86emu/Makefile
new file mode 100644
index 0000000000..2c915d466b
--- /dev/null
+++ b/util/x86emu/Makefile
@@ -0,0 +1,72 @@
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2007 coresystems GmbH
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+#X86EMU_INCLUDE = -I $(src)/util/x86emu/include
+
+X86EMU_SRC = debug.c decode.c fpu.c ops.c ops2.c prim_ops.c sys.c
+ifeq ($(CONFIG_PCI_OPTION_ROM_RUN_X86EMU),y)
+BIOSEMU_SRC = biosemu.c pcbios/pcibios.c
+endif
+
+ifeq ($(CONFIG_PCI_OPTION_ROM_RUN_YABEL),y)
+BIOSEMU_SRC = biosemu.c debug.c device.c mem.c io.c interrupt.c
+#TODO: add vbe.c, currently not needed...
+#BIOSEMU_SRC +=vbe.c
+BIOSEMU_SRC +=pmm.c
+#PH: TODO: remove the compat files??
+BIOSEMU_SRC += compat/functions.c
+X86EMU_INCLUDE += -I $(src)/util/x86emu/yabel
+X86EMU_INCLUDE += -I $(src)/util/x86emu
+#TODO: remove these, these are .h files from slof, to make the merge easier...
+X86EMU_INCLUDE += -I $(src)/util/x86emu/yabel/compat
+endif
+REALMODE_SRC = x86.c x86_asm.S
+
+ifeq ($(CONFIG_PCI_OPTION_ROM_RUN_X86EMU),y)
+LIBX86EMU_SRC=$(patsubst %,x86emu/%,$(X86EMU_SRC)) $(BIOSEMU_SRC)
+endif
+
+ifeq ($(CONFIG_PCI_OPTION_ROM_RUN_YABEL),y)
+LIBX86EMU_SRC=$(patsubst %,x86emu/%,$(X86EMU_SRC)) $(patsubst %,yabel/%,$(BIOSEMU_SRC))
+endif
+
+ifeq ($(CONFIG_PCI_OPTION_ROM_RUN_REALMODE),y)
+LIBX86EMU_SRC=$(REALMODE_SRC)
+endif
+
+LIBX86EMU_OBJS = $(patsubst %.c,$(obj)/util/x86emu/%.o,$(LIBX86EMU_SRC))
+# needed for kscope
+PCIROM_SRC += $(patsubst %,$(src)/util/x86emu/%,$(LIBX86EMU_SRC))
+
+
+$(obj)/util/x86emu/libx86emu.a: $(LIBX86EMU_OBJS) $(src)/.config
+ $(Q)printf " AR $(subst $(shell pwd)/,,$(@))\n"
+ $(Q)rm -f $@ # otherwise we always add to the archive
+ $(Q)$(AR) qcs $@ $(LIBX86EMU_OBJS)
+
+#
+# This rule is also valid for all subdirectories
+#
+
+$(obj)/util/x86emu/%.o: $(src)/util/x86emu/%.c
+ $(Q)mkdir -p $(dir $@)
+ $(Q)printf " CC $(subst $(shell pwd)/,,$(@))\n"
+ $(Q)$(CC) -Werror $(INITCFLAGS) $(X86EMU_INCLUDE) -I$(src)/util/x86emu/include -c $< -o $@
+