2017-05-23 15:13:49 +00:00
|
|
|
TOPDIR?=${CURDIR}/../..
|
|
|
|
|
2021-02-05 08:42:07 +00:00
|
|
|
ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
|
|
|
|
$(error "no installation of DPDK found, maybe you shuld export environment variable `PKG_CONFIG_PATH`")
|
2017-05-23 15:13:49 +00:00
|
|
|
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
|
|
|
|
|
2021-02-05 08:42:07 +00:00
|
|
|
PKGCONF ?= pkg-config
|
|
|
|
|
|
|
|
DPDK_CFLAGS= -g -Wall -Werror -Wno-deprecated-declarations $(shell $(PKGCONF) --cflags libdpdk)
|
2017-05-23 15:13:49 +00:00
|
|
|
|
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}
|