2017-05-23 15:13:49 +00:00
|
|
|
TOPDIR=..
|
|
|
|
|
|
|
|
ifeq ($(FF_PATH),)
|
|
|
|
FF_PATH=${TOPDIR}
|
|
|
|
endif
|
|
|
|
|
2021-02-05 08:42:07 +00:00
|
|
|
ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
|
2021-05-25 07:58:49 +00:00
|
|
|
$(error "No installation of DPDK found, maybe you should export environment variable `PKG_CONFIG_PATH`")
|
2017-05-23 15:13:49 +00:00
|
|
|
endif
|
|
|
|
|
2021-02-05 08:42:07 +00:00
|
|
|
PKGCONF ?= pkg-config
|
|
|
|
|
2023-04-06 13:53:02 +00:00
|
|
|
CFLAGS += -O0 -g -gdwarf-2 $(shell $(PKGCONF) --cflags libdpdk)
|
2021-02-05 08:42:07 +00:00
|
|
|
|
|
|
|
LIBS+= $(shell $(PKGCONF) --static --libs libdpdk)
|
2018-05-15 09:49:22 +00:00
|
|
|
LIBS+= -L${FF_PATH}/lib -Wl,--whole-archive,-lfstack,--no-whole-archive
|
2021-02-05 09:12:16 +00:00
|
|
|
LIBS+= -Wl,--no-whole-archive -lrt -lm -ldl -lcrypto -pthread -lnuma
|
2017-05-12 03:06:04 +00:00
|
|
|
|
2017-04-21 10:43:26 +00:00
|
|
|
TARGET="helloworld"
|
|
|
|
all:
|
2022-09-02 12:20:05 +00:00
|
|
|
cc ${CFLAGS} -DINET6 -o ${TARGET} main.c ${LIBS}
|
2021-02-05 08:42:07 +00:00
|
|
|
cc ${CFLAGS} -o ${TARGET}_epoll main_epoll.c ${LIBS}
|
2017-04-21 10:43:26 +00:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
2017-09-14 07:25:07 +00:00
|
|
|
rm -f *.o ${TARGET} ${TARGET}_epoll
|