forked from usnistgov/ndn-dpdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcflags.sh
22 lines (20 loc) · 852 Bytes
/
cflags.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
export CC=${CC:-gcc}
MESONFLAGS=
CFLAGS='-Wno-unused-function -Wno-unused-parameter -Wno-missing-braces -D_GNU_SOURCE'
LGCOV=
if [[ ${NDNDPDK_MK_RELEASE:-} -eq 1 ]]; then
CFLAGS+=' -DNDEBUG -DN_LOG_LEVEL=RTE_LOG_NOTICE'
fi
if [[ ${NDNDPDK_MK_POISON:-} -eq 1 ]]; then
CFLAGS+=' -DNDNDPDK_POISON'
fi
if [[ ${NDNDPDK_MK_THREADSLEEP:-} -eq 1 ]]; then
CFLAGS+=' -DNDNDPDK_THREADSLEEP'
fi
if [[ ${NDNDPDK_MK_COVERAGE:-} -eq 1 ]]; then
MESONFLAGS+=' -Db_coverage=true'
LGCOV='-lgcov'
fi
export CFLAGS
CGO_CFLAGS="-Werror $CFLAGS -m64 -pthread -O3 -g $(pkg-config --cflags libdpdk liburing | sed 's/-include [^ ]*//g')"
CGO_LIBS="-L/usr/local/lib $LGCOV -lurcu-qsbr -lurcu-cds -lubpf -lcrypto $(pkg-config --libs spdk_bdev spdk_init spdk_env_dpdk) -lssl -lrte_bus_pci -lrte_bus_vdev -lrte_net_ring $(pkg-config --libs libdpdk liburing) -lnuma -lm"