X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fvhost_scsi%2FMakefile;h=0a3450bae57d1771e5f995049875f85c8c141d5c;hb=c1656328dbc20420b7ba87b1abee7b699c8e84f4;hp=31bd2563c4920ab6bbb765d5c8368c0c4a7c9681;hpb=1842d194c950edc91b943a7ba2c598c495d4d58c;p=dpdk.git diff --git a/examples/vhost_scsi/Makefile b/examples/vhost_scsi/Makefile index 31bd2563c4..0a3450bae5 100644 --- a/examples/vhost_scsi/Makefile +++ b/examples/vhost_scsi/Makefile @@ -18,7 +18,7 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -CFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 +CFLAGS += -D_FILE_OFFSET_BITS=64 LDFLAGS += -pthread PC_FILE := $(shell pkg-config --path libdpdk) @@ -46,18 +46,18 @@ ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif -# Default target, can be overridden by command line or environment -RTE_TARGET ?= x86_64-native-linuxapp-gcc +# Default target, detect a build directory, by looking for a path with a .config +RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) include $(RTE_SDK)/mk/rte.vars.mk -ifneq ($(CONFIG_RTE_EXEC_ENV),"linuxapp") -$(info This application can only operate in a linuxapp environment, \ +ifneq ($(CONFIG_RTE_EXEC_ENV_LINUX),y) +$(info This application can only operate in a linux environment, \ please change the definition of the RTE_TARGET environment variable) all: else -CFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 +CFLAGS += -D_FILE_OFFSET_BITS=64 CFLAGS += -O2 CFLAGS += $(WERROR_FLAGS)