Message ID | 1433844953-29887-1-git-send-email-maxim.uvarov@linaro.org (mailing list archive) |
---|---|
State | Rejected, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id CB0995A57; Tue, 9 Jun 2015 12:16:00 +0200 (CEST) Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id E80955A54 for <dev@dpdk.org>; Tue, 9 Jun 2015 12:15:59 +0200 (CEST) Received: by wgv5 with SMTP id 5so9303579wgv.1 for <dev@dpdk.org>; Tue, 09 Jun 2015 03:15:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=1aE/WQAgVSu5RY/PSWFe9JPjQEPMmgiMvlHyeND35GU=; b=DA+tWFhq0VWm42UNONqdA2RY2p3lZc/flSurKt7EPRB8UcynLwCFh4bM6wVvE3BzPn tgt2jF4CNqgp9+k0KMnqxGMvND0tQ16bEL14Vi+3eSkPB/jJmMllMeUjwYefBaqqoRXV A5ZH1KWe4cyinB2fGh+EpqOe0oA0BRwz/wGPeuuKAV4aoe31vZGK5YjkI8dm/0eAq4sN LDPOOM2uOcV5O5H3l7m0doMd1qIqJRmsvDfxeoTBPVd82ZmN6KtA5swnpLC/Yop+/N7p xoyVOClmnnwY1xi9p0WxexCZugTtd5woUzPYZYfwh4QgjDD6a02O7z7nEbntZHe0Jwy8 hUOA== X-Gm-Message-State: ALoCoQlVWvF8I92z4OcyCYsp5CRKvuUEgUVmTczDNexdoMnszfsJdlOxlh+8F0vBw8cd0SkWDriJ X-Received: by 10.180.106.73 with SMTP id gs9mr30253959wib.1.1433844958791; Tue, 09 Jun 2015 03:15:58 -0700 (PDT) Received: from localhost.localdomain ([87.120.178.39]) by mx.google.com with ESMTPSA id y19sm2044461wia.15.2015.06.09.03.15.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Jun 2015 03:15:57 -0700 (PDT) From: Maxim Uvarov <maxim.uvarov@linaro.org> To: dev@dpdk.org Date: Tue, 9 Jun 2015 13:15:53 +0300 Message-Id: <1433844953-29887-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.9.1 Subject: [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 <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Maxim Uvarov
June 9, 2015, 10:15 a.m. UTC
Inherit build varibles only so that this file can be included
from other projects.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
---
mk/rte.app.mk | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Comments
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 <maxim.uvarov@linaro.org> 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 > --- > mk/rte.app.mk | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/mk/rte.app.mk b/mk/rte.app.mk > index 34dff2a..b75925d 100644 > --- a/mk/rte.app.mk > +++ b/mk/rte.app.mk > @@ -222,6 +222,7 @@ endif # ifeq ($(NO_AUTOLIBS),) > > LDLIBS += $(CPU_LDLIBS) > > +ifneq ($(DPRK_APP_MK_SKIP_BUILD_TARGETS),1) > .PHONY: all > all: install > > @@ -232,6 +233,7 @@ _postinstall: build > > .PHONY: build > build: _postbuild > +endif > > exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1)))) > > @@ -306,6 +308,7 @@ $(RTE_OUTPUT)/app/$(APP).map: $(APP) > @[ -d $(RTE_OUTPUT)/app ] || mkdir -p $(RTE_OUTPUT)/app > $(Q)cp -f $(APP).map $(RTE_OUTPUT)/app > > +ifneq ($(DPRK_APP_MK_SKIP_BUILD_TARGETS), 1) > # > # Clean all generated files > # > @@ -317,7 +320,7 @@ clean: _postclean > doclean: > $(Q)rm -rf $(APP) $(OBJS-all) $(DEPS-all) $(DEPSTMP-all) \ > $(CMDS-all) $(INSTALL-FILES-all) .$(APP).cmd > - > +endif > > include $(RTE_SDK)/mk/internal/rte.compile-post.mk > include $(RTE_SDK)/mk/internal/rte.install-post.mk >
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 <maxim.uvarov@linaro.org> > > 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? Thanks, Maxim. > > >> --- >> mk/rte.app.mk | 5 ++++- >> 1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/mk/rte.app.mk b/mk/rte.app.mk >> index 34dff2a..b75925d 100644 >> --- a/mk/rte.app.mk >> +++ b/mk/rte.app.mk >> @@ -222,6 +222,7 @@ endif # ifeq ($(NO_AUTOLIBS),) >> >> LDLIBS += $(CPU_LDLIBS) >> >> +ifneq ($(DPRK_APP_MK_SKIP_BUILD_TARGETS),1) >> .PHONY: all >> all: install >> >> @@ -232,6 +233,7 @@ _postinstall: build >> >> .PHONY: build >> build: _postbuild >> +endif >> >> exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1)))) >> >> @@ -306,6 +308,7 @@ $(RTE_OUTPUT)/app/$(APP).map: $(APP) >> @[ -d $(RTE_OUTPUT)/app ] || mkdir -p $(RTE_OUTPUT)/app >> $(Q)cp -f $(APP).map $(RTE_OUTPUT)/app >> >> +ifneq ($(DPRK_APP_MK_SKIP_BUILD_TARGETS), 1) >> # >> # Clean all generated files >> # >> @@ -317,7 +320,7 @@ clean: _postclean >> doclean: >> $(Q)rm -rf $(APP) $(OBJS-all) $(DEPS-all) $(DEPSTMP-all) \ >> $(CMDS-all) $(INSTALL-FILES-all) .$(APP).cmd >> - >> +endif >> >> include $(RTE_SDK)/mk/internal/rte.compile-post.mk >> include $(RTE_SDK)/mk/internal/rte.install-post.mk >> >
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 <maxim.uvarov@linaro.org> >> >> 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
On 06/09/15 17:37, Olivier MATZ wrote: > 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 <maxim.uvarov@linaro.org> >>> >>> 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 > mk/rte.extlib.mk also references to mk/rte.lib.mk which has all: target. And as soon I will include that Makefile it will do make all first. But I need only cflags and ldflags. To link pmds we did that hack: https://git.linaro.org/lng/odp-dpdk.git/commitdiff/9e41f167a8f44b74af6a1e1ffe00dc6d305ac8a4?hp=ac1789bfe9ceb6bbe04b6455f996680a20441813 Which mostly solved problem. But I would add sse and other cflags especially for inline functions to or link. Will take a look at examples/skeleton. Before I looked only to 1.7.1 and there is no such example. Looks like it appeared later. Thank you, Maxim.
diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 34dff2a..b75925d 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -222,6 +222,7 @@ endif # ifeq ($(NO_AUTOLIBS),) LDLIBS += $(CPU_LDLIBS) +ifneq ($(DPRK_APP_MK_SKIP_BUILD_TARGETS),1) .PHONY: all all: install @@ -232,6 +233,7 @@ _postinstall: build .PHONY: build build: _postbuild +endif exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1)))) @@ -306,6 +308,7 @@ $(RTE_OUTPUT)/app/$(APP).map: $(APP) @[ -d $(RTE_OUTPUT)/app ] || mkdir -p $(RTE_OUTPUT)/app $(Q)cp -f $(APP).map $(RTE_OUTPUT)/app +ifneq ($(DPRK_APP_MK_SKIP_BUILD_TARGETS), 1) # # Clean all generated files # @@ -317,7 +320,7 @@ clean: _postclean doclean: $(Q)rm -rf $(APP) $(OBJS-all) $(DEPS-all) $(DEPSTMP-all) \ $(CMDS-all) $(INSTALL-FILES-all) .$(APP).cmd - +endif include $(RTE_SDK)/mk/internal/rte.compile-post.mk include $(RTE_SDK)/mk/internal/rte.install-post.mk