From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 94CE9C55A for ; Mon, 4 May 2015 18:51:50 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 04 May 2015 09:51:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,366,1427785200"; d="scan'208";a="689697599" Received: from orsmsx104.amr.corp.intel.com ([10.22.225.131]) by orsmga001.jf.intel.com with ESMTP; 04 May 2015 09:51:49 -0700 Received: from orsmsx159.amr.corp.intel.com (10.22.240.24) by ORSMSX104.amr.corp.intel.com (10.22.225.131) with Microsoft SMTP Server (TLS) id 14.3.224.2; Mon, 4 May 2015 09:51:49 -0700 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by ORSMSX159.amr.corp.intel.com (10.22.240.24) with Microsoft SMTP Server (TLS) id 14.3.224.2; Mon, 4 May 2015 09:51:49 -0700 Received: from fmsmsx113.amr.corp.intel.com ([169.254.13.26]) by FMSMSX154.amr.corp.intel.com ([169.254.6.191]) with mapi id 14.03.0224.002; Mon, 4 May 2015 09:51:49 -0700 From: "Wiles, Keith" To: Olivier MATZ Thread-Topic: [dpdk-dev] [PATCH v6 1/2] Simplify the ifdefs in rte.app.mk. Thread-Index: AQHQhBpmvxK8iAYT4ECWrnatW34Iyp1sA5kA///s5MqAAHwygP//oFRH Date: Mon, 4 May 2015 16:51:47 +0000 Message-ID: <92F5FFC2-9CBB-42D8-BC8B-8EF717446455@intel.com> References: <1430490152-973-1-git-send-email-keith.wiles@intel.com>, <5547394E.4020609@6wind.com> , <55479175.3040101@6wind.com> In-Reply-To: <55479175.3040101@6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v6 1/2] Simplify the ifdefs in rte.app.mk. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2015 16:51:51 -0000 Sent from my iPhone > On May 4, 2015, at 8:34 AM, Olivier MATZ wrote: >=20 >=20 >=20 >> On 05/04/2015 05:09 PM, Wiles, Keith wrote: >>=20 >>=20 >> Sent from my iPhone >>=20 >>> On May 4, 2015, at 2:19 AM, Olivier MATZ wrote= : >>>=20 >>> Hi Keith, >>>=20 >>>> On 05/01/2015 04:22 PM, Keith Wiles wrote: >>>> Trying to simplify the ifdefs in rte.app.mk to make the code >>>> more readable and maintainable by moving LDLIBS variable to use >>>> the same style as LDLIBS-y being used in the rest of the code. >>>>=20 >>>> Added a new variable called EXTRA_LDLIBS to be used by example apps >>>> instead of using LDLIBS directly. The new internal variable _LDLIBS >>>> should not be used outside of the rte.app.mk file. The makefiles >>>> can still use LDLIBS, but I would suggest using EXTRA_LDLIBS instead. >>>=20 >>> Why are you suggesting to change LIBS to EXTRA_LIBS? >>> We discussed in a previous thread that EXTRA_* variables should >>> (as much as possible) be kept empty in Makefiles as it allows a >>> user to append things in them. >>>=20 >>> By the way, it would be easier to follow the different versions >>> of your patches if you add "--in-reply-to " in your >>> git-send-email command, as described in http://dpdk.org/dev >>=20 >> One more reason email handling is not working too many details and on gi= thub this would not have happened. >=20 > Sorry but that's not the debate here. I'm just suggesting that you > use --in-reply-to to help other people to review your patches. That is why I did not put it in the previous email. Sorry if I offend you i= n some way.=20 >=20 > Thanks, > Olivier >=20 >=20 >=20 >>=20 >> Regards=20 >> ++Keith >>>=20 >>> Regards, >>> Olivier >>>=20 >>>=20 >>>>=20 >>>> Signed-off-by: Keith Wiles >>>> --- >>>> examples/dpdk_qat/Makefile | 4 +- >>>> examples/vm_power_manager/Makefile | 2 +- >>>> mk/rte.app.mk | 242 +++++++++--------------------= -------- >>>> 3 files changed, 63 insertions(+), 185 deletions(-) >>>>=20 >>>> diff --git a/examples/dpdk_qat/Makefile b/examples/dpdk_qat/Makefile >>>> index f1e06a1..90ca1d3 100644 >>>> --- a/examples/dpdk_qat/Makefile >>>> +++ b/examples/dpdk_qat/Makefile >>>> @@ -77,8 +77,8 @@ else >>>> ICP_LIBRARY_PATH =3D $(ICP_ROOT)/build/libicp_qa_al.a >>>> endif >>>>=20 >>>> -LDLIBS +=3D -L$(ICP_ROOT)/build >>>> -LDLIBS +=3D $(ICP_LIBRARY_PATH) \ >>>> +EXTRA_LDLIBS +=3D -L$(ICP_ROOT)/build >>>> +EXTRA_LDLIBS +=3D $(ICP_LIBRARY_PATH) \ >>>> -lz \ >>>> -losal \ >>>> -ladf_proxy \ >>>> diff --git a/examples/vm_power_manager/Makefile b/examples/vm_power_ma= nager/Makefile >>>> index 113dbc4..8fb78d4 100644 >>>> --- a/examples/vm_power_manager/Makefile >>>> +++ b/examples/vm_power_manager/Makefile >>>> @@ -48,7 +48,7 @@ SRCS-y +=3D channel_monitor.c >>>> CFLAGS +=3D -O3 -I$(RTE_SDK)/lib/librte_power/ >>>> CFLAGS +=3D $(WERROR_FLAGS) >>>>=20 >>>> -LDLIBS +=3D -lvirt >>>> +EXTRA_LDLIBS +=3D -lvirt >>>>=20 >>>> # workaround for a gcc bug with noreturn attribute >>>> # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D12603 >>>> diff --git a/mk/rte.app.mk b/mk/rte.app.mk >>>> index 62a76ae..b8030d2 100644 >>>> --- a/mk/rte.app.mk >>>> +++ b/mk/rte.app.mk >>>> @@ -1,7 +1,7 @@ >>>> # BSD LICENSE >>>> # >>>> -# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. >>>> -# Copyright(c) 2014 6WIND S.A. >>>> +# Copyright(c) 2010-2015 Intel Corporation. All rights reserved. >>>> +# Copyright(c) 2014-2015 6WIND S.A. >>>> # All rights reserved. >>>> # >>>> # Redistribution and use in source and binary forms, with or without >>>> @@ -51,7 +51,7 @@ LDSCRIPT =3D $(RTE_LDSCRIPT) >>>> endif >>>>=20 >>>> # default path for libs >>>> -LDLIBS +=3D -L$(RTE_SDK_BIN)/lib >>>> +_LDLIBS-y +=3D -L$(RTE_SDK_BIN)/lib >>>>=20 >>>> # >>>> # Include libraries depending on config if NO_AUTOLIBS is not set >>>> @@ -59,215 +59,93 @@ LDLIBS +=3D -L$(RTE_SDK_BIN)/lib >>>> # >>>> ifeq ($(NO_AUTOLIBS),) >>>>=20 >>>> -LDLIBS +=3D --whole-archive >>>> +_LDLIBS-y +=3D --whole-archive >>>>=20 >>>> -ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),y) >>>> -LDLIBS +=3D -l$(RTE_LIBNAME) >>>> -endif >>>> +_LDLIBS-$(CONFIG_RTE_BUILD_COMBINE_LIBS) +=3D -l$(RTE_LIBNAME) >>>>=20 >>>> ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),n) >>>>=20 >>>> -ifeq ($(CONFIG_RTE_LIBRTE_DISTRIBUTOR),y) >>>> -LDLIBS +=3D -lrte_distributor >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_REORDER),y) >>>> -LDLIBS +=3D -lrte_reorder >>>> -endif >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) +=3D -lrte_distributor >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_REORDER) +=3D -lrte_reorder >>>>=20 >>>> -ifeq ($(CONFIG_RTE_LIBRTE_KNI),y) >>>> ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y) >>>> -LDLIBS +=3D -lrte_kni >>>> -endif >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_KNI) +=3D -lrte_kni >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_IVSHMEM) +=3D -lrte_ivshmem >>>> endif >>>>=20 >>>> -ifeq ($(CONFIG_RTE_LIBRTE_IVSHMEM),y) >>>> -ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y) >>>> -LDLIBS +=3D -lrte_ivshmem >>>> -endif >>>> -endif >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_PIPELINE) +=3D -lrte_pipeline >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_TABLE) +=3D -lrte_table >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_PORT) +=3D -lrte_port >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_TIMER) +=3D -lrte_timer >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_HASH) +=3D -lrte_hash >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_JOBSTATS) +=3D -lrte_jobstats >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_LPM) +=3D -lrte_lpm >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_POWER) +=3D -lrte_power >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_ACL) +=3D -lrte_acl >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_METER) +=3D -lrte_meter >>>>=20 >>>> -ifeq ($(CONFIG_RTE_LIBRTE_PIPELINE),y) >>>> -LDLIBS +=3D -lrte_pipeline >>>> -endif >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) +=3D -lrte_sched >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) +=3D -lm >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) +=3D -lrt >>>>=20 >>>> -ifeq ($(CONFIG_RTE_LIBRTE_TABLE),y) >>>> -LDLIBS +=3D -lrte_table >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_PORT),y) >>>> -LDLIBS +=3D -lrte_port >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_TIMER),y) >>>> -LDLIBS +=3D -lrte_timer >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_HASH),y) >>>> -LDLIBS +=3D -lrte_hash >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_JOBSTATS),y) >>>> -LDLIBS +=3D -lrte_jobstats >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_LPM),y) >>>> -LDLIBS +=3D -lrte_lpm >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_POWER),y) >>>> -LDLIBS +=3D -lrte_power >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_ACL),y) >>>> -LDLIBS +=3D -lrte_acl >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_METER),y) >>>> -LDLIBS +=3D -lrte_meter >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_SCHED),y) >>>> -LDLIBS +=3D -lrte_sched >>>> -LDLIBS +=3D -lm >>>> -LDLIBS +=3D -lrt >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_VHOST), y) >>>> -LDLIBS +=3D -lrte_vhost >>>> -endif >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) +=3D -lrte_vhost >>>>=20 >>>> endif # ! CONFIG_RTE_BUILD_COMBINE_LIBS >>>>=20 >>>> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y) >>>> -LDLIBS +=3D -lpcap >>>> -endif >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) +=3D -lpcap >>>>=20 >>>> -ifeq ($(CONFIG_RTE_LIBRTE_VHOST)$(CONFIG_RTE_LIBRTE_VHOST_USER),yn) >>>> -LDLIBS +=3D -lfuse >>>> +ifeq ($(CONFIG_RTE_LIBRTE_VHOST_USER),n) >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) +=3D -lfuse >>>> endif >>>>=20 >>>> -ifeq ($(CONFIG_RTE_LIBRTE_MLX4_PMD),y) >>>> -LDLIBS +=3D -libverbs >>>> -endif >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) +=3D -libverbs >>>>=20 >>>> -LDLIBS +=3D --start-group >>>> +_LDLIBS-y +=3D --start-group >>>>=20 >>>> ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),n) >>>>=20 >>>> -ifeq ($(CONFIG_RTE_LIBRTE_KVARGS),y) >>>> -LDLIBS +=3D -lrte_kvargs >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_MBUF),y) >>>> -LDLIBS +=3D -lrte_mbuf >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_IP_FRAG),y) >>>> -LDLIBS +=3D -lrte_ip_frag >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_ETHER),y) >>>> -LDLIBS +=3D -lethdev >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_MALLOC),y) >>>> -LDLIBS +=3D -lrte_malloc >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_MEMPOOL),y) >>>> -LDLIBS +=3D -lrte_mempool >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_RING),y) >>>> -LDLIBS +=3D -lrte_ring >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_EAL),y) >>>> -LDLIBS +=3D -lrte_eal >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_CMDLINE),y) >>>> -LDLIBS +=3D -lrte_cmdline >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_CFGFILE),y) >>>> -LDLIBS +=3D -lrte_cfgfile >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_BOND),y) >>>> -LDLIBS +=3D -lrte_pmd_bond >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_XENVIRT),y) >>>> -LDLIBS +=3D -lrte_pmd_xenvirt >>>> -LDLIBS +=3D -lxenstore >>>> -endif >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_KVARGS) +=3D -lrte_kvargs >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_MBUF) +=3D -lrte_mbuf >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_IP_FRAG) +=3D -lrte_ip_frag >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_ETHER) +=3D -lethdev >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_MALLOC) +=3D -lrte_malloc >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_MEMPOOL) +=3D -lrte_mempool >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_RING) +=3D -lrte_ring >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_EAL) +=3D -lrte_eal >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_CMDLINE) +=3D -lrte_cmdline >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_CFGFILE) +=3D -lrte_cfgfile >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BOND) +=3D -lrte_pmd_bond >>>> + >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) +=3D -lrte_pmd_xenvirt >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) +=3D -lxenstore >>>>=20 >>>> ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n) >>>> # plugins (link only if static libraries) >>>>=20 >>>> -ifeq ($(CONFIG_RTE_LIBRTE_VMXNET3_PMD),y) >>>> -LDLIBS +=3D -lrte_pmd_vmxnet3_uio >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_VIRTIO_PMD),y) >>>> -LDLIBS +=3D -lrte_pmd_virtio >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_ENIC_PMD),y) >>>> -LDLIBS +=3D -lrte_pmd_enic >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_I40E_PMD),y) >>>> -LDLIBS +=3D -lrte_pmd_i40e >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_FM10K_PMD),y) >>>> -LDLIBS +=3D -lrte_pmd_fm10k >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_IXGBE_PMD),y) >>>> -LDLIBS +=3D -lrte_pmd_ixgbe >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_E1000_PMD),y) >>>> -LDLIBS +=3D -lrte_pmd_e1000 >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_MLX4_PMD),y) >>>> -LDLIBS +=3D -lrte_pmd_mlx4 >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_RING),y) >>>> -LDLIBS +=3D -lrte_pmd_ring >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y) >>>> -LDLIBS +=3D -lrte_pmd_pcap >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_AF_PACKET),y) >>>> -LDLIBS +=3D -lrte_pmd_af_packet >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_NULL),y) >>>> -LDLIBS +=3D -lrte_pmd_null >>>> -endif >>>> - >>>> -endif # plugins >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) +=3D -lrte_pmd_vmxnet3_ui= o >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) +=3D -lrte_pmd_virtio >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) +=3D -lrte_pmd_enic >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_I40E_PMD) +=3D -lrte_pmd_i40e >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) +=3D -lrte_pmd_fm10k >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) +=3D -lrte_pmd_ixgbe >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_E1000_PMD) +=3D -lrte_pmd_e1000 >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) +=3D -lrte_pmd_mlx4 >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_RING) +=3D -lrte_pmd_ring >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) +=3D -lrte_pmd_pcap >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) +=3D -lrte_pmd_af_packet >>>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL) +=3D -lrte_pmd_null >>>> + >>>> +endif # ! $(CONFIG_RTE_BUILD_SHARED_LIB) >>>>=20 >>>> endif # ! CONFIG_RTE_BUILD_COMBINE_LIBS >>>>=20 >>>> -LDLIBS +=3D $(EXECENV_LDLIBS) >>>> - >>>> -LDLIBS +=3D --end-group >>>> - >>>> -LDLIBS +=3D --no-whole-archive >>>> +_LDLIBS-y +=3D $(EXECENV_LDLIBS) >>>> +_LDLIBS-y +=3D --end-group >>>> +_LDLIBS-y +=3D --no-whole-archive >>>>=20 >>>> endif # ifeq ($(NO_AUTOLIBS),) >>>>=20 >>>> -LDLIBS +=3D $(CPU_LDLIBS) >>>> +LDLIBS +=3D $(_LDLIBS-y) $(EXTRA_LDLIBS) >>>>=20 >>>> .PHONY: all >>>> all: install >>>>=20