From 8164e38005e9ac1a4e47d862c436e8fb291666c6 Mon Sep 17 00:00:00 2001 From: Stefano D'Angelo Date: Thu, 1 Feb 2024 08:05:45 +0100 Subject: [PATCH] update daisy-seed-make --- templates/daisy-seed-make/Makefile | 11 ++++++++--- templates/daisy-seed-make/vars.mk | 3 +++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/templates/daisy-seed-make/Makefile b/templates/daisy-seed-make/Makefile index 49ac1d6..2fce2e6 100644 --- a/templates/daisy-seed-make/Makefile +++ b/templates/daisy-seed-make/Makefile @@ -2,10 +2,15 @@ include vars.mk TARGET = ${BUNDLE_NAME} -CPP_SOURCES = src/main.cpp ${CPP_SOURCES_EXTRA} +COMMON_DIR := $(or $(COMMON_DIR),.) +DATA_DIR := $(or $(DATA_DIR),.) +PLUGIN_DIR := $(or $(PLUGIN_DIR),src) -SYSTEM_FILES_DIR=${LIBDAISY_DIR}/core +CPP_SOURCES = ${COMMON_DIR}/src/main.cpp ${CPP_SOURCES_EXTRA} + +SYSTEM_FILES_DIR = ${LIBDAISY_DIR}/core include ${SYSTEM_FILES_DIR}/Makefile -#TODO: CFLAGS, LDFLAGS +CFLAGS += -I${DATA_DIR}/src -I${PLUGIN_DIR} ${CFLAGS_EXTRA} +LDFLAGS += ${LDFLAGS_EXTRA} diff --git a/templates/daisy-seed-make/vars.mk b/templates/daisy-seed-make/vars.mk index b216c54..b5b79d4 100644 --- a/templates/daisy-seed-make/vars.mk +++ b/templates/daisy-seed-make/vars.mk @@ -1,4 +1,7 @@ BUNDLE_NAME := {{=it.product.bundleName}} CFLAGS_EXTRA := {{=it.make && it.make.cflags ? it.make.cflags : ""}} {{=it.daisy_seed_make.cflags ? it.daisy_seed_make.cflags : ""}} LDFLAGS_EXTRA := {{=it.make && it.make.ldflags ? it.make.ldflags : ""}} {{=it.daisy_seed_make.ldflags ? it.daisy_seed_make.ldflags : ""}} +COMMON_DIR := {{=it.daisy_seed_make && it.daisy_seed_make.commonDir ? it.daisy_seed_make.commonDir : (it.make && it.make.commonDir ? it.make.commonDir : "")}} +DATA_DIR := {{=it.daisy_seed_make && it.daisy_seed_make.dataDir ? it.daisy_seed_make.dataDir : (it.make && it.make.dataDir ? it.make.dataDir : "")}} +PLUGIN_DIR := {{=it.daisy_seed_make && it.daisy_seed_make.pluginDir ? it.daisy_seed_make.pluginDir : (it.make && it.make.pluginDir ? it.make.pluginDir : "")}} LIBDAISY_DIR := {{=it.daisy_seed_make.libdaisyDir}}