X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fflow_classify%2FMakefile;h=f1fa4df624b6b6515cda7ba1ceb39bfed0801d77;hb=f3a5fa85cfd191522baa8cc144c9d95e7e658972;hp=baeac3b7dba98eb1d57ad294246f83890b81847e;hpb=22119c4591a008abe5de8e395a97fcc09c8dc14a;p=dpdk.git diff --git a/examples/flow_classify/Makefile b/examples/flow_classify/Makefile index baeac3b7db..f1fa4df624 100644 --- a/examples/flow_classify/Makefile +++ b/examples/flow_classify/Makefile @@ -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