From f2457c94d95af6a713e8ed9274307a7330e6602c Mon Sep 17 00:00:00 2001 From: "james.goppert" Date: Thu, 23 Jun 2011 19:01:06 +0000 Subject: [PATCH] Added config.mk file inclusion for global configurations settings on make based builds. See ArduPilotOne for scripts/configure to see an example. config.mk should be located in the temporary directory where the rest of the build results are placed. git-svn-id: https://arducopter.googlecode.com/svn/trunk@2655 f9c3cf11-9bcb-44bc-f272-b75c42450872 --- libraries/AP_Common/Arduino.mk | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/libraries/AP_Common/Arduino.mk b/libraries/AP_Common/Arduino.mk index 3485b2b763..497b68b22d 100644 --- a/libraries/AP_Common/Arduino.mk +++ b/libraries/AP_Common/Arduino.mk @@ -27,16 +27,6 @@ # Build an Arduino sketch. # -################################################################################ -# Config options -# -# The Makefile calling us must specify BOARD -# -HARDWARE ?= arduino -ifeq ($(BOARD),) -$(error ERROR: must set BOARD before including this file) -endif - ################################################################################ # Paths # @@ -82,6 +72,18 @@ SKETCH := $(lastword $(subst /, ,$(SRCROOT))) TMPDIR ?= /tmp BUILDROOT := $(abspath $(TMPDIR)/$(SKETCH).build) + +################################################################################ +# Config options +# +# The Makefile calling us must specify BOARD +# +include $(TMPDIR)/config.mk +HARDWARE ?= arduino +ifeq ($(BOARD),) +$(error ERROR: must set BOARD before including this file) +endif + # # Find Arduino, if not explicitly specified #