summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/Makefile b/examples/Makefile
index 90d26550b0..a353203128 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -73,6 +73,10 @@ ifeq ($(BOARD),oxc)
SREC += eepro100_eeprom.srec
endif
+ifeq ($(BIG_ENDIAN),y)
+EX_LDFLAGS += -EB
+endif
+
OBJS = $(SREC:.srec=.o)
LIB = libstubs.a
@@ -94,7 +98,8 @@ $(LIB): .depend $(LIBOBJS)
$(AR) crv $@ $(LIBOBJS)
%.srec: %.o $(LIB)
- $(LD) -g -Ttext $(LOAD_ADDR) -o $(<:.o=) -e $(<:.o=) $< $(LIB) \
+ $(LD) -g $(EX_LDFLAGS) -Ttext $(LOAD_ADDR) \
+ -o $(<:.o=) -e $(<:.o=) $< $(LIB) \
-L$(gcclibdir) -lgcc
$(OBJCOPY) -O srec $(<:.o=) $@