From 3a044b22f8a00050e569ba675010a0b220b0511c Mon Sep 17 00:00:00 2001 From: lucianoiam Date: Sun, 4 Jul 2021 13:53:40 +0200 Subject: [PATCH] Simplify custom Makefile paths (#297) * Simplify custom Makefile paths * Always overwrite TARGET_DIR and BUILD_DIR Improve ed17991 for the case user has TARGET_DIR or BUILD_DIR already set. Prefixed versions DPF_TARGET_DIR and DPF_BUILD_DIR can be used for the purpose. --- Makefile.plugins.mk | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/Makefile.plugins.mk b/Makefile.plugins.mk index c71ac8f8..499fa474 100644 --- a/Makefile.plugins.mk +++ b/Makefile.plugins.mk @@ -7,14 +7,12 @@ # NOTE: NAME, FILES_DSP and FILES_UI must have been defined before including this file! -ifeq ($(DPF_CUSTOM_PATH),) +ifeq ($(DPF_PATH),) ifeq (,$(wildcard ../../Makefile.base.mk)) DPF_PATH=../../dpf else DPF_PATH=../.. endif -else -DPF_PATH = $(DPF_CUSTOM_PATH) endif include $(DPF_PATH)/Makefile.base.mk @@ -22,20 +20,15 @@ include $(DPF_PATH)/Makefile.base.mk # --------------------------------------------------------------------------------------------------------------------- # Basic setup -ifeq ($(DPF_CUSTOM_PATH),) +ifeq ($(DPF_TARGET_DIR),) TARGET_DIR = ../../bin -BUILD_DIR = ../../build/$(NAME) -else -ifeq ($(DPF_CUSTOM_TARGET_DIR),) -$(error DPF_CUSTOM_TARGET_DIR is not set) else -TARGET_DIR = $(DPF_CUSTOM_TARGET_DIR) +TARGET_DIR = $(DPF_TARGET_DIR) endif -ifeq ($(DPF_CUSTOM_BUILD_DIR),) -$(error DPF_CUSTOM_BUILD_DIR is not set) +ifeq ($(DPF_BUILD_DIR),) +BUILD_DIR = ../../build/$(NAME) else -BUILD_DIR = $(DPF_CUSTOM_BUILD_DIR) -endif +BUILD_DIR = $(DPF_BUILD_DIR) endif BUILD_C_FLAGS += -I.