diff --git a/Makefile.conf b/Makefile.conf new file mode 100644 index 0000000..1cd406f --- /dev/null +++ b/Makefile.conf @@ -0,0 +1,33 @@ +HERE:=$(dir $(lastword $(MAKEFILE_LIST))) + +# Project Name +TARGET = Blink + +# Configure for debugging +# common configurations: +# use DEBUG = 1 and OPT = -Og for debugging +# or DEBUG = 0 and OPT = -O3 for performance +DEBUG=0 +OPT=-O3 + +# (optional) Includes FatFS source files within project. +#USE_FATFS = 1 + +# Relative to dir 'src' +LIBDAISY_DIR=../../heck_libDaisyWrong +DAISYSP_DIR=../../heck_DaisySPWrong + +######### Overrides from build.conf ######### +-include $(HERE)build.conf + +ifneq (,$(findstring g++,$(CXX))) + CXXFLAGS+=-fdiagnostics-color=always +else ifneq (,$(findstring clang,$(CXX))) + CXXFLAGS+=-fcolor-diagnostics +endif + +ifeq ($(DEBUG),1) + CXXFLAGS+=-g -O0 +else + CXXFLAGS+=-DNDEBUG=1 -O3 +endif