Browse Source

Allow building projects outside the examples dir

Project Makefiles can now define a DPF_CUSTOM_PATH

When setting a DPF_CUSTOM_PATH also DPF_CUSTOM_TARGET_DIR (for binaries) and
DPF_CUSTOM_BUILD_DIR (objects) need to be set.

If the project depends on DPF's graphic library, it has to be built first by
cd'ing to DPF and running make dgl
pull/260/head
Luciano Iam Filipe Coelho <falktx@falktx.com> 4 years ago
parent
commit
8f98ab2388
1 changed files with 17 additions and 0 deletions
  1. +17
    -0
      Makefile.plugins.mk

+ 17
- 0
Makefile.plugins.mk View File

@@ -7,19 +7,36 @@
# NOTE: NAME, FILES_DSP and FILES_UI must have been defined before including this file!


ifeq ($(DPF_CUSTOM_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

# ---------------------------------------------------------------------------------------------------------------------
# Basic setup

ifeq ($(DPF_CUSTOM_PATH),)
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)
endif
ifeq ($(DPF_CUSTOM_BUILD_DIR),)
$(error DPF_CUSTOM_BUILD_DIR is not set)
else
BUILD_DIR = $(DPF_CUSTOM_BUILD_DIR)
endif
endif

BUILD_C_FLAGS += -I.
BUILD_CXX_FLAGS += -I. -I$(DPF_PATH)/distrho -I$(DPF_PATH)/dgl


Loading…
Cancel
Save