* [spp] [PATCH 0/3] Revise makefile
@ 2018-11-26 7:26 ogawa.yasufumi
2018-11-26 7:26 ` [spp] [PATCH 1/3] makefile: fix problem of dependency is not checked ogawa.yasufumi
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: ogawa.yasufumi @ 2018-11-26 7:26 UTC (permalink / raw)
To: ferruh.yigit, spp, ogawa.yasufumi
From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
Some of Makefiles of SPP does not work property and need to be revised.
This patches are to fix the problems. It also include changing to use
GNUmakefile instead of Makefile as in DPDK.
* It does not check dependency for compilation. If you update some of
source codes, you need to `make clean` before `make`.
* `Makefile.spp` is used to compile DPDK with options for testing.
However, target is remained as old `x86_64-ivshmem-linuxapp-gcc`.
Yasufumi Ogawa (3):
makefile: fix problem of dependency is not checked
makefile: introduce GNUmakefile
makefile: update Makefile for testing DPDK
GNUmakefile | 38 ++++++++++++++++++++++++++++++++++++++
Makefile | 36 +-----------------------------------
Makefile.spp | 2 +-
src/mirror/Makefile | 2 +-
src/nfv/Makefile | 2 +-
src/primary/Makefile | 2 +-
src/vf/Makefile | 2 +-
src/vm/Makefile | 2 +-
8 files changed, 45 insertions(+), 41 deletions(-)
create mode 100644 GNUmakefile
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [spp] [PATCH 1/3] makefile: fix problem of dependency is not checked
2018-11-26 7:26 [spp] [PATCH 0/3] Revise makefile ogawa.yasufumi
@ 2018-11-26 7:26 ` ogawa.yasufumi
2018-11-26 7:26 ` [spp] [PATCH 2/3] makefile: introduce GNUmakefile ogawa.yasufumi
2018-11-26 7:26 ` [spp] [PATCH 3/3] makefile: update Makefile for testing DPDK ogawa.yasufumi
2 siblings, 0 replies; 4+ messages in thread
From: ogawa.yasufumi @ 2018-11-26 7:26 UTC (permalink / raw)
To: ferruh.yigit, spp, ogawa.yasufumi
From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
Add `-MMD` to CFLAGS option in Makefiles in each of directory under
`src` for checking updated files while compilation. Without this
change, files changed after previous compilation are ignored and not
compiled.
Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
src/mirror/Makefile | 2 +-
src/nfv/Makefile | 2 +-
src/primary/Makefile | 2 +-
src/vf/Makefile | 2 +-
src/vm/Makefile | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/mirror/Makefile b/src/mirror/Makefile
index 614a44c..073afbd 100644
--- a/src/mirror/Makefile
+++ b/src/mirror/Makefile
@@ -20,7 +20,7 @@ SRCS-y += ../vf/common/command_dec.c
SRCS-y += ../vf/common/ringlatencystats.c ../vf/common/string_buffer.c
CFLAGS += -DALLOW_EXPERIMENTAL_API
-CFLAGS += $(WERROR_FLAGS) -O3
+CFLAGS += $(WERROR_FLAGS) -O3 -MMD
CFLAGS += -I$(SRCDIR)/../shared
CFLAGS += -I$(SRCDIR)/../vf/common
CFLAGS += -DSPP_MIRROR_MODULE
diff --git a/src/nfv/Makefile b/src/nfv/Makefile
index 16dfbbb..2d3ffed 100644
--- a/src/nfv/Makefile
+++ b/src/nfv/Makefile
@@ -15,7 +15,7 @@ APP = spp_nfv
SRCS-y := nfv.c ../shared/common.c
CFLAGS += -DALLOW_EXPERIMENTAL_API
-CFLAGS += $(WERROR_FLAGS) -O3
+CFLAGS += $(WERROR_FLAGS) -O3 -MMD
CFLAGS += -I$(SRCDIR)/../shared
ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
diff --git a/src/primary/Makefile b/src/primary/Makefile
index bedea8e..59c9ba7 100644
--- a/src/primary/Makefile
+++ b/src/primary/Makefile
@@ -24,7 +24,7 @@ SRCS-y := main.c init.c args.c ../shared/common.c
INC := $(wildcard *.h)
CFLAGS += -DALLOW_EXPERIMENTAL_API
-CFLAGS += $(WERROR_FLAGS) -O3
+CFLAGS += $(WERROR_FLAGS) -O3 -MMD
CFLAGS += -I$(SRCDIR)/../shared
ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
diff --git a/src/vf/Makefile b/src/vf/Makefile
index f2a167b..42c9037 100644
--- a/src/vf/Makefile
+++ b/src/vf/Makefile
@@ -19,7 +19,7 @@ SRCS-y += common/spp_proc.c
SRCS-y += ../shared/common.c
CFLAGS += -DALLOW_EXPERIMENTAL_API
-CFLAGS += $(WERROR_FLAGS) -O3
+CFLAGS += $(WERROR_FLAGS) -O3 -MMD
CFLAGS += -I$(SRCDIR)/../shared
CFLAGS += -I$(SRCDIR)/common
#CFLAGS += -DSPP_DEMONIZE
diff --git a/src/vm/Makefile b/src/vm/Makefile
index 27ba47e..be3fa5e 100644
--- a/src/vm/Makefile
+++ b/src/vm/Makefile
@@ -24,7 +24,7 @@ SRCS-y := main.c init.c args.c ../shared/common.c
INC := $(wildcard *.h)
CFLAGS += -DALLOW_EXPERIMENTAL_API
-CFLAGS += $(WERROR_FLAGS) -O3
+CFLAGS += $(WERROR_FLAGS) -O3 -MMD
CFLAGS += -I$(SRCDIR)/../shared
ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [spp] [PATCH 2/3] makefile: introduce GNUmakefile
2018-11-26 7:26 [spp] [PATCH 0/3] Revise makefile ogawa.yasufumi
2018-11-26 7:26 ` [spp] [PATCH 1/3] makefile: fix problem of dependency is not checked ogawa.yasufumi
@ 2018-11-26 7:26 ` ogawa.yasufumi
2018-11-26 7:26 ` [spp] [PATCH 3/3] makefile: update Makefile for testing DPDK ogawa.yasufumi
2 siblings, 0 replies; 4+ messages in thread
From: ogawa.yasufumi @ 2018-11-26 7:26 UTC (permalink / raw)
To: ferruh.yigit, spp, ogawa.yasufumi
From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
As in DPDK, change Makefile to use gmake and add GNUmakefile.
Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
GNUmakefile | 38 ++++++++++++++++++++++++++++++++++++++
Makefile | 36 +-----------------------------------
2 files changed, 39 insertions(+), 35 deletions(-)
create mode 100644 GNUmakefile
diff --git a/GNUmakefile b/GNUmakefile
new file mode 100644
index 0000000..1096c47
--- /dev/null
+++ b/GNUmakefile
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018 Nippon Telegraph and Telephone Corporation
+
+VERSION = 18.05.1
+
+ifeq ($(RTE_SDK),)
+$(error "Please define RTE_SDK environment variable")
+endif
+
+# Default target, can be overriden by command line or environment
+RTE_TARGET ?= x86_64-native-linuxapp-gcc
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+DIRS-y += src
+
+include $(RTE_SDK)/mk/rte.extsubdir.mk
+
+DOC_ROOT = docs/guides
+
+# Compile RST documents
+.PHONY: doc
+doc: doc-pdf doc-html
+
+.PHONY: doc-html
+doc-html:
+ make -C $(DOC_ROOT) html
+
+.PHONY: doc-pdf
+doc-pdf:
+ python $(DOC_ROOT)/gen_pdf_imgs.py
+ make -C $(DOC_ROOT) latexpdf
+ @echo "Succeeded to generate '$(DOC_ROOT)/_build/latex/SoftPatchPanel.pdf'"
+
+.PHONY: doc-clean
+doc-clean:
+ find $(DOC_ROOT)/images/ -type f -name "*.pdf" -delete
+ make -C $(DOC_ROOT) clean
diff --git a/Makefile b/Makefile
index d5423ca..964379f 100644
--- a/Makefile
+++ b/Makefile
@@ -29,38 +29,4 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERSION = 18.05.1
-
-ifeq ($(RTE_SDK),)
-$(error "Please define RTE_SDK environment variable")
-endif
-
-# Default target, can be overriden by command line or environment
-RTE_TARGET ?= x86_64-native-linuxapp-gcc
-
-include $(RTE_SDK)/mk/rte.vars.mk
-
-DIRS-y += src
-
-include $(RTE_SDK)/mk/rte.extsubdir.mk
-
-DOC_ROOT = docs/guides
-
-# Compile RST documents
-.PHONY: doc-pdf
-doc-all: doc-pdf doc-html
-
-.PHONY: doc-html
-doc-html:
- make -C $(DOC_ROOT) html
-
-.PHONY: doc-pdf
-doc-pdf:
- python $(DOC_ROOT)/gen_pdf_imgs.py
- make -C $(DOC_ROOT) latexpdf
- @echo "Succeeded to generate '$(DOC_ROOT)/_build/latex/SoftPatchPanel.pdf'"
-
-.PHONY: doc-clean
-doc-clean:
- find $(DOC_ROOT)/images/ -type f -name "*.pdf" -delete
- make -C $(DOC_ROOT) clean
+.error Error please compile using GNU Make (gmake)
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [spp] [PATCH 3/3] makefile: update Makefile for testing DPDK
2018-11-26 7:26 [spp] [PATCH 0/3] Revise makefile ogawa.yasufumi
2018-11-26 7:26 ` [spp] [PATCH 1/3] makefile: fix problem of dependency is not checked ogawa.yasufumi
2018-11-26 7:26 ` [spp] [PATCH 2/3] makefile: introduce GNUmakefile ogawa.yasufumi
@ 2018-11-26 7:26 ` ogawa.yasufumi
2 siblings, 0 replies; 4+ messages in thread
From: ogawa.yasufumi @ 2018-11-26 7:26 UTC (permalink / raw)
To: ferruh.yigit, spp, ogawa.yasufumi
From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
This change is to update `T` option from `x86_64-ivshmem-linuxapp-gcc`
which is already deprecated in `Makefile.spp`.
`Makefile.spp` is to compile DPDK with config `*RTE_APP_TEST=y` and
`*RTE_TEST_PMD=y` for testing.
$ make -f Makefile.spp # compile DPDK for testing
Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
Makefile.spp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.spp b/Makefile.spp
index ec6bab3..cc8d49f 100644
--- a/Makefile.spp
+++ b/Makefile.spp
@@ -29,7 +29,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-T ?= x86_64-ivshmem-linuxapp-gcc
+T ?= x86_64-native-linuxapp-gcc
all:
make -C $(RTE_SDK) T=$(T) config
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-11-26 7:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-26 7:26 [spp] [PATCH 0/3] Revise makefile ogawa.yasufumi
2018-11-26 7:26 ` [spp] [PATCH 1/3] makefile: fix problem of dependency is not checked ogawa.yasufumi
2018-11-26 7:26 ` [spp] [PATCH 2/3] makefile: introduce GNUmakefile ogawa.yasufumi
2018-11-26 7:26 ` [spp] [PATCH 3/3] makefile: update Makefile for testing DPDK ogawa.yasufumi
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).