Commit 90284132 authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Pavel Emelyanov

make: propagate config DEFINES in CFLAGS

The problem:
$(DEFINES) array added to $(CFLAGS) in a global Makefile.
But, in criu/Makefile we include Makefile.config, which
adds feature-based config options to $(DEFINES).
We need to propagate this new defines again to CFLAGS array.

Previously, I added:
ccflags-y		+= $(DEFINES)
to Makefile.crtools, but those $(DEFINES) are useful not only
in the crtools makefile.

Let's just propagate this feature defines to CFLAGS and DEFINES
in place.

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Reviewed-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Acked-by: 's avatarAndrew Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 1d72d801
......@@ -3,15 +3,18 @@ include $(__nmk_dir)msg.mk
include $(SRC_DIR)/scripts/feature-tests.mak
ifeq ($(call try-cc,$(FEATURE_TEST_LIBBSD_DEV),-lbsd),true)
LIBS += -lbsd
DEFINES += -DCONFIG_HAS_LIBBSD
LIBS += -lbsd
FEATURE_DEFINES += -DCONFIG_HAS_LIBBSD
endif
ifeq ($(call pkg-config-check,libselinux),y)
LIBS += -lselinux
DEFINES += -DCONFIG_HAS_SELINUX
LIBS += -lselinux
FEATURE_DEFINES += -DCONFIG_HAS_SELINUX
endif
export DEFINES += $(FEATURE_DEFINES)
export CFLAGS += $(FEATURE_DEFINES)
FEATURES_LIST := TCP_REPAIR STRLCPY STRLCAT PTRACE_PEEKSIGINFO \
SETPROCTITLE_INIT MEMFD TCP_REPAIR_WINDOW
......
ccflags-y += -iquote criu/$(ARCH)
ccflags-y += $(DEFINES)
obj-y += action-scripts.o
obj-y += aio.o
obj-y += bfd.o
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment