1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2016 Intel Corporation
7 # all source are stored in SRCS-y
16 SRCS-y
+= ipsec_process.c
17 SRCS-y
+= ipsec-secgw.c
21 # Build using pkg-config variables if possible
22 $(shell pkg-config
--exists libdpdk
)
23 ifeq ($(.SHELLSTATUS
),0)
27 shared
: build
/$(APP
)-shared
28 ln
-sf
$(APP
)-shared build
/$(APP
)
29 static
: build
/$(APP
)-static
30 ln
-sf
$(APP
)-static build
/$(APP
)
32 PC_FILE
:= $(shell pkg-config
--path libdpdk
)
33 CFLAGS
+= -O3
$(shell pkg-config
--cflags libdpdk
)
34 LDFLAGS_SHARED
= $(shell pkg-config
--libs libdpdk
)
35 LDFLAGS_STATIC
= -Wl
,-Bstatic
$(shell pkg-config
--static
--libs libdpdk
)
37 CFLAGS
+= -DALLOW_EXPERIMENTAL_API
39 build
/$(APP
)-shared
: $(SRCS-y
) Makefile
$(PC_FILE
) | build
40 $(CC
) $(CFLAGS
) $(SRCS-y
) -o
$@
$(LDFLAGS
) $(LDFLAGS_SHARED
)
42 build
/$(APP
)-static
: $(SRCS-y
) Makefile
$(PC_FILE
) | build
43 $(CC
) $(CFLAGS
) $(SRCS-y
) -o
$@
$(LDFLAGS
) $(LDFLAGS_STATIC
)
50 rm -f build
/$(APP
) build
/$(APP
)-static build
/$(APP
)-shared
51 rmdir
--ignore-fail-on-non-empty build
56 $(error
"Please define RTE_SDK environment variable")
59 # Default target, detect a build directory, by looking for a path with a .config
60 RTE_TARGET ?
= $(notdir $(abspath
$(dir $(firstword $(wildcard $(RTE_SDK
)/*/.config
)))))
62 include $(RTE_SDK
)/mk
/rte.vars.mk
64 ifneq ($(MAKECMDGOALS
),clean)
65 ifneq ($(CONFIG_RTE_LIBRTE_IPSEC
),y
)
66 $(error
"RTE_LIBRTE_IPSEC is required to build ipsec-secgw")
70 CFLAGS
+= -DALLOW_EXPERIMENTAL_API
71 CFLAGS
+= -O3
-gdwarf-2
72 CFLAGS
+= $(WERROR_FLAGS
)
73 ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC
),y
)
74 CFLAGS_sa.o
+= -diag-disable
=vec
78 CFLAGS
+= -DIPSEC_DEBUG
-fstack-protector-all
-O0
81 include $(RTE_SDK
)/mk
/rte.extapp.mk