2022-06-03 19:15:11 +00:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
2022-11-01 20:26:26 +00:00
|
|
|
# Copyright (C) 2016 Intel Corporation.
|
2018-11-20 22:14:14 +00:00
|
|
|
# All rights reserved.
|
|
|
|
#
|
2022-11-01 20:26:26 +00:00
|
|
|
|
2018-11-20 22:14:14 +00:00
|
|
|
include $(SPDK_ROOT_DIR)/mk/spdk.app_vars.mk
|
|
|
|
|
2020-05-11 21:15:03 +00:00
|
|
|
# Applications in app/ go into build/bin/.
|
2020-05-11 22:02:01 +00:00
|
|
|
# Applications in examples/ go into build/examples/.
|
2020-05-11 21:15:03 +00:00
|
|
|
# Use findstring to identify if the current directory is in the app
|
|
|
|
# directory. If it is, change the APP location to build.
|
|
|
|
APP_NAME := $(notdir $(APP))
|
|
|
|
ifneq (,$(findstring $(SPDK_ROOT_DIR)/app,$(CURDIR)))
|
|
|
|
APP := $(APP_NAME:%=$(SPDK_ROOT_DIR)/build/bin/%)
|
2020-05-11 22:02:01 +00:00
|
|
|
else
|
|
|
|
ifneq (,$(findstring $(SPDK_ROOT_DIR)/examples,$(CURDIR)))
|
|
|
|
APP := $(APP_NAME:%=$(SPDK_ROOT_DIR)/build/examples/%)
|
|
|
|
endif
|
2020-05-11 21:15:03 +00:00
|
|
|
endif
|
|
|
|
|
2021-02-23 08:58:06 +00:00
|
|
|
APP := $(APP)$(EXEEXT)
|
|
|
|
|
2020-05-11 21:28:37 +00:00
|
|
|
LIBS += $(SPDK_LIB_LINKER_ARGS)
|
|
|
|
|
|
|
|
CLEAN_FILES = $(APP)
|
|
|
|
|
|
|
|
all : $(APP)
|
|
|
|
@:
|
|
|
|
|
2020-05-11 21:15:03 +00:00
|
|
|
install: empty_rule
|
|
|
|
|
|
|
|
uninstall: empty_rule
|
2019-01-02 09:28:02 +00:00
|
|
|
|
2020-05-11 21:28:37 +00:00
|
|
|
# To avoid overwriting warning
|
2020-05-11 21:15:03 +00:00
|
|
|
empty_rule:
|
2019-01-02 09:28:02 +00:00
|
|
|
@:
|
2020-05-11 21:28:37 +00:00
|
|
|
|
|
|
|
$(APP) : $(OBJS) $(SPDK_LIB_FILES) $(ENV_LIBS)
|
|
|
|
$(LINK_CXX)
|
|
|
|
|
|
|
|
clean :
|
|
|
|
$(CLEAN_C) $(CLEAN_FILES)
|
|
|
|
|
|
|
|
include $(SPDK_ROOT_DIR)/mk/spdk.deps.mk
|