nvme/test: build unit tests using common CFLAGS

Inherit the CFLAGS and other common setup from spdk.common.mk instead of
redefining it in nvme.unittest.mk.

In particular, this enables warnings for the unit test code that were
not enabled before.

Change-Id: Id0fbf0ee0b0d63f9de0c362d1d23e2bd036a7145
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2015-09-24 10:01:22 -07:00
parent 0a92b40bb8
commit 9a96ff3b9b

View File

@ -34,17 +34,13 @@
SPDK_ROOT_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/..
NVME_DIR := $(SPDK_ROOT_DIR)/lib/nvme
include $(SPDK_ROOT_DIR)/CONFIG
C_OPT ?= -O2 -fno-omit-frame-pointer
Q ?= @
S ?= $(notdir $(CURDIR))
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
C_SRCS = $(TEST_FILE) $(OTHER_FILES)
OBJS = $(C_SRCS:.c=.o)
CFLAGS += $(C_OPT) -I$(SPDK_ROOT_DIR)/lib -I$(SPDK_ROOT_DIR)/include -include $(SPDK_ROOT_DIR)/test/lib/nvme/unit/nvme_impl.h
CFLAGS += -I$(SPDK_ROOT_DIR)/lib -include $(SPDK_ROOT_DIR)/test/lib/nvme/unit/nvme_impl.h
LIBS += -lcunit -lpthread
@ -68,4 +64,3 @@ clean:
@sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -1 | \
sed -e 's/^ *//' -e 's/$$/:/' >> $*.d
@rm -f $*.d.tmp