diff options
author | Ilya Yanok | 2011-06-20 07:45:37 -0500 |
---|---|---|
committer | Wolfgang Denk | 2011-06-22 13:03:01 -0500 |
commit | d51dfff7af2ad30c54a4fb99539f3fa4275a1573 (patch) | |
tree | fe151669ced31df69496497685b7faf3061ae40d /Makefile | |
parent | 566e5cf451ae7e33e31bb62ae5b9b258e33f8609 (diff) | |
download | u-boot-d51dfff7af2ad30c54a4fb99539f3fa4275a1573.tar.gz u-boot-d51dfff7af2ad30c54a4fb99539f3fa4275a1573.tar.xz u-boot-d51dfff7af2ad30c54a4fb99539f3fa4275a1573.zip |
config.mk: move LDSCRIPT processing to the top-level Makefile
LDSCRIPT is used only from the top-level Makefile and only when the
system is configured so we can move LDSCRIPT and CONFIG_SYS_LDSCRIPT
related logic into the top level Makefile and under configured condition
to avoid errors when building tools from unconfigured tree.
Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -163,6 +163,36 @@ endif | |||
163 | # load other configuration | 163 | # load other configuration |
164 | include $(TOPDIR)/config.mk | 164 | include $(TOPDIR)/config.mk |
165 | 165 | ||
166 | # If board code explicitly specified LDSCRIPT or CONFIG_SYS_LDSCRIPT, use | ||
167 | # that (or fail if absent). Otherwise, search for a linker script in a | ||
168 | # standard location. | ||
169 | |||
170 | ifndef LDSCRIPT | ||
171 | #LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds.debug | ||
172 | ifdef CONFIG_SYS_LDSCRIPT | ||
173 | # need to strip off double quotes | ||
174 | LDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT)) | ||
175 | endif | ||
176 | endif | ||
177 | |||
178 | ifndef LDSCRIPT | ||
179 | ifeq ($(CONFIG_NAND_U_BOOT),y) | ||
180 | LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds | ||
181 | ifeq ($(wildcard $(LDSCRIPT)),) | ||
182 | LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds | ||
183 | endif | ||
184 | endif | ||
185 | ifeq ($(wildcard $(LDSCRIPT)),) | ||
186 | LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds | ||
187 | endif | ||
188 | ifeq ($(wildcard $(LDSCRIPT)),) | ||
189 | LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot.lds | ||
190 | endif | ||
191 | ifeq ($(wildcard $(LDSCRIPT)),) | ||
192 | $(error could not find linker script) | ||
193 | endif | ||
194 | endif | ||
195 | |||
166 | ######################################################################### | 196 | ######################################################################### |
167 | # U-Boot objects....order is important (i.e. start must be first) | 197 | # U-Boot objects....order is important (i.e. start must be first) |
168 | 198 | ||