]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/spdk/mk/spdk.app.mk
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / spdk / mk / spdk.app.mk
index 9b8e8a00e0ef4eb49f144bd831c71d779662c874..f6fb17a1f0ca89966a69960f454a44611224be19 100644 (file)
 
 include $(SPDK_ROOT_DIR)/mk/spdk.app_vars.mk
 
+# Applications in app/ go into build/bin/.
+# Applications in examples/ go into build/examples/.
+# Use findstring to identify if the current directory is in the app
+# or examples directory. If it is, change the APP location.
+APP_NAME := $(notdir $(APP))
+ifneq (,$(findstring $(SPDK_ROOT_DIR)/app,$(CURDIR)))
+       APP := $(APP_NAME:%=$(SPDK_ROOT_DIR)/build/bin/%)
+else
+ifneq (,$(findstring $(SPDK_ROOT_DIR)/examples,$(CURDIR)))
+       APP := $(APP_NAME:%=$(SPDK_ROOT_DIR)/build/examples/%)
+endif
+endif
+
 LIBS += $(SPDK_LIB_LINKER_ARGS)
 
 CLEAN_FILES = $(APP)
@@ -40,14 +53,14 @@ CLEAN_FILES = $(APP)
 all : $(APP)
        @:
 
-install: all
+install: empty_rule
+
+uninstall: empty_rule
 
 # To avoid overwriting warning
-empty_uninstall_rule:
+empty_rule:
        @:
 
-uninstall: empty_uninstall_rule
-
 $(APP) : $(OBJS) $(SPDK_LIB_FILES) $(ENV_LIBS)
        $(LINK_C)