/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-03 20:08:42 UTC
  • Revision ID: edam@waxworlds.org-20120103200842-mzqkg2bewooqxc2w
fixed comments for publishing

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 (remembering to specify an ARDUINODIR and
49
 
# BOARD, as described below).  You would create the symlink like like
50
 
# so:
 
48
# "Makefile" and run make as described below (remembering to specify a
 
49
# BOARD).  You would create the symlink like like so:
51
50
#
52
51
#   $ ln -s ~/src/arduino.mk Makefile
53
52
#
71
70
#
72
71
# A complete list of all the settings you can use in your Makefile
73
72
# follows shortly.  It should be noted, however, that some variables
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
 
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
#
82
83
#   $ export BOARD=pro5v
83
84
#   $ make
84
85
#
85
86
# For a list of available board types, run `make boards`.
86
87
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/)
 
88
# Here is a list of all configuration parameters:
91
89
#
92
90
# BOARD        Specify a target board type.
93
91
#
95
93
#              found.  If unspecified, an attempt is made to determine
96
94
#              the name of a connected arduino's serial device.
97
95
#
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.
 
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.
101
100
#
102
101
# SOURCES      A list of all source files of whatever language.  The
103
102
#              language type is determined by the file extension.
104
 
#              This is set automatically if a .ino or .pde is found.
105
103
#
106
 
# LIBRARIES    A list of arduino libraries to build and include.  This
107
 
#              is set automatically if a .ino or .pde is found.
 
104
# LIBRARIES    A list of arduino libraries to build and include.
108
105
#
109
106
# This general-purpose makefile also defines the following goals for
110
107
# use on the command line when you run make:
126
123
#
127
124
 
128
125
# The full path to the arduino software, from arduino.cc
129
 
ifndef ARDUINODIR
130
126
ARDUINODIR := $(wildcard ~/opt/arduino-1.0)
131
 
endif
132
127
 
133
128
# check arduino software
134
129
ifeq ($(wildcard $(ARDUINODIR)/hardware/arduino/boards.txt), )
135
 
$(error ARDUINODIR is not set correctly; arduino software not found)
 
130
$(error ARDUINODIR is not set correctly at the top of arduino.mk)
136
131
endif
137
132
 
138
133
# auto mode?