Move TRAB burn-in tests to TRAB board directory
[oweals/u-boot.git] / examples / Makefile
index 7975df55caee04f4b48c1bf72fb1bf09142e6258..febc501e9f694b45c7c710582f80ee62b62fdf74 100644 (file)
@@ -79,6 +79,8 @@ endif
 LIBCOBJS= stubs.o
 LIBOBJS        = $(LIBAOBJS) $(LIBCOBJS)
 
+gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
+
 CPPFLAGS += -I..
 
 all:   .depend $(LIB) $(SREC) $(BIN)
@@ -88,7 +90,8 @@ $(LIB): .depend $(LIBOBJS)
        $(AR) crv $@ $(LIBOBJS)
 
 %.srec:        %.o $(LIB)
-       $(LD) -g -Ttext $(LOAD_ADDR) -o $(<:.o=) -e $(<:.o=) $< $(LIB)
+       $(LD) -g -Ttext $(LOAD_ADDR) -o $(<:.o=) -e $(<:.o=) $< $(LIB) \
+               -L$(gcclibdir) -lgcc
        $(OBJCOPY) -O srec $(<:.o=) $@
 
 %.bin: %.srec