From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 9EED2C676 for ; Tue, 28 Apr 2015 18:50:39 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 28 Apr 2015 09:50:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,664,1422950400"; d="scan'208";a="702222735" Received: from orsmsx102.amr.corp.intel.com ([10.22.225.129]) by fmsmga001.fm.intel.com with ESMTP; 28 Apr 2015 09:50:38 -0700 Received: from orsmsx152.amr.corp.intel.com (10.22.226.39) by ORSMSX102.amr.corp.intel.com (10.22.225.129) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 28 Apr 2015 09:50:38 -0700 Received: from fmsmsx107.amr.corp.intel.com (10.18.124.205) by ORSMSX152.amr.corp.intel.com (10.22.226.39) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 28 Apr 2015 09:50:37 -0700 Received: from fmsmsx113.amr.corp.intel.com ([169.254.13.26]) by fmsmsx107.amr.corp.intel.com ([169.254.6.205]) with mapi id 14.03.0224.002; Tue, 28 Apr 2015 09:50:37 -0700 From: "Wiles, Keith" To: "Gonzalez Monroy, Sergio" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [RFC PATCH] Simplify the ifdefs in rte.app.mk. Thread-Index: AQHQgcdPfwe8z2shQ0ildd5QAAN8QJ1jEZ2A//+zQIA= Date: Tue, 28 Apr 2015 16:50:36 +0000 Message-ID: References: <1430234463-9574-1-git-send-email-keith.wiles@intel.com> <553FB46D.9030609@intel.com> In-Reply-To: <553FB46D.9030609@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.252.204.210] Content-Type: text/plain; charset="us-ascii" Content-ID: <2625D59C97ED9946AA03604EF3C74742@intel.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [RFC PATCH] 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: Tue, 28 Apr 2015 16:50:40 -0000 Hi Sergio On 4/28/15, 11:25 AM, "Gonzalez Monroy, Sergio" wrote: >On 28/04/2015 16:21, 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. >> >> Signed-off-by: Keith Wiles >> --- >+1 > >Patch looks good, just a few nits: >> mk/rte.app.mk | 253 >>++++++++++++++---------------------------------------- >> mk/rte.hostapp.mk | 4 +- >> mk/rte.shared.mk | 12 +-- >> 3 files changed, 74 insertions(+), 195 deletions(-) >> >> diff --git a/mk/rte.app.mk b/mk/rte.app.mk >> index 62a76ae..af38975 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) 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 >I think we should keep the current value of LDLIBS. >Some apps (ie. examples/dpdk_qat ) preset LDLIBS before including >rte.app.mk. I just modified the example apps to use a new VARIABLE called EXTRA_LDLIBS instead and added it towards the bottom of rte.app.mk. I think adding the EXTRA_LDLIBS is the right solution instead of using LDLIBS IMO. > >> # >> # Include libraries depending on config if NO_AUTOLIBS is not set >> @@ -59,215 +59,94 @@ 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 >I think here is missing $( before CONFIG. Ooops :-) > >> 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 >> - >> -ifeq ($(CONFIG_RTE_LIBRTE_KNI),y) >> -ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y) >> -LDLIBS +=3D -lrte_kni >> -endif >> -endif >> - >> -ifeq ($(CONFIG_RTE_LIBRTE_IVSHMEM),y) >> -ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y) >> -LDLIBS +=3D -lrte_ivshmem >> -endif >> -endif >> - >> -ifeq ($(CONFIG_RTE_LIBRTE_PIPELINE),y) >> -LDLIBS +=3D -lrte_pipeline >> -endif >> - >> -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 >> +LDLIBS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) +=3D -lrte_distributor >> +LDLIBS-$(CONFIG_RTE_LIBRTE_REORDER) +=3D -lrte_reorder >> =20 >> -ifeq ($(CONFIG_RTE_LIBRTE_ACL),y) >> -LDLIBS +=3D -lrte_acl >> +ifeq ($( CONFIG_RTE_EXEC_ENV_LINUXAPP),y) >> +LDLIBS-$(CONFIG_RTE_LIBRTE_KNI) +=3D -lrte_kni >> +LDLIBS-$(CONFIG_RTE_LIBRTE_IVSHMEM) +=3D -lrte_ivshmem >> endif >> =20 >> -ifeq ($(CONFIG_RTE_LIBRTE_METER),y) >> -LDLIBS +=3D -lrte_meter >> -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_SCHED),y) >> -LDLIBS +=3D -lrte_sched >> -LDLIBS +=3D -lm >> -LDLIBS +=3D -lrt >> -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_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 >> +LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) +=3D -lfuse >> endif >We could remove $(CONFIG_RTE_LIBRTE_VHOST) from the ifeq. OK, fine with me. > >> =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 >> +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 >> =20 >> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_BOND),y) >> -LDLIBS +=3D -lrte_pmd_bond >> -endif >> +LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) +=3D -lrte_pmd_xenvirt >> +LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) +=3D -lxenstore >> =20 >> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_XENVIRT),y) >> -LDLIBS +=3D -lrte_pmd_xenvirt >> -LDLIBS +=3D -lxenstore >> -endif >> =20 >> ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n) >> -# plugins (link only if static libraries) >> - >> -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 >> =20 >> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_NULL),y) >> -LDLIBS +=3D -lrte_pmd_null >> -endif >> - >> -endif # plugins >> +# plugins (link only if static libraries) >> +LDLIBS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) +=3D -lrte_pmd_vmxnet3_uio >> +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-y +=3D $(CPU_LDLIBS) >> =20 >> .PHONY: all >> all: install >> @@ -286,10 +165,10 @@ ifeq ($(LINK_USING_CC),1) >> override EXTRA_LDFLAGS :=3D $(call linkerprefix,$(EXTRA_LDFLAGS)) >> O_TO_EXE =3D $(CC) $(CFLAGS) $(LDFLAGS_$(@)) \ >> -Wl,-Map=3D$(@).map,--cref -o $@ $(OBJS-y) $(call >>linkerprefix,$(LDFLAGS)) \ >> - $(EXTRA_LDFLAGS) $(call linkerprefix,$(LDLIBS)) >> + $(EXTRA_LDFLAGS) $(call linkerprefix,$(LDLIBS-y)) >> else >> O_TO_EXE =3D $(LD) $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \ >> - -Map=3D$(@).map --cref -o $@ $(OBJS-y) $(LDLIBS) >> + -Map=3D$(@).map --cref -o $@ $(OBJS-y) $(LDLIBS-y) >> endif >> O_TO_EXE_STR =3D $(subst ','\'',$(O_TO_EXE)) #'# fix syntax highlight >> O_TO_EXE_DISP =3D $(if $(V),"$(O_TO_EXE_STR)"," LD $(@)") >> @@ -302,12 +181,12 @@ O_TO_EXE_DO =3D @set -e; \ >> -include .$(APP).cmd >> =20 >> # path where libraries are retrieved >> -LDLIBS_PATH :=3D $(subst -Wl$(comma)-L,,$(filter >>-Wl$(comma)-L%,$(LDLIBS))) >> -LDLIBS_PATH +=3D $(subst -L,,$(filter -L%,$(LDLIBS))) >> +LDLIBS_PATH :=3D $(subst -Wl$(comma)-L,,$(filter >>-Wl$(comma)-L%,$(LDLIBS-y))) >> +LDLIBS_PATH +=3D $(subst -L,,$(filter -L%,$(LDLIBS-y))) >> =20 >> # list of .a files that are linked to this application >> -LDLIBS_NAMES :=3D $(patsubst -l%,lib%.a,$(filter -l%,$(LDLIBS))) >> -LDLIBS_NAMES +=3D $(patsubst -Wl$(comma)-l%,lib%.a,$(filter >>-Wl$(comma)-l%,$(LDLIBS))) >> +LDLIBS_NAMES :=3D $(patsubst -l%,lib%.a,$(filter -l%,$(LDLIBS-y))) >> +LDLIBS_NAMES +=3D $(patsubst -Wl$(comma)-l%,lib%.a,$(filter >>-Wl$(comma)-l%,$(LDLIBS-y))) >> =20 >> # list of found libraries files (useful for deps). If not found, the >> # library is silently ignored and dep won't be checked >> diff --git a/mk/rte.hostapp.mk b/mk/rte.hostapp.mk >> index c44d0f8..51e8c1d 100644 >> --- a/mk/rte.hostapp.mk >> +++ b/mk/rte.hostapp.mk >> @@ -58,7 +58,7 @@ build: _postbuild >> exe2cmd =3D $(strip $(call dotfile,$(patsubst %,%.cmd,$(1)))) >> =20 >> O_TO_EXE =3D $(HOSTCC) $(HOST_LDFLAGS) $(LDFLAGS_$(@)) \ >> - $(EXTRA_HOST_LDFLAGS) -o $@ $(OBJS-y) $(LDLIBS) >> + $(EXTRA_HOST_LDFLAGS) -o $@ $(OBJS-y) $(LDLIBS-y) >> O_TO_EXE_STR =3D $(subst ','\'',$(O_TO_EXE)) #'# fix syntax highlight >> O_TO_EXE_DISP =3D $(if $(V),"$(O_TO_EXE_STR)"," HOSTLD $(@)") >> O_TO_EXE_CMD =3D "cmd_$@ =3D $(O_TO_EXE_STR)" >> @@ -72,7 +72,7 @@ O_TO_EXE_DO =3D @set -e; \ >> # list of .a files that are linked to this application >> LDLIBS_FILES :=3D $(wildcard \ >> $(addprefix $(RTE_OUTPUT)/lib/, \ >> - $(patsubst -l%,lib%.a,$(filter -l%,$(LDLIBS))))) >> + $(patsubst -l%,lib%.a,$(filter -l%,$(LDLIBS-y))))) >> =20 >> # >> # Compile executable file if needed >> diff --git a/mk/rte.shared.mk b/mk/rte.shared.mk >> index fc6b0b4..56f20bb 100644 >> --- a/mk/rte.shared.mk >> +++ b/mk/rte.shared.mk >> @@ -60,10 +60,10 @@ exe2cmd =3D $(strip $(call dotfile,$(patsubst >>%,%.cmd,$(1)))) >> ifeq ($(LINK_USING_CC),1) >> override EXTRA_LDFLAGS :=3D $(call linkerprefix,$(EXTRA_LDFLAGS)) >> O_TO_SO =3D $(CC) $(call linkerprefix,$(LDFLAGS)) $(LDFLAGS_$(@)) >>$(EXTRA_LDFLAGS) \ >> - -shared -o $@ $(OBJS-y) $(call linkerprefix,$(LDLIBS)) >> + -shared -o $@ $(OBJS-y) $(call linkerprefix,$(LDLIBS-y)) >> else >> O_TO_SO =3D $(LD) $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \ >> - -shared -o $@ $(OBJS-y) $(LDLIBS) >> + -shared -o $@ $(OBJS-y) $(LDLIBS-y) >> endif >> =20 >> O_TO_SO_STR =3D $(subst ','\'',$(O_TO_SO)) #'# fix syntax highlight >> @@ -77,12 +77,12 @@ O_TO_SO_DO =3D @set -e; \ >> -include .$(SHARED).cmd >> =20 >> # path where libraries are retrieved >> -LDLIBS_PATH :=3D $(subst -Wl$(comma)-L,,$(filter >>-Wl$(comma)-L%,$(LDLIBS))) >> -LDLIBS_PATH +=3D $(subst -L,,$(filter -L%,$(LDLIBS))) >> +LDLIBS_PATH :=3D $(subst -Wl$(comma)-L,,$(filter >>-Wl$(comma)-L%,$(LDLIBS-y))) >> +LDLIBS_PATH +=3D $(subst -L,,$(filter -L%,$(LDLIBS-y))) >> =20 >> # list of .a files that are linked to this application >> -LDLIBS_NAMES :=3D $(patsubst -l%,lib%.a,$(filter -l%,$(LDLIBS))) >> -LDLIBS_NAMES +=3D $(patsubst -Wl$(comma)-l%,lib%.a,$(filter >>-Wl$(comma)-l%,$(LDLIBS))) >> +LDLIBS_NAMES :=3D $(patsubst -l%,lib%.a,$(filter -l%,$(LDLIBS-y))) >> +LDLIBS_NAMES +=3D $(patsubst -Wl$(comma)-l%,lib%.a,$(filter >>-Wl$(comma)-l%,$(LDLIBS-y))) >> =20 >> # list of found libraries files (useful for deps). If not found, the >> # library is silently ignored and dep won't be checked > >Sergio