examples: enable linking both static and shared
Since the DPDK build now includes both static and shared libraries, we need a new way to enable building the examples using either method from the one installation. To do this, we add in a default "shared" target, and a separate "static" target which links in the DPDK static libraries. In both cases, the final application name is symlinked to the last-built static or shared target, with both binaries able to co-exist in the build directory. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org>
This commit is contained in:
parent
ed4d43d73e
commit
1842d194c9
@ -11,21 +11,32 @@ SRCS-y := main.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
CFLAGS += -DALLOW_EXPERIMENTAL_API
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else
|
||||
|
@ -11,19 +11,32 @@ SRCS-y := main.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
LDFLAGS += -lrte_pmd_bond
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else
|
||||
|
@ -11,19 +11,30 @@ SRCS-y := main.c commands.c parse_obj_list.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else
|
||||
|
@ -11,19 +11,30 @@ SRCS-y := main.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else
|
||||
|
@ -13,21 +13,32 @@ SRCS-y += pipeline_worker_tx.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
CFLAGS += -DALLOW_EXPERIMENTAL_API
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else
|
||||
|
@ -11,19 +11,30 @@ SRCS-y := main.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else
|
||||
|
@ -11,21 +11,32 @@ SRCS-y := flow_classify.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
CFLAGS += -DALLOW_EXPERIMENTAL_API
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else
|
||||
|
@ -38,19 +38,30 @@ SRCS-y := main.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else
|
||||
|
@ -11,19 +11,30 @@ SRCS-y := main.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else
|
||||
|
@ -12,19 +12,30 @@ SRCS-y := main.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else
|
||||
|
@ -34,9 +34,17 @@ SRCS-y += pipeline_routing.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
VPATH += pipeline
|
||||
CFLAGS += -I. -I./pipeline/
|
||||
@ -46,15 +54,18 @@ OBJS := $(patsubst %.c,build/%.o,$(SRCS-y))
|
||||
build/%.o: %.c Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
build/$(APP): $(OBJS)
|
||||
$(CC) $(OBJS) -o $@ $(LDFLAGS)
|
||||
build/$(APP)-shared: $(OBJS)
|
||||
$(CC) $(OBJS) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(OBJS)
|
||||
$(CC) $(OBJS) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP) build/*.o
|
||||
rm -f build/$(APP)* build/*.o
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else
|
||||
|
@ -12,19 +12,30 @@ SRCS-y := main.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else
|
||||
|
@ -21,21 +21,32 @@ CFLAGS += -gdwarf-2
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
CFLAGS += -DALLOW_EXPERIMENTAL_API
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else
|
||||
|
@ -12,19 +12,30 @@ SRCS-y := main.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else # Build using legacy build system
|
||||
|
@ -11,19 +11,30 @@ SRCS-y := main.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else # Build using legacy build system
|
||||
|
@ -11,22 +11,33 @@ SRCS-y := l2fwd-cat.c cat.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
CFLAGS += -D_GNU_SOURCE
|
||||
LDFLAGS += -lpqos
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else # Build using legacy build system
|
||||
|
@ -11,19 +11,30 @@ SRCS-y := main.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else # Build using legacy build system
|
||||
|
@ -11,19 +11,30 @@ SRCS-y := main.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else # Build using legacy build system
|
||||
|
@ -11,21 +11,32 @@ SRCS-y := main.c shm.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
LDFLAGS += -lrt
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
LDFLAGS += -pthread -lrt
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else # Build using legacy build system
|
||||
|
@ -11,19 +11,30 @@ SRCS-y := main.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else # Build using legacy build system
|
||||
|
@ -11,19 +11,30 @@ SRCS-y := main.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else # Build using legacy build system
|
||||
|
@ -11,19 +11,30 @@ SRCS-y := main.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else # Build using legacy build system
|
||||
|
@ -11,19 +11,30 @@ SRCS-y := main.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else # Build using legacy build system
|
||||
|
@ -11,19 +11,30 @@ SRCS-y := main.c l3fwd_lpm.c l3fwd_em.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else # Build using legacy build system
|
||||
|
@ -11,19 +11,30 @@ SRCS-y := main.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else # Build using legacy build system
|
||||
|
@ -11,19 +11,30 @@ SRCS-y := main.c config.c init.c runtime.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else # Build using legacy build system
|
||||
|
@ -11,19 +11,30 @@ SRCS-y := main.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else # Build using legacy build system
|
||||
|
@ -11,19 +11,30 @@ SRCS-y := ptpclient.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else # Build using legacy build system
|
||||
|
@ -11,19 +11,30 @@ SRCS-y := main.c rte_policer.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else # Build using legacy build system
|
||||
|
@ -11,19 +11,30 @@ SRCS-y := main.c args.c init.c app_thread.c cfg_file.c cmdline.c stats.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else # Build using legacy build system
|
||||
|
@ -11,19 +11,30 @@ SRCS-y := main.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else # Build using legacy build system
|
||||
|
@ -11,21 +11,32 @@ SRCS-y := main.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
CFLAGS += -DALLOW_EXPERIMENTAL_API
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else
|
||||
|
@ -11,19 +11,30 @@ SRCS-y := basicfwd.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else # Build using legacy build system
|
||||
|
@ -11,19 +11,32 @@ SRCS-y := main.c vxlan_setup.c vxlan.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
LDFLAGS += -pthread
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else # Build using legacy build system
|
||||
|
@ -11,19 +11,30 @@ SRCS-y := main.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else # Build using legacy build system
|
||||
|
@ -11,19 +11,32 @@ SRCS-y := main.c virtio_net.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
LDFLAGS += -pthread
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else # Build using legacy build system
|
||||
|
@ -11,21 +11,33 @@ SRCS-y := scsi.c vhost_scsi.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
CFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
|
||||
LDFLAGS += -pthread
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else # Build using legacy build system
|
||||
|
@ -11,19 +11,30 @@ SRCS-y := main.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else # Build using legacy build system
|
||||
|
@ -11,19 +11,30 @@ SRCS-y := main.c
|
||||
$(shell pkg-config --exists libdpdk)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS += $(shell pkg-config --libs libdpdk)
|
||||
all: shared
|
||||
.PHONY: shared static
|
||||
shared: build/$(APP)-shared
|
||||
ln -sf $(APP)-shared build/$(APP)
|
||||
static: build/$(APP)-static
|
||||
ln -sf $(APP)-static build/$(APP)
|
||||
|
||||
build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
|
||||
PC_FILE := $(shell pkg-config --path libdpdk)
|
||||
CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
|
||||
LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
|
||||
LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
|
||||
|
||||
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
|
||||
|
||||
build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build
|
||||
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f build/$(APP)
|
||||
rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
|
||||
rmdir --ignore-fail-on-non-empty build
|
||||
|
||||
else # Build using legacy build system
|
||||
|
Loading…
Reference in New Issue
Block a user