2 # (C) Copyright 2000-2006
3 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 # SPDX-License-Identifier: GPL-2.0+
8 include $(TOPDIR)/config.mk
10 LIB = $(obj)lib$(SOC).o
12 COBJS = clock.o mxs.o iomux.o timer.o
14 ifdef CONFIG_SPL_BUILD
15 COBJS += spl_boot.o spl_lradc_init.o spl_mem_init.o spl_power_init.o
18 SRCS := $(START:.o=.S) $(COBJS:.o=.c)
19 OBJS := $(addprefix $(obj),$(COBJS))
20 START := $(addprefix $(obj),$(START))
22 all: $(obj).depend $(LIB)
25 $(call cmd_link_o_target, $(OBJS))
27 # Specify the target for use in elftosb call
28 ELFTOSB_TARGET-$(CONFIG_MX23) = imx23
29 ELFTOSB_TARGET-$(CONFIG_MX28) = imx28
31 $(OBJTREE)/u-boot.bd: $(SRCTREE)/$(CPUDIR)/$(SOC)/u-boot-$(ELFTOSB_TARGET-y).bd
32 sed "s@OBJTREE@$(OBJTREE)@g" $^ > $@
34 $(OBJTREE)/u-boot.sb: $(OBJTREE)/u-boot.bin $(OBJTREE)/spl/u-boot-spl.bin $(OBJTREE)/u-boot.bd
35 elftosb -zf $(ELFTOSB_TARGET-y) -c $(OBJTREE)/u-boot.bd -o $(OBJTREE)/u-boot.sb
37 #########################################################################
39 # defines $(obj).depend target
40 include $(SRCTREE)/rules.mk
42 sinclude $(obj).depend
44 #########################################################################