summaryrefslogtreecommitdiffstats
path: root/examples/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'examples/Makefile')
-rw-r--r--examples/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/Makefile b/examples/Makefile
index e6a3023913..2897ba1638 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -26,6 +26,7 @@ LOAD_ADDR = 0x40000
include $(TOPDIR)/config.mk
SREC = hello_world.srec
+BIN = hello_world.bin
ifeq ($(CPU),mips)
SREC =
@@ -50,7 +51,7 @@ LIBOBJS = $(LIBAOBJS) $(LIBCOBJS)
CPPFLAGS += -I..
-all: .depend $(LIB) $(SREC)
+all: .depend $(LIB) $(SREC) $(BIN)
#########################################################################
$(LIB): .depend $(LIBOBJS)
@@ -60,6 +61,9 @@ $(LIB): .depend $(LIBOBJS)
$(LD) -g -Ttext $(LOAD_ADDR) -o $(<:.o=) -e $(<:.o=) $< $(LIB)
$(OBJCOPY) -O srec $(<:.o=) $@
+%.bin: %.srec
+ $(OBJCOPY) -O binary $< $@
+
#########################################################################
.depend: Makefile $(OBJS:.o=.c) $(LIBCOBJS:.o=.c) $(LIBAOBJS:.o=.S)
OpenPOWER on IntegriCloud