X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=examples%2Feventdev_pipeline%2FMakefile;h=1a789ccc36f17eece252e0fa5a8c4a88d073b9f4;hb=466dcf34d728db0ae86d83f37dd7db5c20dd2979;hp=f8063ce45fb9af45907364da95bc5acd3c9c9ee5;hpb=22119c4591a008abe5de8e395a97fcc09c8dc14a;p=dpdk.git diff --git a/examples/eventdev_pipeline/Makefile b/examples/eventdev_pipeline/Makefile index f8063ce45f..1a789ccc36 100644 --- a/examples/eventdev_pipeline/Makefile +++ b/examples/eventdev_pipeline/Makefile @@ -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