]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - examples/Makefile
* Patch by Rick Bronson, 16 Mar 2003:
[karo-tx-uboot.git] / examples / Makefile
index e6a3023913f9162a1c5c4738e72632f9ac5de97a..2897ba16383cd699b72fcc453000962edf203609 100644 (file)
@@ -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)