]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - lib_arm/Makefile
cmd_nand: show nand scrub confirmation character
[people/ms/u-boot.git] / lib_arm / Makefile
index e56e06b1b3a3171a5c88a93c14e774b9660228bc..02933485cd16600f4f9dbae073a85184a40a7d8d 100644 (file)
@@ -1,5 +1,5 @@
 #
-# (C) Copyright 2002
+# (C) Copyright 2002-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
+LIB    = $(obj)lib$(ARCH).a
+LIBGCC = $(obj)libgcc.a
 
-AOBJS  = _ashldi3.o _ashrdi3.o _divsi3.o _modsi3.o _udivsi3.o _umodsi3.o
+GLSOBJS        += _ashldi3.o
+GLSOBJS        += _ashrdi3.o
+GLSOBJS        += _divsi3.o
+GLSOBJS        += _lshrdi3.o
+GLSOBJS        += _modsi3.o
+GLSOBJS        += _udivsi3.o
+GLSOBJS        += _umodsi3.o
 
-COBJS  = armlinux.o board.o \
-         cache.o div0.o
+GLCOBJS        += div0.o
 
-OBJS   = $(AOBJS) $(COBJS)
+COBJS-y        += board.o
+COBJS-y        += bootm.o
+COBJS-y        += cache.o
+ifndef CONFIG_SYS_NO_CP15_CACHE
+COBJS-y        += cache-cp15.o
+endif
+COBJS-y        += interrupts.o
+COBJS-y        += reset.o
 
-$(LIB):        .depend $(OBJS)
-       $(AR) crv $@ $(OBJS)
+SRCS   := $(GLSOBJS:.o=.S) $(GLCOBJS:.o=.c) \
+          $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
+LGOBJS := $(addprefix $(obj),$(GLSOBJS)) \
+          $(addprefix $(obj),$(GLCOBJS))
+
+# Always build libarm.a
+TARGETS        := $(LIB)
+
+# Build private libgcc only when asked for
+ifdef USE_PRIVATE_LIBGCC
+TARGETS        += $(LIBGCC)
+endif
+
+# For EABI conformant tool chains, provide eabi_compat()
+ifneq (,$(findstring -mabi=aapcs-linux,$(PLATFORM_CPPFLAGS)))
+TARGETS        += $(obj)eabi_compat.o
+endif
+
+all:   $(TARGETS)
+
+$(LIB):        $(obj).depend $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
+
+$(LIBGCC): $(obj).depend $(LGOBJS)
+       $(AR) $(ARFLAGS) $@ $(LGOBJS)
 
 #########################################################################
 
-.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
 
 #########################################################################