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

 CXXFLAGS+=-Wall -Wno-unused -Wno-reorder-ctor -Wno-switch

######### 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