diff --git a/Makefile.conf b/Makefile.conf index 5b1120f..fdb69af 100644 --- a/Makefile.conf +++ b/Makefile.conf @@ -1,4 +1,5 @@ HERE:=$(dir $(lastword $(MAKEFILE_LIST))) +-include $(HERE)build.conf # Project Name TARGET?=perkons @@ -7,20 +8,17 @@ TARGET?=perkons # common configurations: # use DEBUG = 1 and OPT = -Og for debugging # or DEBUG = 0 and OPT = -O3 for performance -DEBUG=0 -OPT=-O3 +DEBUG?=0 +OPT?=-O3 # (optional) Includes FatFS source files within project. #USE_FATFS = 1 # Relative to dir 'src' -LIBDAISY_DIR=../../heck_libDaisy -DAISYSP_DIR=../../heck_DaisySP - - CXXFLAGS+=-Wall -Wno-unused -Wno-reorder-ctor -Wno-switch +LIBDAISY_DIR?=../../heck_libDaisy +DAISYSP_DIR?=../../heck_DaisySP -######### Overrides from build.conf ######### --include $(HERE)build.conf +CXXFLAGS+=-Wall -Wno-unused -Wno-reorder-ctor -Wno-switch ifneq (,$(findstring g++,$(CXX))) CXXFLAGS+=-fdiagnostics-color=always diff --git a/build.conf.example b/build.conf.example index de4b963..8f67bd4 100644 --- a/build.conf.example +++ b/build.conf.example @@ -3,10 +3,10 @@ # The program to compile and flash # the name of the main cxx file without the prefix 'main_' -TARGET=perkons +TARGET?=perkons -DEBUG=0 +DEBUG?=0 # Daisy dependencies Relative to dir 'src' -LIBDAISY_DIR=../../heck_libDaisy -DAISYSP_DIR=../../heck_DaisySP +LIBDAISY_DIR?=../../heck_libDaisy +DAISYSP_DIR?=../../heck_DaisySP