From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) by dpdk.org (Postfix) with ESMTP id 13CB8DE0 for ; Tue, 14 Jan 2014 21:38:54 +0100 (CET) Received: by mail-pa0-f46.google.com with SMTP id rd3so142723pab.5 for ; Tue, 14 Jan 2014 12:40:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=/KZT1UdyShJ0IZDWNNH3Nknnvbvg+ryEqOCWz85ROcE=; b=MyDAlrNYGQuGL+RfYh4fPmuDzw07ZuHFWhNIz04wvS7AYAihhMGiKLgZ2+r/wykWJP 04FGlDfuv1Wn+tC2X9+BijzylNbijqzcx4xzdkbheXHQ33lMY3AE6obO9/Cl65nZw6RQ 3A/pQwxBVMSECzGsX0zBH9dxNqDoEu21QUN6Cb3mbReiISwnYLKkhjwHzZdf19fa3ssz wx92hb88lM6NwLY05ARBRRhlhNFvOwD6d19iptvPQEJqlFLXD3e5QDl4opslIqZNsNnG NKhr6Ov4iVwl0NPiWq6f8viMD0OwfGhhqD7q6VwvGf7SB31ERhyLPhNDSU2SZb7UuD4j E8JQ== X-Gm-Message-State: ALoCoQlVzGJduI7b0sQbiht3XyFfipQgNy7h8fBW0ruDAjFF+LAmWUQh76NW5r+11N79VbWOhAnd X-Received: by 10.66.189.193 with SMTP id gk1mr4033326pac.105.1389732008509; Tue, 14 Jan 2014 12:40:08 -0800 (PST) Received: from [192.168.128.242] (50-76-35-254-ip-static.hfc.comcastbusiness.net. [50.76.35.254]) by mx.google.com with ESMTPSA id vp4sm4118259pab.8.2014.01.14.12.40.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 14 Jan 2014 12:40:07 -0800 (PST) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) From: Daniel Kan In-Reply-To: <201401141455.57994.thomas.monjalon@6wind.com> Date: Tue, 14 Jan 2014 12:40:04 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: <8A452F53-AD44-4C3C-8AB0-AD3342206D46@nyansa.com> <201401141238.30056.thomas.monjalon@6wind.com> <1FD9B82B8BF2CF418D9A1000154491D973FC5A42@ORSMSX102.amr.corp.intel.com> <201401141455.57994.thomas.monjalon@6wind.com> To: Thomas Monjalon X-Mailer: Apple Mail (2.1827) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] Any benefit of using DPDK's makefiles instead of using your own and linking against DPDK library 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, 14 Jan 2014 20:38:55 -0000 I think in general, developers are pretty particular about their = makefiles and build framework. This is especially true if you have an = existing application; migrating it to use dpdk=92s build framework is = rather cumbersome and likely a non-starter for bigger complex projects. = Hence, separating application build from dpdk build will be very useful = in many situations. The main trick is to extract the appropriate = compilation flags that can be readily consumed by the application build = system. As an application developer, nothing is simper than just having = some header files, a library file, and some necessary compilation flags. = If tools like pkg-config or others can facilitate that process, then we = could consider it. But even a simple script that can be give me flags = that I can provide to my own build system would already suffice.=20 On a similar note, is there any particular reason why many macros such = as RTE_MACHINE_XXX are passed as flags to the compiler instead of being = defined in rte_config.h?=20 Thanks Dan On Jan 14, 2014, at 5:55 AM, Thomas Monjalon = wrote: > Hello Venky, >=20 > 14/01/2014 14:22, Venkatesan, Venky: >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon >>> 14/01/2014 08:02, Daniel Kan: >>>> I already have existing makefiles for my current application. I = would >>>> like to integrate dpdk into the application. =92m wondering if = there is >>>> any benefit to use dpdk=92s makefiles instead of using your own = makefile >>>> and linking against the library (e.g. libintel_dpdk.a). Thanks. >>>=20 >>> DPDK makefiles have 2 benefits: >>> - provide a framework >>> - automatically set CFLAGS and LDFLAGS according to your = configuration >>>=20 >>> If you don't need a framework, I think it's better to extract = compilation >>> flags with something like pkg-config. >>> http://freedesktop.org/wiki/Software/pkg-config >>> A patch for a such feature would be welcome :) >>=20 >> One other thing to think about - as we add more functionality into = DPDK >> (e.g. new libraries for other packet functions), we integrate them = into >> the DPDK framework. If you extract compilation flags and setup your = own >> makefile, you would have to do this re-integration every time you = want to >> pick up a new release. The same applies to newer files added etc. = etc. >> That is the downside. >=20 > I disagree. > If the Makefile of the application, use a DPDK script or pkg-config to = read=20 > the flags from a generated file, the integration is done only once. > This guide explains the logic and how to implement it: > http://people.freedesktop.org/~dbn/pkg-config-guide.html >=20 > --=20 > Thomas