examples: put app name and sources at top of makefiles
[dpdk.git] / examples / l2fwd-cat / Makefile
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2016 Intel Corporation
3
4 # binary name
5 APP = l2fwd-cat
6
7 # all source are stored in SRCS-y
8 SRCS-y := l2fwd-cat.c cat.c
9
10 ifeq ($(RTE_SDK),)
11 $(error "Please define RTE_SDK environment variable")
12 endif
13
14 ifeq ($(PQOS_INSTALL_PATH),)
15 $(error "Please define PQOS_INSTALL_PATH environment variable")
16 endif
17
18 # Default target, can be overridden by command line or environment
19 RTE_TARGET ?= x86_64-native-linuxapp-gcc
20
21 include $(RTE_SDK)/mk/rte.vars.mk
22
23 CFLAGS += $(WERROR_FLAGS)
24
25 # workaround for a gcc bug with noreturn attribute
26 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
27 ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
28 CFLAGS_main.o += -Wno-return-type
29 endif
30
31 EXTRA_CFLAGS += -O3 -g -Wfatal-errors
32
33 CFLAGS += -I$(PQOS_INSTALL_PATH)/../include
34 CFLAGS_cat.o := -D_GNU_SOURCE
35
36 LDLIBS += -L$(PQOS_INSTALL_PATH)
37 LDLIBS += -lpqos
38
39 include $(RTE_SDK)/mk/rte.extapp.mk