mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 10:16:41 +00:00
In case if CFLAGS is overriden from command line we don't see our headers anymore. So provide mandatory options in ccflags-y variable to fix that. https://bugzilla.openvz.org/show_bug.cgi?id=2521 Reported-by: Jan Engelhardt <jengelh@inai.de> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Tested-by: Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
52 lines
1.2 KiB
Text
52 lines
1.2 KiB
Text
##
|
|
##
|
|
## These are per-file generators.
|
|
##
|
|
define gen-rule-o-from-c-by-name
|
|
$(1).o: $(1).c
|
|
$$(E) " CC " $$@
|
|
$$(Q) $$(CC) -c $$(CFLAGS) $$(cflags-y) $(2) $$< -o $$@
|
|
endef
|
|
|
|
define gen-rule-i-from-c-by-name
|
|
$(1).i: $(1).c
|
|
$$(E) " CC " $$@
|
|
$$(Q) $$(CC) -E $$(CFLAGS) $$(cflags-y) $(2) $$< -o $$@
|
|
endef
|
|
|
|
define gen-rule-s-from-c-by-name
|
|
$(1).s: $(1).c
|
|
$$(E) " CC " $$@
|
|
$$(Q) $$(CC) -S $$(CFLAGS) $$(cflags-y) $(2) -fverbose-asm $$< -o $$@
|
|
endef
|
|
|
|
define gen-rule-o-from-S-by-name
|
|
$(1).o: $(1).S
|
|
$$(E) " CC " $$@
|
|
$$(Q) $$(CC) -c $$(CFLAGS) $$(cflags-y) $(2) $$(ASMFLAGS) $(3) $$< -o $$@
|
|
endef
|
|
|
|
define gen-rule-d-from-c-by-name
|
|
$(1).d: $(1).c
|
|
$$(E) " DEP " $$@
|
|
$$(Q) $$(CC) -M -MT $$@ -MT $$(patsubst %.d,%.o,$$@) $$(CFLAGS) $$(cflags-y) $(2) $$< -o $$@
|
|
endef
|
|
|
|
define gen-rule-d-from-S-by-name
|
|
$(1).d: $(1).S
|
|
$$(E) " DEP " $$@
|
|
$$(Q) $$(CC) -M -MT $$@ -MT $$(patsubst %.d,%.o,$$@) $$(CFLAGS) $$(cflags-y) $(2) $$< -o $$@
|
|
endef
|
|
|
|
define gen-rule-i-from-S-by-name
|
|
$(1).i: $(1).S
|
|
$$(E) " CC " $$@
|
|
$$(Q) $$(CC) -E $$(CFLAGS) $$(cflags-y) $(2) $$< -o $$@
|
|
endef
|
|
|
|
##
|
|
## In case if someone add last resort rule
|
|
## together with .SUFFIXES not cleaned, this
|
|
## will slow down the build procedure
|
|
scripts/Makefile.rules::
|
|
@echo > /dev/null
|