Makefile.lib (542898c5aa5c6a3179dffb1d1606884a63f75fed) | Makefile.lib (a5575df58004e8444e5a2a307407c3f1a6ecf175) |
---|---|
1# SPDX-License-Identifier: GPL-2.0 2# Backward compatibility 3asflags-y += $(EXTRA_AFLAGS) 4ccflags-y += $(EXTRA_CFLAGS) 5cppflags-y += $(EXTRA_CPPFLAGS) 6ldflags-y += $(EXTRA_LDFLAGS) 7 8# flags that take effect in current and sub directories --- 232 unchanged lines hidden (view full) --- 241# Usage: 242# $(call multi_depend, multi_used_targets, suffix_to_remove, suffix_to_add) 243define multi_depend 244$(foreach m, $(notdir $1), \ 245 $(eval $(obj)/$m: \ 246 $(addprefix $(obj)/, $(foreach s, $3, $($(m:%$(strip $2)=%$(s))))))) 247endef 248 | 1# SPDX-License-Identifier: GPL-2.0 2# Backward compatibility 3asflags-y += $(EXTRA_AFLAGS) 4ccflags-y += $(EXTRA_CFLAGS) 5cppflags-y += $(EXTRA_CPPFLAGS) 6ldflags-y += $(EXTRA_LDFLAGS) 7 8# flags that take effect in current and sub directories --- 232 unchanged lines hidden (view full) --- 241# Usage: 242# $(call multi_depend, multi_used_targets, suffix_to_remove, suffix_to_add) 243define multi_depend 244$(foreach m, $(notdir $1), \ 245 $(eval $(obj)/$m: \ 246 $(addprefix $(obj)/, $(foreach s, $3, $($(m:%$(strip $2)=%$(s))))))) 247endef 248 |
249quiet_cmd_copy = COPY $@ 250 cmd_copy = cp $< $@ 251 252# Shipped files | 249# Copy a file |
253# =========================================================================== 254# 'cp' preserves permissions. If you use it to copy a file in read-only srctree, 255# the copy would be read-only as well, leading to an error when executing the 256# rule next time. Use 'cat' instead in order to generate a writable file. | 250# =========================================================================== 251# 'cp' preserves permissions. If you use it to copy a file in read-only srctree, 252# the copy would be read-only as well, leading to an error when executing the 253# rule next time. Use 'cat' instead in order to generate a writable file. |
254quiet_cmd_copy = COPY $@ 255 cmd_copy = cat $< > $@ |
|
257 | 256 |
258quiet_cmd_shipped = SHIPPED $@ 259cmd_shipped = cat $< > $@ 260 | |
261$(obj)/%: $(src)/%_shipped | 257$(obj)/%: $(src)/%_shipped |
262 $(call cmd,shipped) | 258 $(call cmd,copy) |
263 264# Commands useful for building a boot image 265# =========================================================================== 266# 267# Use as following: 268# 269# target: source(s) FORCE 270# $(if_changed,ld/objcopy/gzip) --- 265 unchanged lines hidden --- | 259 260# Commands useful for building a boot image 261# =========================================================================== 262# 263# Use as following: 264# 265# target: source(s) FORCE 266# $(if_changed,ld/objcopy/gzip) --- 265 unchanged lines hidden --- |