Browse Source

Adjust last commit to work for DPF example plugins

Signed-off-by: falkTX <falktx@falktx.com>
pull/452/head
falkTX 1 year ago
parent
commit
0ceb411fde
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 21 additions and 1 deletions
  1. +21
    -1
      Makefile.plugins.mk

+ 21
- 1
Makefile.plugins.mk View File

@@ -23,11 +23,31 @@
# Try to figure out where DPF is located

ifeq ($(DPF_PATH),)

# find path to this makefile
DPF_PLUGINS_MAKEFILE = $(lastword $(filter %Makefile.plugins.mk,$(MAKEFILE_LIST)))
DPF_PATH = $(patsubst %/,%,$(patsubst %Makefile.plugins.mk,%,$(DPF_PLUGINS_MAKEFILE)))

# error out if wrongly named or referencing it without any path
ifeq (,$(findstring /Makefile.plugins.mk,$(DPF_PLUGINS_MAKEFILE)))
$(error wrong inclusion of Makefile.plugins.mk, must be either absolute or relative path)
endif

# find path to DPF
DPF_PATH = $(patsubst %/Makefile.plugins.mk,%,$(DPF_PLUGINS_MAKEFILE))

# best guess for where to place binary files
ifeq ($(DPF_PATH),..)
BASE_PATH = $(DPF_PATH)
else ifeq ($(DPF_PATH),../..)
BASE_PATH = $(DPF_PATH)
else ifeq ($(DPF_PATH),../../..)
BASE_PATH = $(DPF_PATH)
else
BASE_PATH = $(patsubst %/,%,$(dir $(DPF_PATH)))
endif

endif

include $(DPF_PATH)/Makefile.base.mk

# ---------------------------------------------------------------------------------------------------------------------


Loading…
Cancel
Save