/make/arduino-mk

To get this branch, use:
bzr branch http://bzr.ed.am/make/arduino-mk

« back to all changes in this revision

Viewing changes to arduino.mk

  • Committer: edam
  • Date: 2012-01-04 19:15:03 UTC
  • Revision ID: edam@waxworlds.org-20120104191503-1ergc301tahmx6j2
broke out ARDUINODIR, so it is not configured in the makefile

Show diffs side-by-side

added added

removed removed

45
45
#
46
46
# This makefile can be used as a drop-in replacement for the Arduino
47
47
# IDE's build system.  Simply create a symlink to it under the name
48
 
# "Makefile" and run make as described below (remembering to specify a
49
 
# BOARD).  You would create the symlink like like so:
 
48
# "Makefile" and run make (remembering to specify an ARDUINODIR and
 
49
# BOARD, as described below).  You would create the symlink like like
 
50
# so:
50
51
#
51
52
#   $ ln -s ~/src/arduino.mk Makefile
52
53
#
70
71
#
71
72
# A complete list of all the settings you can use in your Makefile
72
73
# follows shortly.  It should be noted, however, that some variables
73
 
# are better specified in the environment or on the command line than
74
 
# in a Makefile.  Specifically, the BOARD and SERIALDEV (if it is not
75
 
# automatically detected).
76
 
#
77
 
# When running make, you might want to specify the board type:
78
 
#
79
 
#   $ BOARD=pro5v make
80
 
#
81
 
# Or in the environment:
82
 
#
 
74
# are better specified in the environment (or on the command line)
 
75
# than in your Makefile.  Specifically, the ARDUINODIR, BOARD and, if
 
76
# it is not automatically detected, SERIALDEV.
 
77
#
 
78
# When running make, you might want to specify the board and path to
 
79
# your installation of the arduino software, like this:
 
80
#
 
81
#   $ export ARDUINODIR=~/opt/arduino-1.0
83
82
#   $ export BOARD=pro5v
84
83
#   $ make
85
84
#
86
85
# For a list of available board types, run `make boards`.
87
86
88
 
# Here is a list of all configuration parameters:
 
87
# Here is a complete list of configuration parameters:
 
88
#
 
89
# ARDUINODIR   The path where you have installed/unpacked the arduino
 
90
#              software (from http://arduino.cc/)
89
91
#
90
92
# BOARD        Specify a target board type.
91
93
#
93
95
#              found.  If unspecified, an attempt is made to determine
94
96
#              the name of a connected arduino's serial device.
95
97
#
96
 
# The following configuration parameters can be determined automatically:
97
 
#
98
 
# TARGET       The name of the target file.  This need not be set if it
99
 
#              is not determined automatically.
 
98
# TARGET       The name of the target file.  This is set automatically
 
99
#              if a .ino or .pde is found, but it is not neccesary to
 
100
#              set it otherwise.
100
101
#
101
102
# SOURCES      A list of all source files of whatever language.  The
102
103
#              language type is determined by the file extension.
 
104
#              This is set automatically if a .ino or .pde is found.
103
105
#
104
 
# LIBRARIES    A list of arduino libraries to build and include.
 
106
# LIBRARIES    A list of arduino libraries to build and include.  This
 
107
#              is set automatically if a .ino or .pde is found.
105
108
#
106
109
# This general-purpose makefile also defines the following goals for
107
110
# use on the command line when you run make:
123
126
#
124
127
 
125
128
# The full path to the arduino software, from arduino.cc
 
129
ifndef ARDUINODIR
126
130
ARDUINODIR := $(wildcard ~/opt/arduino-1.0)
 
131
endif
127
132
 
128
133
# check arduino software
129
134
ifeq ($(wildcard $(ARDUINODIR)/hardware/arduino/boards.txt), )
130
 
$(error ARDUINODIR is not set correctly at the top of arduino.mk)
 
135
$(error ARDUINODIR is not set correctly; arduino software not found)
131
136
endif
132
137
 
133
138
# auto mode?