Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0-only
0002 
0003 include include/config/auto.conf
0004 include $(srctree)/scripts/Kbuild.include
0005 
0006 # for c_flags
0007 include $(srctree)/scripts/Makefile.lib
0008 
0009 quiet_cmd_cc_o_c = CC      $@
0010       cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $<
0011 
0012 %.o: %.c FORCE
0013         $(call if_changed_dep,cc_o_c)
0014 
0015 targets := $(MAKECMDGOALS)
0016 
0017 # Add FORCE to the prequisites of a target to force it to be always rebuilt.
0018 # ---------------------------------------------------------------------------
0019 
0020 PHONY += FORCE
0021 FORCE:
0022 
0023 # Read all saved command lines and dependencies for the $(targets) we
0024 # may be building above, using $(if_changed{,_dep}). As an
0025 # optimization, we don't need to read them if the target does not
0026 # exist, we will rebuild anyway in that case.
0027 
0028 existing-targets := $(wildcard $(sort $(targets)))
0029 
0030 -include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd) 
0031 
0032 .PHONY: $(PHONY)