2017-05-23 15:13:49 +00:00
|
|
|
TOPDIR?=${CURDIR}/../..
|
|
|
|
|
|
|
|
ifeq ($(FF_DPDK),)
|
|
|
|
FF_DPDK=${TOPDIR}/dpdk/x86_64-native-linuxapp-gcc
|
|
|
|
endif
|
|
|
|
|
2017-06-06 08:52:52 +00:00
|
|
|
TARGET=libffcompat.a
|
|
|
|
|
|
|
|
#DEBUG=-O0 -gdwarf-2 -g3
|
2017-05-23 15:13:49 +00:00
|
|
|
|
2019-07-12 12:57:33 +00:00
|
|
|
include ${TOPDIR}/tools/opts.mk
|
|
|
|
ifneq (${MK_INET6_SUPPORT},"no")
|
|
|
|
CFLAGS+= -DINET6
|
|
|
|
endif
|
|
|
|
|
2017-05-23 15:13:49 +00:00
|
|
|
DPDK_CFLAGS= -g -Wall -Werror -include ${FF_DPDK}/include/rte_config.h
|
|
|
|
DPDK_CFLAGS+= -march=native -DRTE_MACHINE_CPUFLAG_SSE -DRTE_MACHINE_CPUFLAG_SSE2 -DRTE_MACHINE_CPUFLAG_SSE3
|
|
|
|
DPDK_CFLAGS+= -DRTE_MACHINE_CPUFLAG_SSSE3 -DRTE_MACHINE_CPUFLAG_SSE4_1 -DRTE_MACHINE_CPUFLAG_SSE4_2
|
|
|
|
DPDK_CFLAGS+= -DRTE_COMPILE_TIME_CPUFLAGS=RTE_CPUFLAG_SSE,RTE_CPUFLAG_SSE2,RTE_CPUFLAG_SSE3,RTE_CPUFLAG_SSSE3,RTE_CPUFLAG_SSE4_1,RTE_CPUFLAG_SSE4_2
|
|
|
|
DPDK_CFLAGS+= -I${FF_DPDK}/include
|
|
|
|
|
2017-06-06 08:52:52 +00:00
|
|
|
CFLAGS+= ${DPDK_CFLAGS} -I${CURDIR}/include
|
|
|
|
CFLAGS+= -I${TOPDIR}/lib -D__BSD_VISIBLE -DFSTACK
|
2017-05-23 15:13:49 +00:00
|
|
|
|
2017-06-06 08:52:52 +00:00
|
|
|
SRCS=$(wildcard *.c)
|
2017-05-23 15:13:49 +00:00
|
|
|
OBJS=$(patsubst %.c,%.o,${SRCS})
|
|
|
|
|
|
|
|
all: ${TARGET}
|
|
|
|
|
|
|
|
${TARGET}: ${OBJS}
|
|
|
|
ar -cqs $@ ${OBJS}
|
|
|
|
|
|
|
|
${OBJS}: %.o: %.c
|
|
|
|
${CC} -c $< ${CFLAGS} -o $@
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm -f *.o ${TARGET}
|