examples: put app name and sources at top of makefiles
[dpdk.git] / examples / ipsec-secgw / Makefile
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2016 Intel Corporation
3
4 APP = ipsec-secgw
5
6 #
7 # all source are stored in SRCS-y
8 #
9 SRCS-y += parser.c
10 SRCS-y += ipsec.c
11 SRCS-y += esp.c
12 SRCS-y += sp4.c
13 SRCS-y += sp6.c
14 SRCS-y += sa.c
15 SRCS-y += rt.c
16 SRCS-y += ipsec-secgw.c
17
18 ifeq ($(RTE_SDK),)
19         $(error "Please define RTE_SDK environment variable")
20 endif
21
22 # Default target, can be overridden by command line or environment
23 RTE_TARGET ?= x86_64-native-linuxapp-gcc
24
25 include $(RTE_SDK)/mk/rte.vars.mk
26
27 ifneq ($(MAKECMDGOALS),clean)
28 ifneq ($(CONFIG_RTE_LIBRTE_SECURITY),y)
29 $(error "RTE_LIBRTE_SECURITY is required to build ipsec-secgw")
30 endif
31 endif
32
33 CFLAGS += -DALLOW_EXPERIMENTAL_API
34 CFLAGS += -O3 -gdwarf-2
35 CFLAGS += $(WERROR_FLAGS)
36 ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
37 CFLAGS_sa.o += -diag-disable=vec
38 endif
39
40 ifeq ($(DEBUG),1)
41 CFLAGS += -DIPSEC_DEBUG -fstack-protector-all -O0
42 endif
43
44 include $(RTE_SDK)/mk/rte.extapp.mk