Commit 9a96ff3b authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

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: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 0a92b40b
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -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