summaryrefslogtreecommitdiffstats
path: root/config.mk
diff options
context:
space:
mode:
authorH. Nikolaus Schaller <hns@goldelico.com>2011-02-24 13:21:40 +0100
committerH. Nikolaus Schaller <hns@goldelico.com>2011-02-24 13:21:40 +0100
commit67fa659acb97323da480a4a545560d4d27c5796a (patch)
tree648ab5e4cbcdf17bcfe0e79346e264c4f0187662 /config.mk
parent872ca46bf7ec07388fc06e687875204663f6080e (diff)
parentc7977858dcf1f656cbe91ea0dc3cb9139c6a8cc8 (diff)
downloadbootable_bootloader_goldelico_gta04-67fa659acb97323da480a4a545560d4d27c5796a.zip
bootable_bootloader_goldelico_gta04-67fa659acb97323da480a4a545560d4d27c5796a.tar.gz
bootable_bootloader_goldelico_gta04-67fa659acb97323da480a4a545560d4d27c5796a.tar.bz2
git pull denx master
Diffstat (limited to 'config.mk')
-rw-r--r--config.mk25
1 files changed, 12 insertions, 13 deletions
diff --git a/config.mk b/config.mk
index 27ab107..bf1cdc4 100644
--- a/config.mk
+++ b/config.mk
@@ -205,9 +205,11 @@ endif
AFLAGS := $(AFLAGS_DEBUG) -D__ASSEMBLY__ $(CPPFLAGS)
-LDFLAGS += -Bstatic -T $(obj)u-boot.lds $(PLATFORM_LDFLAGS)
+LDFLAGS += $(PLATFORM_LDFLAGS)
+
+LDFLAGS_u-boot += -Bstatic -T $(obj)u-boot.lds $(PLATFORM_LDFLAGS)
ifneq ($(CONFIG_SYS_TEXT_BASE),)
-LDFLAGS += -Ttext $(CONFIG_SYS_TEXT_BASE)
+LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE)
endif
# Location of a usable BFD library, where we define "usable" as
@@ -243,27 +245,24 @@ export CONFIG_SYS_TEXT_BASE PLATFORM_CPPFLAGS PLATFORM_RELFLAGS CPPFLAGS CFLAGS
# Allow boards to use custom optimize flags on a per dir/file basis
BCURDIR = $(subst $(SRCTREE)/,,$(CURDIR:$(obj)%=%))
+ALL_AFLAGS = $(AFLAGS) $(AFLAGS_$(BCURDIR)/$(@F)) $(AFLAGS_$(BCURDIR))
+ALL_CFLAGS = $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR))
$(obj)%.s: %.S
- $(CPP) $(AFLAGS) $(AFLAGS_$(BCURDIR)/$(@F)) $(AFLAGS_$(BCURDIR)) \
- -o $@ $<
+ $(CPP) $(ALL_AFLAGS) -o $@ $<
$(obj)%.o: %.S
- $(CC) $(AFLAGS) $(AFLAGS_$(BCURDIR)/$(@F)) $(AFLAGS_$(BCURDIR)) \
- -o $@ $< -c
+ $(CC) $(ALL_AFLAGS) -o $@ $< -c
$(obj)%.o: %.c
- $(CC) $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \
- -o $@ $< -c
+ $(CC) $(ALL_CFLAGS) -o $@ $< -c
$(obj)%.i: %.c
- $(CPP) $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \
- -o $@ $< -c
+ $(CPP) $(ALL_CFLAGS) -o $@ $< -c
$(obj)%.s: %.c
- $(CC) $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \
- -o $@ $< -c -S
+ $(CC) $(ALL_CFLAGS) -o $@ $< -c -S
#########################################################################
# If the list of objects to link is empty, just create an empty built-in.o
cmd_link_o_target = $(if $(strip $1),\
- $(LD) -r -o $@ $1 ,\
+ $(LD) $(LDFLAGS) -r -o $@ $1,\
rm -f $@; $(AR) rcs $@ )
#########################################################################