summaryrefslogtreecommitdiff
path: root/util/mkelfImage/linux-i386/Makefile
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2008-02-15 18:16:06 +0000
committerStefan Reinauer <stepan@openbios.org>2008-02-15 18:16:06 +0000
commitb34eea348cb7d6d9c93d17d51a1f322114b8f15d (patch)
tree38dd85932dacaa7c7a174d87307baff6210d70c4 /util/mkelfImage/linux-i386/Makefile
parent46fc14dcc8cdba1d66ae6fa9fdcbbf33265d676e (diff)
downloadcoreboot-b34eea348cb7d6d9c93d17d51a1f322114b8f15d.tar.xz
Importing mkelfimage from
ftp://ftp.lnxi.com/pub/mkelfImage/mkelfImage-2.7.tar.gz Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3103 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/mkelfImage/linux-i386/Makefile')
-rw-r--r--util/mkelfImage/linux-i386/Makefile35
1 files changed, 35 insertions, 0 deletions
diff --git a/util/mkelfImage/linux-i386/Makefile b/util/mkelfImage/linux-i386/Makefile
new file mode 100644
index 0000000000..51531d6f4b
--- /dev/null
+++ b/util/mkelfImage/linux-i386/Makefile
@@ -0,0 +1,35 @@
+LI386_DIR:=linux-i386
+LI386_OBJ:=$(OBJDIR)/$(LI386_DIR)
+LI386_DEP=Makefile Makefile.conf $(LI386_DIR)/Makefile
+
+$(LI386_OBJ)/mkelf-linux-i386.o: $(LI386_DIR)/mkelf-linux-i386.c $(LI386_DIR)/convert.bin.c $(LI386_DEP)
+ $(MKDIR) -p $(@D)
+ $(HOST_CC) $(HOST_CFLAGS) -c -g $< -o $@
+
+
+ifdef I386_CC
+
+$(LI386_DIR)/convert.bin.c: $(LI386_OBJ)/convert.bin $(OBJDIR)/bin/bin-to-hex $(LI386_DEP)
+ $(MKDIR) -p $(@D)
+ $(OBJDIR)/bin/bin-to-hex < $(LI386_OBJ)/convert.bin > $@
+
+$(LI386_OBJ)/convert.bin: $(LI386_OBJ)/convert $(LI386_DEP)
+ $(MKDIR) -p $(@D)
+ $(I386_OBJCOPY) -O binary $< $@
+
+CONVERT_LI386_OBJS=$(LI386_OBJ)/head.o $(LI386_OBJ)/convert_params.o
+
+$(LI386_OBJ)/convert: $(LI386_DIR)/convert.lds $(CONVERT_LI386_OBJS) $(LI386_DEP)
+ $(MKDIR) -p $(@D)
+ $(I386_LD) $(I386_LDFLAGS) -T $(LI386_DIR)/convert.lds -o $@ $(CONVERT_LI386_OBJS)
+
+$(LI386_OBJ)/head.o: $(LI386_DIR)/head.S $(LI386_DIR)/convert.h
+ $(MKDIR) -p $(@D)
+ $(I386_CPP) $(I386_CPPFLAGS) -DASSEMBLY $< | $(I386_AS) $(I386_ASFLAGS) -o $@
+
+$(LI386_OBJ)/convert_params.o: $(LI386_DIR)/convert_params.c $(LI386_DIR)/convert.h $(LI386_DEP)
+ $(MKDIR) -p $(@D)
+ $(I386_CC) $(I386_CFLAGS) -c -o $@ $<
+
+endif
+