Skip to content

Commit

Permalink
Add support of LiquidTWI2-based panels to Makefile
Browse files Browse the repository at this point in the history
Use LIQUID_TWI2=1 as make argument to enable this support
  • Loading branch information
iXce authored and njprossi committed Jul 30, 2013
1 parent 6c42a3a commit 4d435c3
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions Marlin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ UPLOAD_PORT ?= /dev/arduino
#Directory used to build files in, contains all the build files, from object files to the final hex file.
BUILD_DIR ?= applet

# This defines whether Liquid_TWI2 support will be built
LIQUID_TWI2 ?= 0

############################################################################
# Below here nothing should be changed...

Expand Down Expand Up @@ -199,9 +202,19 @@ VPATH += $(HARDWARE_SRC)
ifeq ($(HARDWARE_VARIANT), arduino)
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidCrystal
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/SPI
ifeq ($(LIQUID_TWI2), 1)
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire/utility
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidTWI2
endif
else
VPATH += $(HARDWARE_DIR)/libraries/LiquidCrystal
VPATH += $(HARDWARE_DIR)/libraries/SPI
ifeq ($(LIQUID_TWI2), 1)
VPATH += $(HARDWARE_DIR)/libraries/Wire
VPATH += $(HARDWARE_DIR)/libraries/Wire/utility
VPATH += $(HARDWARE_DIR)/libraries/LiquidTWI2
endif
endif
ifeq ($(HARDWARE_VARIANT), arduino)
HARDWARE_SUB_VARIANT ?= mega
Expand All @@ -218,8 +231,13 @@ CXXSRC = WMath.cpp WString.cpp Print.cpp Marlin_main.cpp \
MarlinSerial.cpp Sd2Card.cpp SdBaseFile.cpp SdFatUtil.cpp \
SdFile.cpp SdVolume.cpp motion_control.cpp planner.cpp \
stepper.cpp temperature.cpp cardreader.cpp ConfigurationStore.cpp \
watchdog.cpp
CXXSRC += LiquidCrystal.cpp ultralcd.cpp SPI.cpp Servo.cpp Tone.cpp
watchdog.cpp SPI.cpp Servo.cpp Tone.cpp ultralcd.cpp
ifeq ($(LIQUID_TWI2), 0)
CXXSRC += LiquidCrystal.cpp
else
SRC += twi.c
CXXSRC += Wire.cpp LiquidTWI2.cpp
endif

#Check for Arduino 1.0.0 or higher and use the correct sourcefiles for that version
ifeq ($(shell [ $(ARDUINO_VERSION) -ge 100 ] && echo true), true)
Expand Down

0 comments on commit 4d435c3

Please sign in to comment.