-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
35 lines (27 loc) · 951 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#
# Makefile for kryptonite
#
PKGCONF = pkg-config
ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
$(error "no installation of DPDK found")
endif
ifneq ($(shell pkg-config --exists doca-flow && echo 0),0)
$(error "no installation of DOCA found")
endif
# Note: doca-dpdk-bridge is required by doca_dpdk_port_probe
CFLAGS += -g -O3 -Wno-deprecated-declarations -DHAVE_DPDK \
$(shell $(PKGCONF) --cflags libdpdk) \
$(shell $(PKGCONF) --cflags doca-flow) \
$(shell $(PKGCONF) --cflags doca-argp) \
$(shell $(PKGCONF) --cflags doca-common) \
$(shell $(PKGCONF) --cflags doca-dpdk-bridge)
LDFLAGS += $(shell $(PKGCONF) --libs libdpdk) \
$(shell $(PKGCONF) --libs doca-flow) \
$(shell $(PKGCONF) --libs doca-argp) \
$(shell $(PKGCONF) --libs doca-common) \
$(shell $(PKGCONF) --libs doca-dpdk-bridge) \
-lpthread -ldl
APP = kryptonite
SRCS-y := kryptonite.c
$(APP): $(SRCS-y) Makefile
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)