From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by dpdk.org (Postfix) with ESMTP id 1EDF45694 for ; Wed, 13 May 2015 09:41:06 +0200 (CEST) Received: by wicmc15 with SMTP id mc15so71645846wic.1 for ; Wed, 13 May 2015 00:41:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=5bzb7AeTJR7X2nlIcvfwj/0kBFzZ0+3GJo/G97mHkkA=; b=VyeExQPg8L4JNRyb0W4lR2O8TDrRPyUzu9UkmPSG3O9XuT58dUR0AIXTkAXp82bU5e cBHhSLnlqBtQNT/nNEKO2PINxxxhZEBw7vUvnzkGSgxYwXn/neIT1XaqaTOdzYiDZQ97 z9Umy5N/it61SUaYb+NksoyaaUv6mfFH3H09jokcrvEKGYWqNAGPRYO51+mivIMkn+KQ 1g9Z2+bxkx8jZcWJ3N5yRiTuI+p2L4ernBBF+Te0o5q3R5QtCTE/QIKcD8aUH2OjBNjm Rf2pBhQm1bSYF25xYLS2F2rUR37sa+iNYC/r3l5So27lFSk3YH/tfBYKpyTn0TXkJsPS nc3Q== X-Gm-Message-State: ALoCoQm1uPeFQ8jlKGDEeeiDsLTQwnaGBebJr7GfbDMRvooJXgWmQmaVAm6JyJ4oSlrF2MlkJkHz X-Received: by 10.180.82.135 with SMTP id i7mr37739515wiy.68.1431502865932; Wed, 13 May 2015 00:41:05 -0700 (PDT) Received: from [10.16.0.195] (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id df1sm6602364wib.12.2015.05.13.00.41.03 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 May 2015 00:41:05 -0700 (PDT) Message-ID: <5553000D.3030004@6wind.com> Date: Wed, 13 May 2015 09:41:01 +0200 From: Olivier MATZ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.6.0 MIME-Version: 1.0 To: Keith Wiles , dev@dpdk.org References: <1431386066-6147-1-git-send-email-keith.wiles@intel.com> <1431457872-10345-1-git-send-email-keith.wiles@intel.com> In-Reply-To: <1431457872-10345-1-git-send-email-keith.wiles@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v8 1/2] mk: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: Wed, 13 May 2015 07:41:06 -0000 Hi, On 05/12/2015 09:11 PM, Keith Wiles wrote: > 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. The new internal variable _LDLIBS should > not be used outside of the rte.app.mk file. > > Signed-off-by: Keith Wiles > --- > mk/rte.app.mk | 242 +++++++++++++++------------------------------------------- > 1 file changed, 60 insertions(+), 182 deletions(-) > > 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 = $(RTE_LDSCRIPT) > endif > > # default path for libs > -LDLIBS += -L$(RTE_SDK_BIN)/lib > +_LDLIBS-y += -L$(RTE_SDK_BIN)/lib > > # > # Include libraries depending on config if NO_AUTOLIBS is not set > @@ -59,215 +59,93 @@ LDLIBS += -L$(RTE_SDK_BIN)/lib > # > ifeq ($(NO_AUTOLIBS),) > > -LDLIBS += --whole-archive > +_LDLIBS-y += --whole-archive > > -ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),y) > -LDLIBS += -l$(RTE_LIBNAME) > -endif > +_LDLIBS-$(CONFIG_RTE_BUILD_COMBINE_LIBS) += -l$(RTE_LIBNAME) > > ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),n) > > -ifeq ($(CONFIG_RTE_LIBRTE_DISTRIBUTOR),y) > -LDLIBS += -lrte_distributor > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_REORDER),y) > -LDLIBS += -lrte_reorder > -endif > +_LDLIBS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) += -lrte_distributor > +_LDLIBS-$(CONFIG_RTE_LIBRTE_REORDER) += -lrte_reorder > > -ifeq ($(CONFIG_RTE_LIBRTE_KNI),y) > ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y) > -LDLIBS += -lrte_kni > -endif > +_LDLIBS-$(CONFIG_RTE_LIBRTE_KNI) += -lrte_kni > +_LDLIBS-$(CONFIG_RTE_LIBRTE_IVSHMEM) += -lrte_ivshmem > endif > > -ifeq ($(CONFIG_RTE_LIBRTE_IVSHMEM),y) > -ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y) > -LDLIBS += -lrte_ivshmem > -endif > -endif > +_LDLIBS-$(CONFIG_RTE_LIBRTE_PIPELINE) += -lrte_pipeline > +_LDLIBS-$(CONFIG_RTE_LIBRTE_TABLE) += -lrte_table > +_LDLIBS-$(CONFIG_RTE_LIBRTE_PORT) += -lrte_port > +_LDLIBS-$(CONFIG_RTE_LIBRTE_TIMER) += -lrte_timer > +_LDLIBS-$(CONFIG_RTE_LIBRTE_HASH) += -lrte_hash > +_LDLIBS-$(CONFIG_RTE_LIBRTE_JOBSTATS) += -lrte_jobstats > +_LDLIBS-$(CONFIG_RTE_LIBRTE_LPM) += -lrte_lpm > +_LDLIBS-$(CONFIG_RTE_LIBRTE_POWER) += -lrte_power > +_LDLIBS-$(CONFIG_RTE_LIBRTE_ACL) += -lrte_acl > +_LDLIBS-$(CONFIG_RTE_LIBRTE_METER) += -lrte_meter > > -ifeq ($(CONFIG_RTE_LIBRTE_PIPELINE),y) > -LDLIBS += -lrte_pipeline > -endif > +_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lrte_sched > +_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lm > +_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lrt > > -ifeq ($(CONFIG_RTE_LIBRTE_TABLE),y) > -LDLIBS += -lrte_table > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_PORT),y) > -LDLIBS += -lrte_port > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_TIMER),y) > -LDLIBS += -lrte_timer > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_HASH),y) > -LDLIBS += -lrte_hash > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_JOBSTATS),y) > -LDLIBS += -lrte_jobstats > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_LPM),y) > -LDLIBS += -lrte_lpm > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_POWER),y) > -LDLIBS += -lrte_power > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_ACL),y) > -LDLIBS += -lrte_acl > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_METER),y) > -LDLIBS += -lrte_meter > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_SCHED),y) > -LDLIBS += -lrte_sched > -LDLIBS += -lm > -LDLIBS += -lrt > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_VHOST), y) > -LDLIBS += -lrte_vhost > -endif > +_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lrte_vhost > > endif # ! CONFIG_RTE_BUILD_COMBINE_LIBS > > -ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y) > -LDLIBS += -lpcap > -endif > +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += -lpcap > > -ifeq ($(CONFIG_RTE_LIBRTE_VHOST)$(CONFIG_RTE_LIBRTE_VHOST_USER),yn) > -LDLIBS += -lfuse > +ifeq ($(CONFIG_RTE_LIBRTE_VHOST_USER),n) > +_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lfuse > endif > > -ifeq ($(CONFIG_RTE_LIBRTE_MLX4_PMD),y) > -LDLIBS += -libverbs > -endif > +_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += -libverbs > > -LDLIBS += --start-group > +_LDLIBS-y += --start-group > > ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),n) > > -ifeq ($(CONFIG_RTE_LIBRTE_KVARGS),y) > -LDLIBS += -lrte_kvargs > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_MBUF),y) > -LDLIBS += -lrte_mbuf > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_IP_FRAG),y) > -LDLIBS += -lrte_ip_frag > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_ETHER),y) > -LDLIBS += -lethdev > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_MALLOC),y) > -LDLIBS += -lrte_malloc > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_MEMPOOL),y) > -LDLIBS += -lrte_mempool > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_RING),y) > -LDLIBS += -lrte_ring > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_EAL),y) > -LDLIBS += -lrte_eal > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_CMDLINE),y) > -LDLIBS += -lrte_cmdline > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_CFGFILE),y) > -LDLIBS += -lrte_cfgfile > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_PMD_BOND),y) > -LDLIBS += -lrte_pmd_bond > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_PMD_XENVIRT),y) > -LDLIBS += -lrte_pmd_xenvirt > -LDLIBS += -lxenstore > -endif > +_LDLIBS-$(CONFIG_RTE_LIBRTE_KVARGS) += -lrte_kvargs > +_LDLIBS-$(CONFIG_RTE_LIBRTE_MBUF) += -lrte_mbuf > +_LDLIBS-$(CONFIG_RTE_LIBRTE_IP_FRAG) += -lrte_ip_frag > +_LDLIBS-$(CONFIG_RTE_LIBRTE_ETHER) += -lethdev > +_LDLIBS-$(CONFIG_RTE_LIBRTE_MALLOC) += -lrte_malloc > +_LDLIBS-$(CONFIG_RTE_LIBRTE_MEMPOOL) += -lrte_mempool > +_LDLIBS-$(CONFIG_RTE_LIBRTE_RING) += -lrte_ring > +_LDLIBS-$(CONFIG_RTE_LIBRTE_EAL) += -lrte_eal > +_LDLIBS-$(CONFIG_RTE_LIBRTE_CMDLINE) += -lrte_cmdline > +_LDLIBS-$(CONFIG_RTE_LIBRTE_CFGFILE) += -lrte_cfgfile > +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += -lrte_pmd_bond > + > +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += -lrte_pmd_xenvirt > +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += -lxenstore > > ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n) > # plugins (link only if static libraries) > > -ifeq ($(CONFIG_RTE_LIBRTE_VMXNET3_PMD),y) > -LDLIBS += -lrte_pmd_vmxnet3_uio > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_VIRTIO_PMD),y) > -LDLIBS += -lrte_pmd_virtio > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_ENIC_PMD),y) > -LDLIBS += -lrte_pmd_enic > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_I40E_PMD),y) > -LDLIBS += -lrte_pmd_i40e > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_FM10K_PMD),y) > -LDLIBS += -lrte_pmd_fm10k > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_IXGBE_PMD),y) > -LDLIBS += -lrte_pmd_ixgbe > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_E1000_PMD),y) > -LDLIBS += -lrte_pmd_e1000 > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_MLX4_PMD),y) > -LDLIBS += -lrte_pmd_mlx4 > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_PMD_RING),y) > -LDLIBS += -lrte_pmd_ring > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y) > -LDLIBS += -lrte_pmd_pcap > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_PMD_AF_PACKET),y) > -LDLIBS += -lrte_pmd_af_packet > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_PMD_NULL),y) > -LDLIBS += -lrte_pmd_null > -endif > - > -endif # plugins > +_LDLIBS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += -lrte_pmd_vmxnet3_uio > +_LDLIBS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += -lrte_pmd_virtio > +_LDLIBS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += -lrte_pmd_enic > +_LDLIBS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += -lrte_pmd_i40e > +_LDLIBS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += -lrte_pmd_fm10k > +_LDLIBS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += -lrte_pmd_ixgbe > +_LDLIBS-$(CONFIG_RTE_LIBRTE_E1000_PMD) += -lrte_pmd_e1000 > +_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += -lrte_pmd_mlx4 > +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_RING) += -lrte_pmd_ring > +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += -lrte_pmd_pcap > +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += -lrte_pmd_af_packet > +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += -lrte_pmd_null > + > +endif # ! $(CONFIG_RTE_BUILD_SHARED_LIB) > > endif # ! CONFIG_RTE_BUILD_COMBINE_LIBS > > -LDLIBS += $(EXECENV_LDLIBS) > - > -LDLIBS += --end-group > - > -LDLIBS += --no-whole-archive > +_LDLIBS-y += $(EXECENV_LDLIBS) > +_LDLIBS-y += --end-group > +_LDLIBS-y += --no-whole-archive > > endif # ifeq ($(NO_AUTOLIBS),) > > -LDLIBS += $(CPU_LDLIBS) > +LDLIBS += $(_LDLIBS-y) $(EXTRA_LDLIBS) > As discussed in the previous mail, all things that are about EXTRA_LDLIBS should be moved in the second patch. Therefore, the title of the second patch should not be "update doc...", but something like "mk: introduce EXTRA_LDLIBS...". By the way, I missed that before, but it seems that your patch removes CPU_LDLIBS, I don't think it's correct. Regards, Olivier > .PHONY: all > all: install >