]> git.sur5r.net Git - u-boot/blobdiff - lib_ppc/Makefile
Blackfin: TWI/I2C: implement bus speed get/set functions
[u-boot] / lib_ppc / Makefile
index 652a4199ec5172a05544a1d0b200c79d9526f1d7..399b41e31e0e30143ebedd10b2bfc08a208a045b 100644 (file)
@@ -1,5 +1,5 @@
 #
-# (C) Copyright 2000
+# (C) Copyright 2000-2006
 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
 #
 # See file CREDITS for list of people who contributed to this
 
 include $(TOPDIR)/config.mk
 
-LIB    = lib$(ARCH).a
-
-AOBJS  = ppcstring.o ticks.o
-
-COBJS  = board.o \
-         bat_rw.o cache.o extable.o kgdb.o time.o interrupts.o
-
-OBJS   = $(AOBJS) $(COBJS)
-
-$(LIB):        .depend $(OBJS)
-       $(AR) crv $@ $(OBJS)
+LIB    = $(obj)lib$(ARCH).a
+
+SOBJS-y        += ppccache.o
+SOBJS-y        += ppcstring.o
+SOBJS-y        += ticks.o
+
+COBJS-y        += bat_rw.o
+COBJS-y        += board.o
+COBJS-y        += bootm.o
+COBJS-y        += cache.o
+COBJS-y        += extable.o
+COBJS-y        += interrupts.o
+COBJS-y        += kgdb.o
+COBJS-y        += time.o
+
+SRCS   := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
+
+$(LIB):        $(obj).depend $(OBJS)
+       @if ! $(CROSS_COMPILE)readelf -S $(OBJS) | grep -q '\.fixup.*PROGBITS';\
+       then \
+               echo "ERROR: Your compiler doesn't generate .fixup sections!";\
+               echo "       Upgrade to a recent toolchain."; \
+               exit 1; \
+       fi;
+       $(AR) $(ARFLAGS) $@ $(OBJS)
 
 #########################################################################
 
-.depend:       Makefile $(AOBJS:.o=.S) $(COBJS:.o=.c)
-               $(CC) -M $(CFLAGS) $(AOBJS:.o=.S) $(COBJS:.o=.c) > $@
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
 
-sinclude .depend
+sinclude $(obj).depend
 
 #########################################################################