Browse Source

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.
pull/302/head
lucianoiam GitHub 4 years ago
parent
commit
3a044b22f8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 13 deletions
  1. +6
    -13
      Makefile.plugins.mk

+ 6
- 13
Makefile.plugins.mk View File

@@ -7,14 +7,12 @@
# NOTE: NAME, FILES_DSP and FILES_UI must have been defined before including this file! # 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)) ifeq (,$(wildcard ../../Makefile.base.mk))
DPF_PATH=../../dpf DPF_PATH=../../dpf
else else
DPF_PATH=../.. DPF_PATH=../..
endif endif
else
DPF_PATH = $(DPF_CUSTOM_PATH)
endif endif


include $(DPF_PATH)/Makefile.base.mk include $(DPF_PATH)/Makefile.base.mk
@@ -22,20 +20,15 @@ include $(DPF_PATH)/Makefile.base.mk
# --------------------------------------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------------------------------------
# Basic setup # Basic setup


ifeq ($(DPF_CUSTOM_PATH),)
ifeq ($(DPF_TARGET_DIR),)
TARGET_DIR = ../../bin TARGET_DIR = ../../bin
BUILD_DIR = ../../build/$(NAME)
else
ifeq ($(DPF_CUSTOM_TARGET_DIR),)
$(error DPF_CUSTOM_TARGET_DIR is not set)
else else
TARGET_DIR = $(DPF_CUSTOM_TARGET_DIR)
TARGET_DIR = $(DPF_TARGET_DIR)
endif endif
ifeq ($(DPF_CUSTOM_BUILD_DIR),)
$(error DPF_CUSTOM_BUILD_DIR is not set)
ifeq ($(DPF_BUILD_DIR),)
BUILD_DIR = ../../build/$(NAME)
else else
BUILD_DIR = $(DPF_CUSTOM_BUILD_DIR)
endif
BUILD_DIR = $(DPF_BUILD_DIR)
endif endif


BUILD_C_FLAGS += -I. BUILD_C_FLAGS += -I.


Loading…
Cancel
Save