Merge branch 'marex@denx.de' of git://git.denx.de/u-boot-staging
[oweals/u-boot.git] / arch / arm / cpu / armv7 / omap-common / Makefile
index caee7263b15cb81acb6d74c5f3b9a4af747c678b..447fcd5eff12316e97a0162dab2ac6038b0e1924 100644 (file)
 
 include $(TOPDIR)/config.mk
 
-LIB    = $(obj)libomap-common.a
+LIB    = $(obj)libomap-common.o
 
 SOBJS  := reset.o
 
 COBJS  := timer.o
-COBJS  += syslib.o
+COBJS  += utils.o
+ifdef CONFIG_OMAP
+COBJS  += gpio.o
+endif
+
+ifneq ($(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX),)
+COBJS  += hwinit-common.o
+COBJS  += clocks-common.o
+COBJS  += emif-common.o
+endif
+
+ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX),)
+COBJS  += boot-common.o
+SOBJS  += lowlevel_init.o
+endif
+
+ifdef CONFIG_SPL_BUILD
+COBJS  += spl.o
+ifdef CONFIG_SPL_NAND_SUPPORT
+COBJS  += spl_nand.o
+endif
+ifdef CONFIG_SPL_MMC_SUPPORT
+COBJS  += spl_mmc.o
+endif
+ifdef CONFIG_SPL_YMODEM_SUPPORT
+COBJS  += spl_ymodem.o
+endif
+endif
+
+ifndef CONFIG_SPL_BUILD
+ifneq ($(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX),)
+COBJS  += mem-common.o
+endif
+endif
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))
@@ -36,7 +69,7 @@ OBJS  := $(addprefix $(obj),$(SOBJS) $(COBJS))
 all:   $(obj).depend $(LIB)
 
 $(LIB):        $(OBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS)
+       $(call cmd_link_o_target, $(OBJS))
 
 #########################################################################