Merge branch 'master' into windows-port
[platform/upstream/iotivity.git] / resource / csdk / arduinomega.properties
1
2 #Source directories
3 SDIR_ARD_CORE = $(ARDUINO_DIR)/hardware/arduino/avr/cores/arduino
4 SDIR_ARD_SPI = $(ARDUINO_DIR)/hardware/arduino/avr/libraries/SPI
5 SDIR_ARD_ETH = $(ARDUINO_DIR)/libraries/Ethernet/src
6 SDIR_ARD_ETH_UTIL = $(ARDUINO_DIR)/libraries/Ethernet/src/utility
7 SDIR_ARD_WIFI = $(ARDUINO_DIR)/libraries/WiFi/src
8 SDIR_ARD_WIFI_UTIL = $(ARDUINO_DIR)/libraries/WiFi/src/utility
9 SDIR_ARD_TIME = $(ARDUINO_DIR)/libraries/Time/Time
10 SDIR_ARD_PLATFORM = $(SDIR_ARD_CORE):$(SDIR_ARD_SPI):$(SDIR_ARD_TIME)
11
12 #include directories
13 INCD_ARD_CORE = -I$(ARDUINO_DIR)/hardware/arduino/avr/cores/arduino
14 INCD_ARD_VARIANT = -I$(ARDUINO_DIR)/hardware/arduino/avr/variants/mega
15 INCD_ARD_SPI = -I$(ARDUINO_DIR)/hardware/arduino/avr/libraries/SPI
16 INCD_ARD_ETH = -I$(ARDUINO_DIR)/libraries/Ethernet/src
17 INCD_ARD_ETH_UTIL = -I$(ARDUINO_DIR)/libraries/Ethernet/src/utility
18 INCD_ARD_WIFI = -I$(ARDUINO_DIR)/libraries/WiFi/src
19 INCD_ARD_WIFI_UTIL = -I$(ARDUINO_DIR)/libraries/WiFi/src/utility
20 INCD_ARD_TIME = -I$(ARDUINO_DIR)/libraries/Time/Time
21
22 INC_DIR_PLATFORM = $(INCD_ARD_CORE) $(INCD_ARD_VARIANT) $(INCD_ARD_SPI) $(INCD_ARD_TIME)
23
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
27
28 #Compilers
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
35
36 #Needed object files
37 CORE_COBJ = hooks.o WInterrupts.o wiring.o wiring_digital.o wiring_analog.o wiring_shift.o wiring_pulse.o
38 CORE_CPPOBJ = CDC.o HardwareSerial.o HardwareSerial0.o HardwareSerial1.o HardwareSerial2.o HardwareSerial3.o IPAddress.o HID.o \
39               main.o new.o Print.o Stream.o Tone.o USBCore.o WMath.o WString.o SPI.o
40 ETH_CPPOBJ = Dhcp.o Dns.o Ethernet.o EthernetUdp.o
41 ETH_UTIL_CPPOBJ = socket.o w5100.o
42 WIFI_COBJ = WiFi.o WiFiClient.o WiFiServer.o WiFiUdp.o server_drv.o spi_drv.o wifi_drv.o
43 OCDEPENDENT_CPPOBJ = wiring_analog.o
44
45 PLATFORM_OBJS = $(CORE_COBJ) $(CORE_CPPOBJ) $(OCDEPENDENT_CPPOBJ)
46
47 #Include sources/objects corresponding to WiFi or Ethernet shield
48 ifeq ($(ARDUINOWIFI),1)
49     INC_DIR_PLATFORM += $(INCD_ARD_WIFI) $(INCD_ARD_WIFI_UTIL)
50     SDIR_ARD_PLATFORM += :$(SDIR_ARD_WIFI):$(SDIR_ARD_WIFI_UTIL)
51     PLATFORM_OBJS += $(WIFI_COBJ)
52 else
53     INC_DIR_PLATFORM += $(INCD_ARD_ETH) $(INCD_ARD_ETH_UTIL)
54     SDIR_ARD_PLATFORM += :$(SDIR_ARD_ETH):$(SDIR_ARD_ETH_UTIL)
55     PLATFORM_OBJS += $(ETH_CPPOBJ) $(ETH_UTIL_CPPOBJ)
56 endif
57