include $(TOPDIR)/config.mk
SREC = hello_world.srec
+BIN = hello_world.bin
ifeq ($(CPU),mips)
SREC =
+BIN =
endif
# The following example is pretty 8xx specific...
CPPFLAGS += -I..
-all: .depend $(LIB) $(SREC)
+all: .depend $(LIB) $(SREC) $(BIN)
#########################################################################
$(LIB): .depend $(LIBOBJS)
$(LD) -g -Ttext $(LOAD_ADDR) -o $(<:.o=) -e $(<:.o=) $< $(LIB)
$(OBJCOPY) -O srec $(<:.o=) $@
+%.bin: %.srec
+ $(OBJCOPY) -O binary $< $@ 2>/dev/null
+
#########################################################################
.depend: Makefile $(OBJS:.o=.c) $(LIBCOBJS:.o=.c) $(LIBAOBJS:.o=.S)