DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v3 0/6] examples: add a new makefile to build all examples
@ 2014-05-16  8:18 Olivier Matz
  2014-05-16  8:18 ` [dpdk-dev] [PATCH v3 1/6] mk: introduce rte.extsubdir.mk Olivier Matz
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Olivier Matz @ 2014-05-16  8:18 UTC (permalink / raw)
  To: dev

This patch series adds a makefile to build all examples supported
by the configuration. It helps to check that all examples compile
after a dpdk modification.

After applying the patches, it is possible to build all examples for
given targets, given the installation directory:

  # first, install the x86_64-default-linuxapp-gcc in
  # ${RTE_SDK}/x86_64-default-linuxapp-gcc directory
  user@droids:~/dpdk.org$ make install T=x86_64-default-linuxapp-gcc
  # build examples for this new installation in
  # ${RTE_SDK}/examples directory
  user@droids:~/dpdk.org$ make examples T=x86_64-default-linuxapp-gcc

Or directly from examples directory:

  user@droids:~/dpdk.org$ cd examples
  user@droids:~/dpdk.org/examples$ make RTE_SDK=${PWD}/.. \
      RTE_TARGET=x86_64-default-linuxapp-gcc


Changes included in v3:
  - use x86_64-default-linuxapp-gcc instead of x86_64-ivshmem-linuxapp-gcc
    for default RTE_TARGET of multi_process example (was a bad copy/paste).
  - replace ifndef by ?=
  - fix when O= is a relative directory
  - exit if the installation directory does not exist

Changes included in v2:
  - do not build kni example if CONFIG_RTE_LIBRTE_KNI is not set
  - fix rte.extsubdir.mk when there are several levels of subdirectories
  - allow to build examples directly from dpdk root directory
  - explain in commit logs that it requires an install directory

Olivier Matz (6):
  mk: introduce rte.extsubdir.mk
  examples: use rte.extsubdir.mk to process subdirectories
  examples: add a makefile to build all examples
  examples: fix qos_sched makefile
  examples: fix netmap_compat example
  mk: add "make examples" target in root makefile

 doc/build-sdk-quick.txt                          | 14 +++--
 examples/Makefile                                | 68 ++++++++++++++++++++
 examples/l2fwd-ivshmem/Makefile                  |  9 +--
 examples/multi_process/Makefile                  | 16 +++--
 examples/multi_process/client_server_mp/Makefile | 15 ++---
 examples/netmap_compat/bridge/Makefile           |  5 +-
 examples/qos_sched/Makefile                      |  2 -
 examples/quota_watermark/Makefile                | 12 +---
 mk/rte.extsubdir.mk                              | 53 ++++++++++++++++
 mk/rte.sdkexamples.mk                            | 79 ++++++++++++++++++++++++
 mk/rte.sdkroot.mk                                |  4 ++
 11 files changed, 233 insertions(+), 44 deletions(-)
 create mode 100644 examples/Makefile
 create mode 100644 mk/rte.extsubdir.mk
 create mode 100644 mk/rte.sdkexamples.mk

-- 
1.9.2

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [dpdk-dev] [PATCH v2 2/6] examples: use rte.extsubdir.mk to process subdirectories
@ 2014-05-09 10:32 Olivier Matz
  2014-05-13 13:51 ` [dpdk-dev] [PATCH v3 " Olivier Matz
  0 siblings, 1 reply; 9+ messages in thread
From: Olivier Matz @ 2014-05-09 10:32 UTC (permalink / raw)
  To: dev

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 examples/l2fwd-ivshmem/Makefile                  |  9 +--------
 examples/multi_process/Makefile                  | 16 +++++++---------
 examples/multi_process/client_server_mp/Makefile | 15 ++++++---------
 examples/quota_watermark/Makefile                | 12 +++---------
 4 files changed, 17 insertions(+), 35 deletions(-)

diff --git a/examples/l2fwd-ivshmem/Makefile b/examples/l2fwd-ivshmem/Makefile
index 7286b37..df59ed8 100644
--- a/examples/l2fwd-ivshmem/Makefile
+++ b/examples/l2fwd-ivshmem/Makefile
@@ -37,14 +37,7 @@ endif
 RTE_TARGET ?= x86_64-ivshmem-linuxapp-gcc
 
 include $(RTE_SDK)/mk/rte.vars.mk
-unexport RTE_SRCDIR RTE_OUTPUT RTE_EXTMK
 
 DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += host guest
 
-.PHONY: all clean $(DIRS-y)
-
-all: $(DIRS-y)
-clean: $(DIRS-y)
-
-$(DIRS-y):
-	$(MAKE) -C $@ $(MAKECMDGOALS)
+include $(RTE_SDK)/mk/rte.extsubdir.mk
diff --git a/examples/multi_process/Makefile b/examples/multi_process/Makefile
index ba96a7e..f2c8e68 100644
--- a/examples/multi_process/Makefile
+++ b/examples/multi_process/Makefile
@@ -33,15 +33,13 @@ ifeq ($(RTE_SDK),)
 $(error "Please define RTE_SDK environment variable")
 endif
 
-include $(RTE_SDK)/mk/rte.vars.mk
-unexport RTE_SRCDIR RTE_OUTPUT RTE_EXTMK
-
-DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += $(wildcard *_mp)
+# Default target, can be overriden by command line or environment
+RTE_TARGET ?= x86_64-ivshmem-linuxapp-gcc
 
-.PHONY: all clean $(DIRS-y)
+include $(RTE_SDK)/mk/rte.vars.mk
 
-all: $(DIRS-y)
-clean: $(DIRS-y)
+DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += client_server_mp
+DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += simple_mp
+DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += symmetric_mp
 
-$(DIRS-y):
-	$(MAKE) -C $@ $(MAKECMDGOALS)
+include $(RTE_SDK)/mk/rte.extsubdir.mk
diff --git a/examples/multi_process/client_server_mp/Makefile b/examples/multi_process/client_server_mp/Makefile
index 24d31b0..b8d6b3f 100644
--- a/examples/multi_process/client_server_mp/Makefile
+++ b/examples/multi_process/client_server_mp/Makefile
@@ -33,15 +33,12 @@ ifeq ($(RTE_SDK),)
 $(error "Please define RTE_SDK environment variable")
 endif
 
-include $(RTE_SDK)/mk/rte.vars.mk
-unexport RTE_SRCDIR RTE_OUTPUT RTE_EXTMK
-
-DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += $(wildcard mp_*)
+# Default target, can be overriden by command line or environment
+RTE_TARGET ?= x86_64-ivshmem-linuxapp-gcc
 
-.PHONY: all clean $(DIRS-y)
+include $(RTE_SDK)/mk/rte.vars.mk
 
-all: $(DIRS-y)
-clean: $(DIRS-y)
+DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += mp_client
+DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += mp_server
 
-$(DIRS-y):
-	$(MAKE) -C $@ $(MAKECMDGOALS)
+include $(RTE_SDK)/mk/rte.extsubdir.mk
diff --git a/examples/quota_watermark/Makefile b/examples/quota_watermark/Makefile
index 5596dcc..e4d54c2 100644
--- a/examples/quota_watermark/Makefile
+++ b/examples/quota_watermark/Makefile
@@ -37,14 +37,8 @@ endif
 RTE_TARGET ?= x86_64-default-linuxapp-gcc
 
 include $(RTE_SDK)/mk/rte.vars.mk
-unexport RTE_SRCDIR RTE_OUTPUT RTE_EXTMK
 
-DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += $(wildcard qw*)
+DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += qw
+DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += qwctl
 
-.PHONY: all clean $(DIRS-y)
-
-all: $(DIRS-y)
-clean: $(DIRS-y)
-
-$(DIRS-y):
-	$(MAKE) -C $@ $(MAKECMDGOALS)
+include $(RTE_SDK)/mk/rte.extsubdir.mk
-- 
1.9.2

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-05-16 14:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-16  8:18 [dpdk-dev] [PATCH v3 0/6] examples: add a new makefile to build all examples Olivier Matz
2014-05-16  8:18 ` [dpdk-dev] [PATCH v3 1/6] mk: introduce rte.extsubdir.mk Olivier Matz
2014-05-16  8:18 ` [dpdk-dev] [PATCH v3 2/6] examples: use rte.extsubdir.mk to process subdirectories Olivier Matz
2014-05-16  8:18 ` [dpdk-dev] [PATCH v3 3/6] examples: add a makefile to build all examples Olivier Matz
2014-05-16  8:18 ` [dpdk-dev] [PATCH v3 4/6] examples: fix qos_sched makefile Olivier Matz
2014-05-16  8:19 ` [dpdk-dev] [PATCH v3 5/6] examples: fix netmap_compat example Olivier Matz
2014-05-16  8:19 ` [dpdk-dev] [PATCH v3 6/6] mk: add "make examples" target in root makefile Olivier Matz
2014-05-16 14:37 ` [dpdk-dev] [PATCH v3 0/6] examples: add a new makefile to build all examples Thomas Monjalon
  -- strict thread matches above, loose matches on Subject: below --
2014-05-09 10:32 [dpdk-dev] [PATCH v2 2/6] examples: use rte.extsubdir.mk to process subdirectories Olivier Matz
2014-05-13 13:51 ` [dpdk-dev] [PATCH v3 " Olivier Matz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).