summaryrefslogtreecommitdiffstats
path: root/kernel/tools/build/Makefile.build
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/tools/build/Makefile.build')
-rw-r--r--kernel/tools/build/Makefile.build15
1 files changed, 12 insertions, 3 deletions
diff --git a/kernel/tools/build/Makefile.build b/kernel/tools/build/Makefile.build
index 98cfc388e..4a96473b1 100644
--- a/kernel/tools/build/Makefile.build
+++ b/kernel/tools/build/Makefile.build
@@ -21,11 +21,18 @@ endif
build-dir := $(srctree)/tools/build
+# Define $(fixdep) for dep-cmd function
+ifeq ($(OUTPUT),)
+ fixdep := $(build-dir)/fixdep
+else
+ fixdep := $(OUTPUT)/fixdep
+endif
+
# Generic definitions
include $(build-dir)/Build.include
# do not force detected configuration
--include .config-detected
+-include $(OUTPUT).config-detected
# Init all relevant variables used in build files so
# 1) they have correct type
@@ -37,7 +44,7 @@ subdir-obj-y :=
# Build definitions
build-file := $(dir)/Build
-include $(build-file)
+-include $(build-file)
quiet_cmd_flex = FLEX $@
quiet_cmd_bison = BISON $@
@@ -57,11 +64,13 @@ quiet_cmd_cc_i_c = CPP $@
quiet_cmd_cc_s_c = AS $@
cmd_cc_s_c = $(CC) $(c_flags) -S -o $@ $<
+quiet_cmd_gen = GEN $@
+
# Link agregate command
# If there's nothing to link, create empty $@ object.
quiet_cmd_ld_multi = LD $@
cmd_ld_multi = $(if $(strip $(obj-y)),\
- $(LD) -r -o $@ $(obj-y),rm -f $@; $(AR) rcs $@)
+ $(LD) -r -o $@ $(filter $(obj-y),$^),rm -f $@; $(AR) rcs $@)
# Build rules
$(OUTPUT)%.o: %.c FORCE