Browse Source

Some fixes in the Makefile to support Arduino 1.0.0 or higher and added the Rambo. Still needs some more work for the different arduino hardware variants.

Daid 12 years ago
parent
commit
99e9554edd
1 changed files with 21 additions and 11 deletions
  1. 21
    11
      Marlin/Makefile

+ 21
- 11
Marlin/Makefile View File

147
 HARDWARE_VARIANT ?= Sanguino
147
 HARDWARE_VARIANT ?= Sanguino
148
 MCU              ?= atmega644p
148
 MCU              ?= atmega644p
149
 
149
 
150
+#Rambo
151
+else ifeq  ($(HARDWARE_MOTHERBOARD),301)
152
+HARDWARE_VARIANT ?= arduino
153
+MCU              ?= atmega2560
154
+
150
 endif
155
 endif
151
 
156
 
152
 # Be sure to regenerate speed_lookuptable.h with create_speed_lookuptable.py
157
 # Be sure to regenerate speed_lookuptable.h with create_speed_lookuptable.py
158
 # Libraries, the "hardware variant" are for boards
163
 # Libraries, the "hardware variant" are for boards
159
 # that derives from that, and their source are present in
164
 # that derives from that, and their source are present in
160
 # the main Marlin source directory
165
 # the main Marlin source directory
161
-ARDUINO = $(ARDUINO_INSTALL_DIR)/hardware/arduino/cores/arduino
162
-
163
-ifeq (${HARDWARE_VARIANT}, arduino)
164
-HARDWARE_SRC = $(ARDUINO)
166
+ifeq ($(HARDWARE_VARIANT), arduino)
167
+HARDWARE_SRC = $(ARDUINO_INSTALL_DIR)/hardware/arduino/cores/arduino
165
 else
168
 else
166
 HARDWARE_SRC = $(HARDWARE_VARIANT)/cores/arduino
169
 HARDWARE_SRC = $(HARDWARE_VARIANT)/cores/arduino
167
 endif
170
 endif
175
 VPATH = .
178
 VPATH = .
176
 VPATH += $(BUILD_DIR)
179
 VPATH += $(BUILD_DIR)
177
 VPATH += $(HARDWARE_SRC)
180
 VPATH += $(HARDWARE_SRC)
178
-VPATH += $(ARDUINO)
179
 VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidCrystal
181
 VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidCrystal
180
-#TODO: Add the path to the hardware variant when using Arduino >= 100, and adjust the files required for compilation.
181
-#VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/variants/mega
182
-
183
-SRC = pins_arduino.c main.c wiring.c \
182
+VPATH += $(ARDUINO_INSTALL_DIR)/libraries/SPI
183
+ifeq ($(HARDWARE_VARIANT), arduino)
184
+VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/variants/mega
185
+endif
186
+SRC = wiring.c \
184
 	wiring_analog.c wiring_digital.c \
187
 	wiring_analog.c wiring_digital.c \
185
 	wiring_pulse.c \
188
 	wiring_pulse.c \
186
 	wiring_shift.c WInterrupts.c
189
 	wiring_shift.c WInterrupts.c
188
 	MarlinSerial.cpp Sd2Card.cpp SdBaseFile.cpp SdFatUtil.cpp	\
191
 	MarlinSerial.cpp Sd2Card.cpp SdBaseFile.cpp SdFatUtil.cpp	\
189
 	SdFile.cpp SdVolume.cpp motion_control.cpp planner.cpp		\
192
 	SdFile.cpp SdVolume.cpp motion_control.cpp planner.cpp		\
190
 	stepper.cpp temperature.cpp cardreader.cpp ConfigurationStore.cpp
193
 	stepper.cpp temperature.cpp cardreader.cpp ConfigurationStore.cpp
191
-#CXXSRC += LiquidCrystal.cpp ultralcd.cpp
192
-#CXXSRC += ultralcd.cpp
194
+CXXSRC += LiquidCrystal.cpp ultralcd.cpp SPI.cpp
195
+
196
+#Check for Arduino 1.0.0 or higher and use the correct sourcefiles for that version
197
+ifeq ($(shell [ $(ARDUINO_VERSION) -ge 100 ] && echo true), true)
198
+CXXSRC += main.cpp
199
+else
200
+SRC += pins_arduino.c main.c
201
+endif
202
+
193
 FORMAT = ihex
203
 FORMAT = ihex
194
 
204
 
195
 # Name of this Makefile (used for "make depend").
205
 # Name of this Makefile (used for "make depend").

Loading…
Cancel
Save