From: Bruce Richardson Date: Mon, 25 Sep 2017 16:28:49 +0000 (+0100) Subject: examples: put app name and sources at top of makefiles X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=0eba4ade654bae51877474fb64ab5e79df0f3442;p=dpdk.git examples: put app name and sources at top of makefiles Reorder the text in the makefiles, so that the app name and the source files are listed first. This then will allow them to be shared later in a combined makefile building with pkg-config and RTE_SDK-based build system. Signed-off-by: Bruce Richardson Reviewed-by: Luca Boccassi --- diff --git a/examples/bbdev_app/Makefile b/examples/bbdev_app/Makefile index cdd4a12eaa..8cb89799f9 100644 --- a/examples/bbdev_app/Makefile +++ b/examples/bbdev_app/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation +# binary name +APP = bbdev + +# all source are stored in SRCS-y +SRCS-y := main.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -10,12 +16,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = bbdev - -# all source are stored in SRCS-y -SRCS-y := main.c - CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/examples/bond/Makefile b/examples/bond/Makefile index ba849cd6ff..edc699da46 100644 --- a/examples/bond/Makefile +++ b/examples/bond/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2015 Intel Corporation +# binary name +APP = bond_app + +# all source are stored in SRCS-y +SRCS-y := main.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -10,12 +16,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = bond_app - -# all source are stored in SRCS-y -SRCS-y := main.c - CFLAGS += $(WERROR_FLAGS) # workaround for a gcc bug with noreturn attribute diff --git a/examples/cmdline/Makefile b/examples/cmdline/Makefile index 5b47f95580..fca3a8259b 100644 --- a/examples/cmdline/Makefile +++ b/examples/cmdline/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation +# binary name +APP = cmdline + +# all source are stored in SRCS-y +SRCS-y := main.c commands.c parse_obj_list.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif diff --git a/examples/distributor/Makefile b/examples/distributor/Makefile index 7c14056e35..4277877914 100644 --- a/examples/distributor/Makefile +++ b/examples/distributor/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation +# binary name +APP = distributor_app + +# all source are stored in SRCS-y +SRCS-y := main.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -10,12 +16,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = distributor_app - -# all source are stored in SRCS-y -SRCS-y := main.c - CFLAGS += $(WERROR_FLAGS) # workaround for a gcc bug with noreturn attribute diff --git a/examples/eventdev_pipeline/Makefile b/examples/eventdev_pipeline/Makefile index 5cdb076b56..888f8215f6 100644 --- a/examples/eventdev_pipeline/Makefile +++ b/examples/eventdev_pipeline/Makefile @@ -1,6 +1,14 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2016-2017 Intel Corporation +# binary name +APP = eventdev_pipeline + +# all source are stored in SRCS-y +SRCS-y := main.c +SRCS-y += pipeline_worker_generic.c +SRCS-y += pipeline_worker_tx.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -10,14 +18,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = eventdev_pipeline - -# all source are stored in SRCS-y -SRCS-y := main.c -SRCS-y += pipeline_worker_generic.c -SRCS-y += pipeline_worker_tx.c - CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/examples/exception_path/Makefile b/examples/exception_path/Makefile index 317d16f57e..e0a31ccba4 100644 --- a/examples/exception_path/Makefile +++ b/examples/exception_path/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation +# binary name +APP = exception_path + +# all source are stored in SRCS-y +SRCS-y := main.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -10,12 +16,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = exception_path - -# all source are stored in SRCS-y -SRCS-y := main.c - CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/examples/flow_classify/Makefile b/examples/flow_classify/Makefile index a00b75effb..9246f15d7d 100644 --- a/examples/flow_classify/Makefile +++ b/examples/flow_classify/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation +# binary name +APP = flow_classify + +# all source are stored in SRCS-y +SRCS-y := flow_classify.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -10,13 +16,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = flow_classify - - -# all source are stored in SRCS-y -SRCS-y := flow_classify.c - CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/examples/flow_filtering/Makefile b/examples/flow_filtering/Makefile index 70b82fe392..d6c71e33c7 100644 --- a/examples/flow_filtering/Makefile +++ b/examples/flow_filtering/Makefile @@ -30,6 +30,10 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # +APP = flow + +SRCS-y := main.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -39,10 +43,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -APP = flow - -SRCS-y := main.c - CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/examples/helloworld/Makefile b/examples/helloworld/Makefile index ed473b03cb..1e58e41124 100644 --- a/examples/helloworld/Makefile +++ b/examples/helloworld/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation +# binary name +APP = helloworld + +# all source are stored in SRCS-y +SRCS-y := main.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -10,12 +16,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = helloworld - -# all source are stored in SRCS-y -SRCS-y := main.c - CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/examples/ip_fragmentation/Makefile b/examples/ip_fragmentation/Makefile index 8b8f99ce35..e323e00156 100644 --- a/examples/ip_fragmentation/Makefile +++ b/examples/ip_fragmentation/Makefile @@ -2,6 +2,12 @@ # Copyright(c) 2010-2014 Intel Corporation # +# binary name +APP = ip_fragmentation + +# all source are stored in SRCS-y +SRCS-y := main.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -11,12 +17,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = ip_fragmentation - -# all source are stored in SRCS-y -SRCS-y := main.c - CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/examples/ip_pipeline/Makefile b/examples/ip_pipeline/Makefile index 8a4745a1bf..183532a728 100644 --- a/examples/ip_pipeline/Makefile +++ b/examples/ip_pipeline/Makefile @@ -1,6 +1,37 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation +# binary name +APP = ip_pipeline + +VPATH += $(SRCDIR)/pipeline + +# all source are stored in SRCS-y +SRCS-y := main.c +SRCS-y += config_parse.c +SRCS-y += parser.c +SRCS-y += config_parse_tm.c +SRCS-y += config_check.c +SRCS-y += init.c +SRCS-y += thread.c +SRCS-y += thread_fe.c +SRCS-y += cpu_core_map.c + +SRCS-y += pipeline_common_be.c +SRCS-y += pipeline_common_fe.c +SRCS-y += pipeline_master_be.c +SRCS-y += pipeline_master.c +SRCS-y += pipeline_passthrough_be.c +SRCS-y += pipeline_passthrough.c +SRCS-y += pipeline_firewall_be.c +SRCS-y += pipeline_firewall.c +SRCS-y += pipeline_flow_classification_be.c +SRCS-y += pipeline_flow_classification.c +SRCS-y += pipeline_flow_actions_be.c +SRCS-y += pipeline_flow_actions.c +SRCS-y += pipeline_routing_be.c +SRCS-y += pipeline_routing.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -10,38 +41,9 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = ip_pipeline - -VPATH += $(SRCDIR)/pipeline - INC += $(sort $(wildcard *.h)) $(sort $(wildcard pipeline/*.h)) -# all source are stored in SRCS-y -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) := main.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += config_parse.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += parser.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += config_parse_tm.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += config_check.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += init.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += thread.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += thread_fe.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += cpu_core_map.c - -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_common_be.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_common_fe.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_master_be.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_master.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_passthrough_be.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_passthrough.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_firewall_be.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_firewall.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_flow_classification_be.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_flow_classification.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_flow_actions_be.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_flow_actions.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_routing_be.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_routing.c +SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) := $(SRCS-y) CFLAGS += -I$(SRCDIR) -I$(SRCDIR)/pipeline CFLAGS += -O3 diff --git a/examples/ip_reassembly/Makefile b/examples/ip_reassembly/Makefile index 58d9dce8a5..592e14c2b9 100644 --- a/examples/ip_reassembly/Makefile +++ b/examples/ip_reassembly/Makefile @@ -2,6 +2,12 @@ # Copyright(c) 2010-2014 Intel Corporation # +# binary name +APP = ip_reassembly + +# all source are stored in SRCS-y +SRCS-y := main.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -11,12 +17,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = ip_reassembly - -# all source are stored in SRCS-y -SRCS-y := main.c - CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/examples/ipsec-secgw/Makefile b/examples/ipsec-secgw/Makefile index c4d07cc9de..36acd3f74e 100644 --- a/examples/ipsec-secgw/Makefile +++ b/examples/ipsec-secgw/Makefile @@ -1,6 +1,20 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2016 Intel Corporation +APP = ipsec-secgw + +# +# all source are stored in SRCS-y +# +SRCS-y += parser.c +SRCS-y += ipsec.c +SRCS-y += esp.c +SRCS-y += sp4.c +SRCS-y += sp6.c +SRCS-y += sa.c +SRCS-y += rt.c +SRCS-y += ipsec-secgw.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -16,8 +30,6 @@ $(error "RTE_LIBRTE_SECURITY is required to build ipsec-secgw") endif endif -APP = ipsec-secgw - CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 -gdwarf-2 CFLAGS += $(WERROR_FLAGS) @@ -29,16 +41,4 @@ ifeq ($(DEBUG),1) CFLAGS += -DIPSEC_DEBUG -fstack-protector-all -O0 endif -# -# all source are stored in SRCS-y -# -SRCS-y += parser.c -SRCS-y += ipsec.c -SRCS-y += esp.c -SRCS-y += sp4.c -SRCS-y += sp6.c -SRCS-y += sa.c -SRCS-y += rt.c -SRCS-y += ipsec-secgw.c - include $(RTE_SDK)/mk/rte.extapp.mk diff --git a/examples/ipv4_multicast/Makefile b/examples/ipv4_multicast/Makefile index 156ab4c0dd..c5a33ed9eb 100644 --- a/examples/ipv4_multicast/Makefile +++ b/examples/ipv4_multicast/Makefile @@ -2,6 +2,12 @@ # Copyright(c) 2010-2014 Intel Corporation # +# binary name +APP = ipv4_multicast + +# all source are stored in SRCS-y +SRCS-y := main.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -11,12 +17,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = ipv4_multicast - -# all source are stored in SRCS-y -SRCS-y := main.c - CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/examples/kni/Makefile b/examples/kni/Makefile index eb7781f0aa..0aab997fd5 100644 --- a/examples/kni/Makefile +++ b/examples/kni/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation +# binary name +APP = kni + +# all source are stored in SRCS-y +SRCS-y := main.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -15,12 +21,6 @@ $(error This application can only operate in a linuxapp environment, \ please change the definition of the RTE_TARGET environment variable) endif -# binary name -APP = kni - -# all source are stored in SRCS-y -SRCS-y := main.c - CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile index a3f1534fff..afb15c2909 100644 --- a/examples/l2fwd-cat/Makefile +++ b/examples/l2fwd-cat/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2016 Intel Corporation +# binary name +APP = l2fwd-cat + +# all source are stored in SRCS-y +SRCS-y := l2fwd-cat.c cat.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -14,12 +20,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = l2fwd-cat - -# all source are stored in SRCS-y -SRCS-y := l2fwd-cat.c cat.c - CFLAGS += $(WERROR_FLAGS) # workaround for a gcc bug with noreturn attribute diff --git a/examples/l2fwd-crypto/Makefile b/examples/l2fwd-crypto/Makefile index 7dba86da3f..c920be75ea 100644 --- a/examples/l2fwd-crypto/Makefile +++ b/examples/l2fwd-crypto/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation +# binary name +APP = l2fwd-crypto + +# all source are stored in SRCS-y +SRCS-y := main.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -10,12 +16,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = l2fwd-crypto - -# all source are stored in SRCS-y -SRCS-y := main.c - CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/examples/l2fwd-jobstats/Makefile b/examples/l2fwd-jobstats/Makefile index 3a3e57dacb..642717e2b0 100644 --- a/examples/l2fwd-jobstats/Makefile +++ b/examples/l2fwd-jobstats/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2015 Intel Corporation +# binary name +APP = l2fwd-jobstats + +# all source are stored in SRCS-y +SRCS-y := main.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -10,12 +16,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = l2fwd-jobstats - -# all source are stored in SRCS-y -SRCS-y := main.c - CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/examples/l2fwd-keepalive/Makefile b/examples/l2fwd-keepalive/Makefile index 5d46932dc6..d1cf4c7951 100644 --- a/examples/l2fwd-keepalive/Makefile +++ b/examples/l2fwd-keepalive/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2016 Intel Corporation +# binary name +APP = l2fwd-keepalive + +# all source are stored in SRCS-y +SRCS-y := main.c shm.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -10,12 +16,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = l2fwd-keepalive - -# all source are stored in SRCS-y -SRCS-y := main.c shm.c - CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) LDFLAGS += -lrt diff --git a/examples/l2fwd/Makefile b/examples/l2fwd/Makefile index b0cdfac1e0..8b6ac945fe 100644 --- a/examples/l2fwd/Makefile +++ b/examples/l2fwd/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation +# binary name +APP = l2fwd + +# all source are stored in SRCS-y +SRCS-y := main.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -10,12 +16,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = l2fwd - -# all source are stored in SRCS-y -SRCS-y := main.c - CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/examples/l3fwd-acl/Makefile b/examples/l3fwd-acl/Makefile index 05142ce11a..56129fad32 100644 --- a/examples/l3fwd-acl/Makefile +++ b/examples/l3fwd-acl/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation +# binary name +APP = l3fwd-acl + +# all source are stored in SRCS-y +SRCS-y := main.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -10,12 +16,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = l3fwd-acl - -# all source are stored in SRCS-y -SRCS-y := main.c - CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/examples/l3fwd-power/Makefile b/examples/l3fwd-power/Makefile index dfd77d6096..9b8f63f483 100644 --- a/examples/l3fwd-power/Makefile +++ b/examples/l3fwd-power/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation +# binary name +APP = l3fwd-power + +# all source are stored in SRCS-y +SRCS-y := main.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -16,12 +22,6 @@ please change the definition of the RTE_TARGET environment variable) all: else -# binary name -APP = l3fwd-power - -# all source are stored in SRCS-y -SRCS-y := main.c - CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/examples/l3fwd-vf/Makefile b/examples/l3fwd-vf/Makefile index 79a0b7d788..2dc8a7c067 100644 --- a/examples/l3fwd-vf/Makefile +++ b/examples/l3fwd-vf/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation +# binary name +APP = l3fwd-vf + +# all source are stored in SRCS-y +SRCS-y := main.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -10,12 +16,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = l3fwd-vf - -# all source are stored in SRCS-y -SRCS-y := main.c - CFLAGS += -O3 $(USER_FLAGS) CFLAGS += $(WERROR_FLAGS) diff --git a/examples/l3fwd/Makefile b/examples/l3fwd/Makefile index 6cd656108e..f44bf898bb 100644 --- a/examples/l3fwd/Makefile +++ b/examples/l3fwd/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2016 Intel Corporation +# binary name +APP = l3fwd + +# all source are stored in SRCS-y +SRCS-y := main.c l3fwd_lpm.c l3fwd_em.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -10,12 +16,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = l3fwd - -# all source are stored in SRCS-y -SRCS-y := main.c l3fwd_lpm.c l3fwd_em.c - CFLAGS += -I$(SRCDIR) CFLAGS += -O3 $(USER_FLAGS) CFLAGS += $(WERROR_FLAGS) diff --git a/examples/link_status_interrupt/Makefile b/examples/link_status_interrupt/Makefile index 1b4c05c2bf..d9ecddf7c2 100644 --- a/examples/link_status_interrupt/Makefile +++ b/examples/link_status_interrupt/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation +# binary name +APP = link_status_interrupt + +# all source are stored in SRCS-y +SRCS-y := main.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -10,12 +16,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = link_status_interrupt - -# all source are stored in SRCS-y -SRCS-y := main.c - CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/examples/load_balancer/Makefile b/examples/load_balancer/Makefile index 9814dcc604..8476a0d81a 100644 --- a/examples/load_balancer/Makefile +++ b/examples/load_balancer/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation +# binary name +APP = load_balancer + +# all source are stored in SRCS-y +SRCS-y := main.c config.c init.c runtime.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -10,12 +16,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = load_balancer - -# all source are stored in SRCS-y -SRCS-y := main.c config.c init.c runtime.c - CFLAGS += -O3 -g CFLAGS += $(WERROR_FLAGS) CFLAGS_config.o := -D_GNU_SOURCE diff --git a/examples/multi_process/l2fwd_fork/Makefile b/examples/multi_process/l2fwd_fork/Makefile index de3f240395..b65582ef10 100644 --- a/examples/multi_process/l2fwd_fork/Makefile +++ b/examples/multi_process/l2fwd_fork/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation +# binary name +APP = l2fwd-fork + +# all source are stored in SRCS-y +SRCS-y := main.c flib.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -10,12 +16,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = l2fwd_fork - -# all source are stored in SRCS-y -SRCS-y := main.c flib.c - CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/examples/packet_ordering/Makefile b/examples/packet_ordering/Makefile index c54635faf9..18fac4a98e 100644 --- a/examples/packet_ordering/Makefile +++ b/examples/packet_ordering/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation +# binary name +APP = packet_ordering + +# all source are stored in SRCS-y +SRCS-y := main.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -10,12 +16,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = packet_ordering - -# all source are stored in SRCS-y -SRCS-y := main.c - CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile index 536b4a8089..a2f4638d15 100644 --- a/examples/ptpclient/Makefile +++ b/examples/ptpclient/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2015 Intel Corporation +# binary name +APP = ptpclient + +# all source are stored in SRCS-y +SRCS-y := ptpclient.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -10,12 +16,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = ptpclient - -# all source are stored in SRCS-y -SRCS-y := ptpclient.c - CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/examples/qos_meter/Makefile b/examples/qos_meter/Makefile index 64efbca35e..e2407bc597 100644 --- a/examples/qos_meter/Makefile +++ b/examples/qos_meter/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation +# binary name +APP = qos_meter + +# all source are stored in SRCS-y +SRCS-y := main.c rte_policer.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -10,12 +16,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = qos_meter - -# all source are stored in SRCS-y -SRCS-y := main.c rte_policer.c - CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile index 8ceda12b55..22e5b6d8eb 100644 --- a/examples/qos_sched/Makefile +++ b/examples/qos_sched/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation +# binary name +APP = qos_sched + +# all source are stored in SRCS-y +SRCS-y := main.c args.c init.c app_thread.c cfg_file.c cmdline.c stats.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -17,12 +23,6 @@ all: clean: else -# binary name -APP = qos_sched - -# all source are stored in SRCS-y -SRCS-y := main.c args.c init.c app_thread.c cfg_file.c cmdline.c stats.c - CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) CFLAGS_args.o := -D_GNU_SOURCE diff --git a/examples/rxtx_callbacks/Makefile b/examples/rxtx_callbacks/Makefile index 9efe689d42..53109dee21 100644 --- a/examples/rxtx_callbacks/Makefile +++ b/examples/rxtx_callbacks/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2015 Intel Corporation +# binary name +APP = rxtx_callbacks + +# all source are stored in SRCS-y +SRCS-y := main.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -10,12 +16,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = rxtx_callbacks - -# all source are stored in SRCS-y -SRCS-y := main.c - CFLAGS += $(WERROR_FLAGS) # workaround for a gcc bug with noreturn attribute diff --git a/examples/service_cores/Makefile b/examples/service_cores/Makefile index 4f79c9776a..46f6c54b13 100644 --- a/examples/service_cores/Makefile +++ b/examples/service_cores/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation +# binary name +APP = service_cores + +# all source are stored in SRCS-y +SRCS-y := main.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -10,12 +16,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = service_cores - -# all source are stored in SRCS-y -SRCS-y := main.c - CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += $(WERROR_FLAGS) diff --git a/examples/skeleton/Makefile b/examples/skeleton/Makefile index c19a16d656..2ee64434b8 100644 --- a/examples/skeleton/Makefile +++ b/examples/skeleton/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation +# binary name +APP = basicfwd + +# all source are stored in SRCS-y +SRCS-y := basicfwd.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -10,12 +16,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = basicfwd - -# all source are stored in SRCS-y -SRCS-y := basicfwd.c - CFLAGS += $(WERROR_FLAGS) # workaround for a gcc bug with noreturn attribute diff --git a/examples/tep_termination/Makefile b/examples/tep_termination/Makefile index 927629e592..be12e01b92 100644 --- a/examples/tep_termination/Makefile +++ b/examples/tep_termination/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2015 Intel Corporation +# binary name +APP = tep_termination + +# all source are stored in SRCS-y +SRCS-y := main.c vxlan_setup.c vxlan.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -15,12 +21,6 @@ $(error This application can only operate in a linuxapp environment, \ please change the definition of the RTE_TARGET environment variable) endif -# binary name -APP = tep_termination - -# all source are stored in SRCS-y -SRCS-y := main.c vxlan_setup.c vxlan.c - CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) CFLAGS += -D_GNU_SOURCE diff --git a/examples/timer/Makefile b/examples/timer/Makefile index 4ae21239db..e1491ed1ca 100644 --- a/examples/timer/Makefile +++ b/examples/timer/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation +# binary name +APP = timer + +# all source are stored in SRCS-y +SRCS-y := main.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -10,12 +16,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = timer - -# all source are stored in SRCS-y -SRCS-y := main.c - CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/examples/vhost/Makefile b/examples/vhost/Makefile index 051ec183e2..6328ada990 100644 --- a/examples/vhost/Makefile +++ b/examples/vhost/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation +# binary name +APP = vhost-switch + +# all source are stored in SRCS-y +SRCS-y := main.c virtio_net.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -16,12 +22,6 @@ please change the definition of the RTE_TARGET environment variable) all: else -# binary name -APP = vhost-switch - -# all source are stored in SRCS-y -SRCS-y := main.c virtio_net.c - CFLAGS += -O2 -D_FILE_OFFSET_BITS=64 CFLAGS += $(WERROR_FLAGS) CFLAGS += -D_GNU_SOURCE diff --git a/examples/vhost_scsi/Makefile b/examples/vhost_scsi/Makefile index 5ae4dd1780..8f0c580297 100644 --- a/examples/vhost_scsi/Makefile +++ b/examples/vhost_scsi/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2017 Intel Corporation +# binary name +APP = vhost-scsi + +# all source are stored in SRCS-y +SRCS-y := scsi.c vhost_scsi.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -16,12 +22,6 @@ please change the definition of the RTE_TARGET environment variable) all: else -# binary name -APP = vhost-scsi - -# all source are stored in SRCS-y -SRCS-y := scsi.c vhost_scsi.c - CFLAGS += -O2 -D_FILE_OFFSET_BITS=64 CFLAGS += $(WERROR_FLAGS) CFLAGS += -D_GNU_SOURCE diff --git a/examples/vm_power_manager/Makefile b/examples/vm_power_manager/Makefile index ef2a9f9597..700b119311 100644 --- a/examples/vm_power_manager/Makefile +++ b/examples/vm_power_manager/Makefile @@ -1,6 +1,13 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation +# binary name +APP = vm_power_mgr + +# all source are stored in SRCS-y +SRCS-y := main.c vm_power_cli.c power_manager.c channel_manager.c +SRCS-y += channel_monitor.c + ifneq ($(shell pkg-config --atleast-version=0.9.3 libvirt; echo $$?), 0) $(error vm_power_manager requires libvirt >= 0.9.3) else @@ -14,13 +21,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = vm_power_mgr - -# all source are stored in SRCS-y -SRCS-y := main.c vm_power_cli.c power_manager.c channel_manager.c -SRCS-y += channel_monitor.c - CFLAGS += -O3 -I$(RTE_SDK)/lib/librte_power/ CFLAGS += $(WERROR_FLAGS) diff --git a/examples/vmdq/Makefile b/examples/vmdq/Makefile index 9df532fb82..ddb3b0c767 100644 --- a/examples/vmdq/Makefile +++ b/examples/vmdq/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation +# binary name +APP = vmdq_app + +# all source are stored in SRCS-y +SRCS-y := main.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -10,12 +16,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = vmdq_app - -# all source are stored in SRCS-y -SRCS-y := main.c - CFLAGS += $(WERROR_FLAGS) EXTRA_CFLAGS += -O3 diff --git a/examples/vmdq_dcb/Makefile b/examples/vmdq_dcb/Makefile index 9b5832dc0d..1ebeef58e1 100644 --- a/examples/vmdq_dcb/Makefile +++ b/examples/vmdq_dcb/Makefile @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation +# binary name +APP = vmdq_dcb_app + +# all source are stored in SRCS-y +SRCS-y := main.c + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -10,12 +16,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk -# binary name -APP = vmdq_dcb_app - -# all source are stored in SRCS-y -SRCS-y := main.c - CFLAGS += $(WERROR_FLAGS) # workaround for a gcc bug with noreturn attribute