3 SDIR_ARD_CORE = $(ARDUINO_DIR)/hardware/arduino/cores/arduino
4 SDIR_ARD_SPI = $(ARDUINO_DIR)/libraries/SPI
5 SDIR_ARD_ETH = $(ARDUINO_DIR)/libraries/Ethernet
6 SDIR_ARD_ETH_UTIL = $(ARDUINO_DIR)/libraries/Ethernet/utility
7 SDIR_ARD_WIFI = $(ARDUINO_DIR)/libraries/WiFi
8 SDIR_ARD_WIFI_UTIL = $(ARDUINO_DIR)/libraries/WiFi/utility
9 SDIR_ARD_TIME = $(ARDUINO_DIR)/libraries/Time/Time
10 SDIR_ARD_PLATFORM = $(SDIR_ARD_CORE):$(SDIR_ARD_SPI):$(SDIR_ARD_TIME)
13 INCD_ARD_CORE = -I$(ARDUINO_DIR)/hardware/arduino/cores/arduino
14 INCD_ARD_VARIANT = -I$(ARDUINO_DIR)/hardware/arduino/variants/mega
15 INCD_ARD_SPI = -I$(ARDUINO_DIR)/libraries/SPI
16 INCD_ARD_ETH = -I$(ARDUINO_DIR)/libraries/Ethernet
17 INCD_ARD_ETH_UTIL = -I$(ARDUINO_DIR)/libraries/Ethernet/utility
18 INCD_ARD_WIFI = -I$(ARDUINO_DIR)/libraries/WiFi
19 INCD_ARD_WIFI_UTIL = -I$(ARDUINO_DIR)/libraries/WiFi/utility
20 INCD_ARD_TIME = -I$(ARDUINO_DIR)/libraries/Time/Time
22 INC_DIR_PLATFORM = $(INCD_ARD_CORE) $(INCD_ARD_VARIANT) $(INCD_ARD_SPI) $(INCD_ARD_TIME)
24 #Compiler/Linker flags
25 CFLAGS_PLATFORM = -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=156 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -DWITH_ARDUINO \
26 -MMD -std=c++0x -Wno-write-strings -ffunction-sections -fdata-sections -fno-exceptions -felide-constructors -DATMEGA2560 -DNDEBUG
29 CXX=$(ARDUINO_TOOLS_DIR)/avr-g++
30 CC=$(ARDUINO_TOOLS_DIR)/avr-gcc
31 AR=$(ARDUINO_TOOLS_DIR)/avr-ar
32 RANLIB=$(ARDUINO_TOOLS_DIR)/avr-ranlib
33 AVR_OBJCOPY=$(ARDUINO_TOOLS_DIR)/avr-objcopy
34 AVR_PROGRAMMER=$(ARDUINO_TOOLS_DIR)/../../avrdude
37 CORE_COBJ = WInterrupts.o wiring.o wiring_digital.o
38 CORE_CPPOBJ = main.o Stream.o WMath.o WString.o HardwareSerial.o Print.o SPI.o IPAddress.o
39 ETH_CPPOBJ = Dhcp.o Dns.o Ethernet.o EthernetUdp.o
40 ETH_UTIL_CPPOBJ = socket.o w5100.o
41 WIFI_COBJ = WiFi.o WiFiClient.o WiFiServer.o WiFiUdp.o server_drv.o spi_drv.o wifi_drv.o
42 OCDEPENDENT_CPPOBJ = wiring_analog.o
44 PLATFORM_OBJS = $(CORE_COBJ) $(CORE_CPPOBJ) $(OCDEPENDENT_CPPOBJ)
46 #Include sources/objects corresponding to WiFi or Ethernet shield
47 ifeq ($(ARDUINOWIFI),1)
48 INC_DIR_PLATFORM += $(INCD_ARD_WIFI) $(INCD_ARD_WIFI_UTIL)
49 SDIR_ARD_PLATFORM += :$(SDIR_ARD_WIFI):$(SDIR_ARD_WIFI_UTIL)
50 PLATFORM_OBJS += $(WIFI_COBJ)
52 INC_DIR_PLATFORM += $(INCD_ARD_ETH) $(INCD_ARD_ETH_UTIL)
53 SDIR_ARD_PLATFORM += :$(SDIR_ARD_ETH):$(SDIR_ARD_ETH_UTIL)
54 PLATFORM_OBJS += $(ETH_CPPOBJ) $(ETH_UTIL_CPPOBJ)