TOOLCHAIN := GCC_ARM
TARGET    := detect
TOOLCHAIN_PATH := "c:\Program Files (x86)\GNU Tools ARM Embedded\4.9 2014q4\bin"
BINFILE  := mDotDemo
CFLAGS := -DMTDOT_UDK
	

all:
	mbed compile -t $(TOOLCHAIN) -m $(TARGET) $(CFLAGS) -N $(BINFILE)

debug:
	mbed compile --profile debug -t $(TOOLCHAIN) -m $(TARGET) $(CFLAGS) -N $(BINFILE)

# find and add missing missing libraries 
deploy:
	mbed deploy

# configure mbed CLI toolchain settings
configure:
	mbed config toolchain $(TOOLCHAIN) 
	mbed config  $(TOOLCHAIN)_Path $(TOOLCHAIN_PATH) 
	
# Update library references and removes invalid ones
sync:
	mbed synchronize

