summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorIntel <intel.com>2012-12-20 00:00:00 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2013-07-25 15:01:57 +0200
commit2656baa8b78caf115213b9c4abdc2e296c5ed227 (patch)
tree02f0ac4e1df7bf9d5fe8a057b0ff8f86427eec40 /mk
parentf4133fefcdd869187cf62cde4c9a887a7bd2ff4b (diff)
downloaddpdk-2656baa8b78caf115213b9c4abdc2e296c5ed227.zip
dpdk-2656baa8b78caf115213b9c4abdc2e296c5ed227.tar.gz
dpdk-2656baa8b78caf115213b9c4abdc2e296c5ed227.tar.xz
mk: various updates
Signed-off-by: Intel
Diffstat (limited to 'mk')
-rw-r--r--mk/rte.module.mk2
-rw-r--r--mk/rte.sdkconfig.mk13
-rw-r--r--mk/target/generic/rte.vars.mk4
3 files changed, 13 insertions, 6 deletions
diff --git a/mk/rte.module.mk b/mk/rte.module.mk
index 277fc4e..14b6fd0 100644
--- a/mk/rte.module.mk
+++ b/mk/rte.module.mk
@@ -72,7 +72,7 @@ build: _postbuild
# Link all sources in build directory
%_link: FORCE
$(if $(call compare,$(notdir $*),$*),\
- @if [ ! -f $(notdir $(*)) ]; then ln -nfs $(*) . ; fi,\
+ @if [ ! -f $(notdir $(*)) ]; then ln -nfs $(SRCDIR)/$(*) . ; fi,\
@if [ ! -f $(notdir $(*)) ]; then ln -nfs $(SRCDIR)/$(*) . ; fi)
# build module
diff --git a/mk/rte.sdkconfig.mk b/mk/rte.sdkconfig.mk
index 1334f63..ef22a98 100644
--- a/mk/rte.sdkconfig.mk
+++ b/mk/rte.sdkconfig.mk
@@ -55,9 +55,16 @@ else
$(RTE_OUTPUT)/.config: $(RTE_CONFIG_TEMPLATE) FORCE
@[ -d $(RTE_OUTPUT) ] || mkdir -p $(RTE_OUTPUT)
$(Q)if [ "$(RTE_CONFIG_TEMPLATE)" != "" -a -f "$(RTE_CONFIG_TEMPLATE)" ]; then \
- if ! cmp -s $(RTE_CONFIG_TEMPLATE) $(RTE_OUTPUT)/.config; then \
- cp $(RTE_CONFIG_TEMPLATE) $(RTE_OUTPUT)/.config ; \
+ if grep -q '#include' $(RTE_CONFIG_TEMPLATE) ; then \
+ $(CPP) -undef -C -P -x assembler-with-cpp -fdirectives-only \
+ -o $(RTE_OUTPUT)/.config_tmp $(RTE_CONFIG_TEMPLATE) ; \
+ else \
+ cp $(RTE_CONFIG_TEMPLATE) $(RTE_OUTPUT)/.config_tmp ; \
fi ; \
+ if ! cmp -s $(RTE_OUTPUT)/.config_tmp $(RTE_OUTPUT)/.config; then \
+ cp $(RTE_OUTPUT)/.config_tmp $(RTE_OUTPUT)/.config ; \
+ fi ; \
+ rm -f $(RTE_OUTPUT)/.config_tmp ; \
else \
echo -n "No template specified. Use T=template " ; \
echo "among the following list:" ; \
@@ -83,7 +90,7 @@ $(RTE_OUTPUT)/Makefile:
$(RTE_OUTPUT)/include/rte_config.h: $(RTE_OUTPUT)/.config
$(Q)rm -rf $(RTE_OUTPUT)/include $(RTE_OUTPUT)/app \
$(RTE_OUTPUT)/hostapp $(RTE_OUTPUT)/lib \
- $(RTE_OUTPUT)/hostlib
+ $(RTE_OUTPUT)/hostlib $(RTE_OUTPUT)/kmod $(RTE_OUTPUT)/build
@[ -d $(RTE_OUTPUT)/include ] || mkdir -p $(RTE_OUTPUT)/include
$(Q)$(RTE_SDK)/scripts/gen-config-h.sh $(RTE_OUTPUT)/.config \
> $(RTE_OUTPUT)/include/rte_config.h
diff --git a/mk/target/generic/rte.vars.mk b/mk/target/generic/rte.vars.mk
index 7c40898..2f77d85 100644
--- a/mk/target/generic/rte.vars.mk
+++ b/mk/target/generic/rte.vars.mk
@@ -127,7 +127,7 @@ ifeq ($(BUILDING_RTE_SDK),1)
# building sdk
CFLAGS += -include $(RTE_OUTPUT)/include/rte_config.h
ifeq ($(CONFIG_RTE_INSECURE_FUNCTION_WARNING),y)
-CFLAGS += -include $(RTE_OUTPUT)/include/rte_warnings.h
+CFLAGS += -include rte_warnings.h
endif
else
# if we are building an external application, include SDK's lib and
@@ -138,7 +138,7 @@ CFLAGS += -include $(RTE_OUTPUT)/include/rte_config.h
endif
CFLAGS += -include $(RTE_SDK_BIN)/include/rte_config.h
ifeq ($(CONFIG_RTE_INSECURE_FUNCTION_WARNING),y)
-CFLAGS += -include $(RTE_SDK_BIN)/include/rte_warnings.h
+CFLAGS += -include rte_warnings.h
endif
LDFLAGS += -L$(RTE_SDK_BIN)/lib
endif