From 59a9b3018f5374982bf3b4b51d676af5801f9412 Mon Sep 17 00:00:00 2001 From: phl0 Date: Wed, 12 Apr 2017 21:57:32 +0200 Subject: [PATCH] Add a define to Makefile --- Makefile.Arduino | 4 +++- SerialPort.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile.Arduino b/Makefile.Arduino index 4e430a6..58032d0 100644 --- a/Makefile.Arduino +++ b/Makefile.Arduino @@ -58,7 +58,8 @@ AR:=$(ADIR)/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-e #all these values are hard coded and should maybe be configured somehow else, #like olikraus does in his makefile. DEFINES:=-Dprintf=iprintf -DF_CPU=84000000 -DARDUINO=10611 -D__SAM3X8E__ -DUSB_PID=0x003e -DUSB_VID=0x2341 -DUSBCON \ - -DARDUINO_SAM_DUE -DARDUINO_ARCH_SAM '-DUSB_MANUFACTURER="Arduino LLC"' '-DUSB_PRODUCT="Arduino Due"' + -DARDUINO_SAM_DUE -DARDUINO_ARCH_SAM '-DUSB_MANUFACTURER="Arduino LLC"' '-DUSB_PRODUCT="Arduino Due"' \ + -DMADEBYMAKEFILE INCLUDES:=-I$(SAM)/system/libsam -I$(SAM)/system/CMSIS/CMSIS/Include/ \ -I$(SAM)/system/CMSIS/Device/ATMEL/ -I$(SAM)/cores/arduino \ @@ -105,6 +106,7 @@ default: #This rule is good to just make sure stuff compiles, without having to wait #for bossac. +compile: GitVersion.h compile: $(TMPDIR)/$(PROJNAME).elf #This is a make rule template to create object files from the source files. diff --git a/SerialPort.cpp b/SerialPort.cpp index 4b64bd0..3cb392d 100644 --- a/SerialPort.cpp +++ b/SerialPort.cpp @@ -22,7 +22,7 @@ #include "Config.h" #include "Globals.h" -#if defined(STM32F4XX) || defined(STM32F4) +#if defined(MADEBYMAKEFILE) #include "GitVersion.h" #endif