Makefile.build (498495dba268b20e8eadd7fe93c140c68b6cc9d2) Makefile.build (c6de37dd5e48b883db032aa4dc0547a4858b9f20)
1# SPDX-License-Identifier: GPL-2.0
2###
3# Main build makefile.
4#
5# Lots of this code have been borrowed or heavily inspired from parts
6# of kbuild code, which is not credited, but mostly developed by:
7#
8# Copyright (C) Sam Ravnborg <sam@mars.ravnborg.org>, 2015

--- 37 unchanged lines hidden (view full) ---

46obj-y :=
47subdir-y :=
48subdir-obj-y :=
49
50# Build definitions
51build-file := $(dir)/Build
52-include $(build-file)
53
1# SPDX-License-Identifier: GPL-2.0
2###
3# Main build makefile.
4#
5# Lots of this code have been borrowed or heavily inspired from parts
6# of kbuild code, which is not credited, but mostly developed by:
7#
8# Copyright (C) Sam Ravnborg <sam@mars.ravnborg.org>, 2015

--- 37 unchanged lines hidden (view full) ---

46obj-y :=
47subdir-y :=
48subdir-obj-y :=
49
50# Build definitions
51build-file := $(dir)/Build
52-include $(build-file)
53
54quiet_cmd_flex = FLEX $@
55quiet_cmd_bison = BISON $@
54quiet_cmd_flex = FLEX $@
55quiet_cmd_bison = BISON $@
56
57# Create directory unless it exists
56
57# Create directory unless it exists
58quiet_cmd_mkdir = MKDIR $(dir $@)
58quiet_cmd_mkdir = MKDIR $(dir $@)
59 cmd_mkdir = mkdir -p $(dir $@)
60 rule_mkdir = $(if $(wildcard $(dir $@)),,@$(call echo-cmd,mkdir) $(cmd_mkdir))
61
62# Compile command
59 cmd_mkdir = mkdir -p $(dir $@)
60 rule_mkdir = $(if $(wildcard $(dir $@)),,@$(call echo-cmd,mkdir) $(cmd_mkdir))
61
62# Compile command
63quiet_cmd_cc_o_c = CC $@
63quiet_cmd_cc_o_c = CC $@
64 cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $<
65
64 cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $<
65
66quiet_cmd_host_cc_o_c = HOSTCC $@
66quiet_cmd_host_cc_o_c = HOSTCC $@
67 cmd_host_cc_o_c = $(HOSTCC) $(host_c_flags) -c -o $@ $<
68
67 cmd_host_cc_o_c = $(HOSTCC) $(host_c_flags) -c -o $@ $<
68
69quiet_cmd_cxx_o_c = CXX $@
69quiet_cmd_cxx_o_c = CXX $@
70 cmd_cxx_o_c = $(CXX) $(cxx_flags) -c -o $@ $<
71
70 cmd_cxx_o_c = $(CXX) $(cxx_flags) -c -o $@ $<
71
72quiet_cmd_cpp_i_c = CPP $@
72quiet_cmd_cpp_i_c = CPP $@
73 cmd_cpp_i_c = $(CC) $(c_flags) -E -o $@ $<
74
73 cmd_cpp_i_c = $(CC) $(c_flags) -E -o $@ $<
74
75quiet_cmd_cc_s_c = AS $@
75quiet_cmd_cc_s_c = AS $@
76 cmd_cc_s_c = $(CC) $(c_flags) -S -o $@ $<
77
76 cmd_cc_s_c = $(CC) $(c_flags) -S -o $@ $<
77
78quiet_cmd_gen = GEN $@
78quiet_cmd_gen = GEN $@
79
80# Link agregate command
81# If there's nothing to link, create empty $@ object.
79
80# Link agregate command
81# If there's nothing to link, create empty $@ object.
82quiet_cmd_ld_multi = LD $@
82quiet_cmd_ld_multi = LD $@
83 cmd_ld_multi = $(if $(strip $(obj-y)),\
84 $(LD) -r -o $@ $(filter $(obj-y),$^),rm -f $@; $(AR) rcs $@)
85
83 cmd_ld_multi = $(if $(strip $(obj-y)),\
84 $(LD) -r -o $@ $(filter $(obj-y),$^),rm -f $@; $(AR) rcs $@)
85
86quiet_cmd_host_ld_multi = HOSTLD $@
86quiet_cmd_host_ld_multi = HOSTLD $@
87 cmd_host_ld_multi = $(if $(strip $(obj-y)),\
88 $(HOSTLD) -r -o $@ $(filter $(obj-y),$^),rm -f $@; $(HOSTAR) rcs $@)
89
90ifneq ($(filter $(obj),$(hostprogs)),)
91 host = host_
92endif
93
94# Build rules

--- 68 unchanged lines hidden ---
87 cmd_host_ld_multi = $(if $(strip $(obj-y)),\
88 $(HOSTLD) -r -o $@ $(filter $(obj-y),$^),rm -f $@; $(HOSTAR) rcs $@)
89
90ifneq ($(filter $(obj),$(hostprogs)),)
91 host = host_
92endif
93
94# Build rules

--- 68 unchanged lines hidden ---