mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 05:48:05 +00:00
nmk: rules.mk -- Drop @CFLAGS_ and @ASFLAGS_ but add ability to bring them via param
Both never worked, we need to pass them as explicit parameter. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
7e2eee9e3c
commit
f4ac56c0dd
@ -3,49 +3,49 @@ ifndef ____nmk_defined__rules
|
||||
#
|
||||
# Accumulate common flags.
|
||||
define nmk-ccflags
|
||||
$(CFLAGS) $(ccflags-y) $(CFLAGS_$@)
|
||||
$(CFLAGS) $(ccflags-y)
|
||||
endef
|
||||
|
||||
define nmk-asflags
|
||||
$(CFLAGS) $(ASFLAGS) $(asflags-y) $(ASFLAGS_$@)
|
||||
$(CFLAGS) $(ASFLAGS) $(asflags-y)
|
||||
endef
|
||||
|
||||
#
|
||||
# General rules.
|
||||
define gen-rule-o-from-c-by-name
|
||||
$(1).o: $(2).c
|
||||
$(1).o: $(2).c $(3)
|
||||
$$(call msg-cc, $$@)
|
||||
$$(Q) $$(CC) -c $$(strip $$(nmk-ccflags)) $$< -o $$@
|
||||
$$(Q) $$(CC) -c $$(strip $$(nmk-ccflags)) $(4) $$< -o $$@
|
||||
endef
|
||||
define gen-rule-i-from-c-by-name
|
||||
$(1).i: $(2).c
|
||||
$(1).i: $(2).c $(3)
|
||||
$$(call msg-cc, $$@)
|
||||
$$(Q) $$(CC) -E $$(strip $$(nmk-ccflags)) $$< -o $$@
|
||||
$$(Q) $$(CC) -E $$(strip $$(nmk-ccflags)) $(4) $$< -o $$@
|
||||
endef
|
||||
define gen-rule-s-from-c-by-name
|
||||
$(1).s: $(2).c
|
||||
$(1).s: $(2).c $(3)
|
||||
$$(call msg-cc, $$@)
|
||||
$$(Q) $$(CC) -S -fverbose-asm $$(strip $$(nmk-ccflags)) $$< -o $$@
|
||||
$$(Q) $$(CC) -S -fverbose-asm $$(strip $$(nmk-ccflags)) $(4) $$< -o $$@
|
||||
endef
|
||||
define gen-rule-o-from-S-by-name
|
||||
$(1).o: $(2).S
|
||||
$(1).o: $(2).S $(3)
|
||||
$$(call msg-cc, $$@)
|
||||
$$(Q) $$(CC) -c $$(strip $$(nmk-asflags)) $$< -o $$@
|
||||
$$(Q) $$(CC) -c $$(strip $$(nmk-asflags)) $(4) $$< -o $$@
|
||||
endef
|
||||
define gen-rule-d-from-c-by-name
|
||||
$(1).d: $(2).c
|
||||
$(1).d: $(2).c $(3)
|
||||
$$(call msg-dep, $$@)
|
||||
$$(Q) $$(CC) -M -MT $$@ -MT $$(patsubst %.d,%.o,$$@) $$(strip $$(nmk-ccflags)) $$< -o $$@
|
||||
$$(Q) $$(CC) -M -MT $$@ -MT $$(patsubst %.d,%.o,$$@) $$(strip $$(nmk-ccflags)) $(4) $$< -o $$@
|
||||
endef
|
||||
define gen-rule-d-from-S-by-name
|
||||
$(1).d: $(2).S
|
||||
$(1).d: $(2).S $(3)
|
||||
$$(call msg-dep, $$@)
|
||||
$$(Q) $$(CC) -M -MT $$@ -MT $$(patsubst %.d,%.o,$$@) $$(strip $$(nmk-asflags)) $$< -o $$@
|
||||
$$(Q) $$(CC) -M -MT $$@ -MT $$(patsubst %.d,%.o,$$@) $$(strip $$(nmk-asflags)) $(4) $$< -o $$@
|
||||
endef
|
||||
define gen-rule-i-from-S-by-name
|
||||
$(1).i: $(2).S
|
||||
$(1).i: $(2).S $(3)
|
||||
$$(call msg-cc, $$@)
|
||||
$$(Q) $$(CC) -E $$(strip $$(nmk-asflags)) $$< -o $$@
|
||||
$$(Q) $$(CC) -E $$(strip $$(nmk-asflags)) $(4) $$< -o $$@
|
||||
endef
|
||||
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user