summaryrefslogtreecommitdiff
path: root/drivers/bios_emulator
diff options
context:
space:
mode:
authorJason Jin <Jason.jin@freescale.com>2007-08-30 18:19:05 +0800
committerWolfgang Denk <wd@denx.de>2007-09-07 00:52:44 +0200
commit1d2ca446e1a731df420206d04fe278c27ea6b8e8 (patch)
tree9feab14986baf4b48a3d587df5abeabbf30a5a45 /drivers/bios_emulator
parentb4d8a55145442f136982634862341a3e02002bda (diff)
downloadu-boot-imx-1d2ca446e1a731df420206d04fe278c27ea6b8e8.zip
u-boot-imx-1d2ca446e1a731df420206d04fe278c27ea6b8e8.tar.gz
u-boot-imx-1d2ca446e1a731df420206d04fe278c27ea6b8e8.tar.bz2
Add BUILD_DIR support for bios emulator.
Signed-off-by: Jason Jin <Jason.jin@freescale.com>
Diffstat (limited to 'drivers/bios_emulator')
-rw-r--r--drivers/bios_emulator/Makefile23
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/bios_emulator/Makefile b/drivers/bios_emulator/Makefile
index 586e83b..90c64da 100644
--- a/drivers/bios_emulator/Makefile
+++ b/drivers/bios_emulator/Makefile
@@ -2,9 +2,11 @@ include $(TOPDIR)/config.mk
LIB := $(obj)libatibiosemu.a
-X86DIR = ./x86emu
+X86DIR = x86emu
-OBJS = atibios.o biosemu.o besys.o bios.o \
+$(shell mkdir -p $(obj)$(X86DIR))
+
+COBJS = atibios.o biosemu.o besys.o bios.o \
$(X86DIR)/decode.o \
$(X86DIR)/ops2.o \
$(X86DIR)/ops.o \
@@ -12,19 +14,24 @@ OBJS = atibios.o biosemu.o besys.o bios.o \
$(X86DIR)/sys.o \
$(X86DIR)/debug.o
-CFLAGS += -I. -I./include -I$(X86DIR) -I$(TOPDIR)/include \
+SRCS := $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS))
+
+EXTRA_CFLAGS += -I. -I./include -I$(TOPDIR)/include \
-D__PPC__ -D__BIG_ENDIAN__
+CFLAGS += $(EXTRA_CFLAGS)
+HOST_CFLAGS += $(EXTRA_CFLAGS)
+
all: $(LIB)
-$(LIB): $(OBJS)
- $(AR) crv $@ $(OBJS)
+$(LIB): $(obj).depend $(OBJS)
+ $(AR) $(ARFLAGS) $@ $(OBJS)
#########################################################################
-.depend: Makefile $(OBJS:.o=.c)
- $(CC) -M $(CFLAGS) $(OBJS:.o=.c) > $@
+include $(SRCTREE)/rules.mk
-sinclude .depend
+sinclude $(obj).depend
#########################################################################