xref: /spdk/test/unit/lib/blob/Makefile (revision fecffda6ecf8853b82edccde429b68252f0a62c5)
1#  SPDX-License-Identifier: BSD-3-Clause
2#  Copyright (C) 2015 Intel Corporation.
3#  All rights reserved.
4#
5
6SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../..)
7include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
8
9#  Make targets are based on the current value of $(CUNIT_VERSION),
10#  rather than on configuration values. All sub-directories are
11#  added to $(DIRS-y) so that they are included in 'make clean'.
12#  $(ALL_DIRS) contains the list of sub-directories to compile.
13DIRS-y = blob.c
14ALL_DIRS =
15
16HASH = \#
17CUNIT_VERSION = $(shell echo "$(HASH)include <CUnit/CUnit.h>" | $(CC) $(CFLAGS) -E -dM - | sed -n -e 's/\#define CU_VERSION "\([0-9\.\-]*\).*/\1/p')
18ifeq ($(CUNIT_VERSION),2.1-3)
19ALL_DIRS = blob.c
20else
21$(warning "blob_ut.c compilation skipped, only CUnit version 2.1-3 is supported")
22endif
23
24.PHONY: all clean $(DIRS-y)
25
26all: $(ALL_DIRS)
27clean: $(DIRS-y)
28
29include $(SPDK_ROOT_DIR)/mk/spdk.subdirs.mk
30