1 # SPDX-License-Identifier: GPL-2.0-only
3 include include/config/auto.conf
4 include $(srctree)/scripts/Kbuild.include
7 include $(srctree)/scripts/Makefile.lib
9 quiet_cmd_cc_o_c = CC $@
10 cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $<
13 $(call if_changed_dep,cc_o_c)
15 targets := $(MAKECMDGOALS)
17 # Add FORCE to the prequisites of a target to force it to be always rebuilt.
18 # ---------------------------------------------------------------------------
23 # Read all saved command lines and dependencies for the $(targets) we
24 # may be building above, using $(if_changed{,_dep}). As an
25 # optimization, we don't need to read them if the target does not
26 # exist, we will rebuild anyway in that case.
28 existing-targets := $(wildcard $(sort $(targets)))
30 -include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd)