From 9a96ff3b9bc0049c38710743f5cd8edb66978e90 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Thu, 24 Sep 2015 10:01:22 -0700 Subject: [PATCH] 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 --- mk/nvme.unittest.mk | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/mk/nvme.unittest.mk b/mk/nvme.unittest.mk index 8a2c906b5..a2d95df0e 100644 --- a/mk/nvme.unittest.mk +++ b/mk/nvme.unittest.mk @@ -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 -