summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrançois Revol <revol@free.fr>2011-03-18 11:03:03 +0000
committerWolfgang Denk <wd@denx.de>2011-05-12 22:46:42 +0200
commitbbc6353c740064c8e0741b772376a1a67a1c3f01 (patch)
treeb31ad5246207fa478afed2d5ad2e32dc78839505
parent95efa79d089fabf9f5a56756ff3c32235ddebc37 (diff)
downloadu-boot-imx-bbc6353c740064c8e0741b772376a1a67a1c3f01.zip
u-boot-imx-bbc6353c740064c8e0741b772376a1a67a1c3f01.tar.gz
u-boot-imx-bbc6353c740064c8e0741b772376a1a67a1c3f01.tar.bz2
Fix building tools alone with host compiler
- don't include config.h when building with host cc, - HOSTCFLAGS was defined with the wrong name, so wasn't used, - make sure make finds sources outside of tools/. Signed-off-by: François Revol <revol@free.fr>
-rw-r--r--tools/Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/Makefile b/tools/Makefile
index 623f908..1ca497e 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -140,7 +140,7 @@ NOPEDOBJS := $(addprefix $(obj),$(NOPED_OBJ_FILES-y))
# Use native tools and options
# Define __KERNEL_STRICT_NAMES to prevent typedef overlaps
#
-HOSTCPPFLAGS = -idirafter $(SRCTREE)/include \
+HOSTCFLAGS = -idirafter $(SRCTREE)/include \
-idirafter $(OBJTREE)/include2 \
-idirafter $(OBJTREE)/include \
-I $(SRCTREE)/lib/libfdt \
@@ -201,10 +201,10 @@ $(obj)ubsha1$(SFX): $(obj)os_support.o $(obj)sha1.o $(obj)ubsha1.o
$(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
# Some of the tool objects need to be accessed from outside the tools directory
-$(obj)%.o: $(SRCTREE)/common/%.c
+$(subst common/,,$(filter common/%,$(EXT_OBJ_FILES-y))): $(obj)%.o: $(SRCTREE)/common/%.c
$(HOSTCC) -g $(HOSTCFLAGS_NOPED) -c -o $@ $<
-$(obj)%.o: $(SRCTREE)/lib/%.c
+$(subst lib/,,$(filter lib/%,$(EXT_OBJ_FILES-y))): $(obj)%.o: $(SRCTREE)/lib/%.c
$(HOSTCC) -g $(HOSTCFLAGS) -c -o $@ $<
$(obj)%.o: $(SRCTREE)/lib/libfdt/%.c