# 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 \
$(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