From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by dpdk.org (Postfix) with ESMTP id BCE005A57 for ; Tue, 9 Jun 2015 16:37:25 +0200 (CEST) Received: by wigg3 with SMTP id g3so19677718wig.1 for ; Tue, 09 Jun 2015 07:37:25 -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=/7KcMHauJRxG3AGBSMGjqIWcQKWkWfIoh2bSsrBWzjQ=; b=A1Mk6MRFA38g/3yT/Thnipx3DPdABY1IG9Cg1vzEiaKZYwgynlnLK3/+uO55ONuCIU Po05uGXLIa79IPXnTk8avvLhKmhli65B9q1rHaRPydGO7hgnKbN41xp5WXGT0KsTgsno lYMvOf3POJOLKVkH22Yx/4/jD2dk5XtoIKTtXKgtX8S0E24/q5itUReSDC3mul/TReii 1bv0WdIeg2SZM1eNkpdaMX0q4DpMWOKA1SudsljWMHBoYBNrB2cEjBlbjAXN7/BTROhH hsEw1FZ74btRVr55cDS4PBMOcMJaKBgamHsDsscA8hB1XdWikZHbhcZ2RREJXlAd32eX kt3Q== X-Gm-Message-State: ALoCoQkC5mBGnfxl4d5Vl3W7URiGzm0eeq0JtB36WXQxkZ6Ws7NZn40A3WUgCyKp3DRrzEsVykgk X-Received: by 10.194.76.73 with SMTP id i9mr43155846wjw.149.1433860645610; Tue, 09 Jun 2015 07:37:25 -0700 (PDT) Received: from [10.16.0.195] (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by mx.google.com with ESMTPSA id hm8sm9755186wjc.28.2015.06.09.07.37.24 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2015 07:37:25 -0700 (PDT) Message-ID: <5576FA20.9090809@6wind.com> Date: Tue, 09 Jun 2015 16:37:20 +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: Maxim Uvarov , dev@dpdk.org References: <1433844953-29887-1-git-send-email-maxim.uvarov@linaro.org> <5576D68F.7040804@6wind.com> <5576E343.9050309@linaro.org> In-Reply-To: <5576E343.9050309@linaro.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] dpdk1.7.1 rte.app.mk add options not not build targerts 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, 09 Jun 2015 14:37:26 -0000 Hi Maxim, On 06/09/2015 02:59 PM, Maxim Uvarov wrote: > On 06/09/15 15:05, Olivier MATZ wrote: >> Hello Maxim, >> >> On 06/09/2015 12:15 PM, Maxim Uvarov wrote: >>> Inherit build varibles only so that this file can be included >>> from other projects. >>> >>> Signed-off-by: Maxim Uvarov >> >> Can you detail a bit more what you want to do? >> Why do you need to include rte.app.mk? This file is >> internal to the dpdk framework. >> >> By the way, the title is not understandable: >> - why dpdk1.7.1 ? >> - targerts -> targets >> - not not ? >> >> Regards, >> Olivier > > Sorry it was quick patch, some typos there. I intended to discuss the > idea of what I need and might it it's useful for others. > I did ODP implementation with dpdk as back end. And staid on v1.7.1. But > that patch should be good for the latest git, > if not I can update it. > > So my environment is: I build library which calls dpdk functions. That > library is used to build applications. I need to steal CFLAGS, LDFLAGS, > and build script from dpdk for my library and example apps. So I just > point where dpdk is and my library build system should inherit the same > env which dpdk used. One reason is optimization and second reason is to > compile in dpdk PMD drivers the same way as dpdk does that. > > So in my Makefile I do: include $dpdk/mk/rte.app.mk > > Is that needed for somebody else? Maybe you can use rte.extapp.mk and rte.extlib.mk instead? There is no example for rte.extlib.mk, but it works the same as rte.extapp.mk. You can start from an example in dpdk/examples directory (for instance skeleton): - remove the main() - change "APP = basicfwd" to "LIB = basicfwd.a" - change "include $(RTE_SDK)/mk/rte.extapp.mk" to "include $(RTE_SDK)/mk/rte.extlib.mk" Then: cd examples/skeleton make RTE_SDK=/path/to/dpdk \ RTE_TARGET=x86_64-native-linuxapp-gcc \ O=/path/to/dstdir This should generate a static lib that you can use in another application example. If you cannot use this model, another solution would be to generate a pkg-config file in dpdk framework that could be used by other build frameworks. Regards, Olivier