1TOPDIR?=${CURDIR}/../.. 2 3ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) 4$(error "no installation of DPDK found, maybe you shuld export environment variable `PKG_CONFIG_PATH`") 5endif 6 7TARGET=libffcompat.a 8 9#DEBUG=-O0 -gdwarf-2 -g3 10 11include ${TOPDIR}/tools/opts.mk 12ifneq (${MK_INET6_SUPPORT},"no") 13CFLAGS+= -DINET6 14endif 15 16PKGCONF ?= pkg-config 17 18DPDK_CFLAGS= -g -Wall -Werror -Wno-deprecated-declarations $(shell $(PKGCONF) --cflags libdpdk) 19 20CFLAGS+= ${DPDK_CFLAGS} -I${CURDIR}/include 21CFLAGS+= -I${TOPDIR}/lib -D__BSD_VISIBLE -DFSTACK 22 23SRCS=$(wildcard *.c) 24OBJS=$(patsubst %.c,%.o,${SRCS}) 25 26all: ${TARGET} 27 28${TARGET}: ${OBJS} 29 ar -cqs $@ ${OBJS} 30 31${OBJS}: %.o: %.c 32 ${CC} -c $< ${CFLAGS} -o $@ 33 34 35.PHONY: clean 36clean: 37 rm -f *.o ${TARGET} 38