1 ******************************************************************
3 Copyright 2014 Intel Mobile Communications GmbH All Rights Reserved.
5 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
19 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
21 ===============================================================================
22 == NOTICE - Transition to SCONS ==
23 ===============================================================================
25 The IoTivity build system is transitioning to SCONS. Although the
26 makefiles are still available (until v1.0) and some developers are
27 still using them, they are currently no longer supported. To learn more
28 about building using SCONS see Readme.scons.txt in the repository root
29 directory. The build steps used in continuous integration can be found
30 in auto_build.sh which is also in the the repository root directory.
32 ===============================================================================
33 == Rich Stack & Lite Stack ==
34 ===============================================================================
36 The OIC-RESOURCE repository (referred as "<oic-resource>") contains two SDKs
37 with underlying code (i.e. "stack"). The two SDKs are referred to as "Rich SDK"
38 (or "C++ SDK") and "Lite SDK" (or "C SDK"). The associated stacks are referred
39 to as "Rich Stack" (or "C++ Stack") and "Lite Stack" (or "C Stack"),
40 respectively. The Rich Stack-SDK pair requires that the Lite Stack-SDK pair is
43 For a list of artifact locations for all possible build processes in the
44 OIC-RESOURCE repository, please refer to:
45 <oic-resource>/artifact_output_locations.txt.
47 ===============================================================================
49 The Rich Stack is intended ONLY for Linux Ubuntu 12.04 operating system.
50 To build Rich Stack, please follow these requirements:
51 - GCC compiler version is 4.6
52 - Pre-install the "gnu-libc" libraries package.
53 - You have pre-built the Lite Stack for Linux Ubuntu 12.04.
54 - You have installed and pre-built Boost 1.54.
55 - To compile Rich Unit Tests, you must have Google Test 1.7.0 and must also
56 create/append "local.properties" file at <oic-resource>/csdk/ with the
59 GTEST_DIR=<gtest-1.7.0>
61 The Lite Stack is intended ONLY for Linux Ubuntu 12.04, Arduino ATMega 2560 with
62 Arduino Framework 1.0.5, and Arduino Due with Arduino Framework 1.5.7.
63 Tip: Use Cutecom in Ubuntu 12.04 to view logs from Arduino ATMega 2560 and
66 To build Lite Stack, please follow these requirements for Linux Ubuntu 12.04:
67 - GCC compiler version is 4.6
68 - Pre-install the "gnu-libc" libraries package.
70 To build Lite Stack, please follow these requirements for Arduino ATMega 2560:
71 - Arduino Framework 1.0.5 is installed. (Newer versions of the Arduino
72 Framework for Arduino ATMega 2560 have not been tested.)
73 - AVR-GCC compiler version is 4.5.3 (Distributed with Arduino 1.0.5, no further
74 action necessary if framework was obtained from
75 http://arduino.cc/en/Main/OldSoftwareReleases. Note: Frameworks obtained from
76 apt-get have had different compiler versions.)
77 - Unzip the Time Library from here to your Arduino Directory Structure:
78 http://playground.arduino.cc/code/time
79 - Apply patch "arduino-1.0.5_linux.patch" at
80 <oic-resource>/tools/arduino/patches to your Arduino Directory Structure at
81 location <Arduino 1.0.5>.
82 - Create/Append "local.properties" file at location
83 <oic-resource>/resource/csdk/ with the following specified:
85 ARDUINO_DIR := <arduino-1.0.5>
86 ARDUINO_TOOLS_DIR := $(ARDUINO_DIR)/hardware/tools/avr/bin
88 To build Lite Stack, please follow these requirements for Arduino Due:
89 - Arduino Framework 1.5.7 is installed. (Newer versions of the Arduino
90 Framework for Arduino Due have not been tested.)
91 - AVR-GCC compiler version is 4.8.3 (Distributed with Arduino 1.5.7, no further
92 action necessary if framework was obtained from
93 http://arduino.cc/en/Main/OldSoftwareReleases. Note: Frameworks obtained from
94 apt-get have had different compiler versions.)
95 - Unzip the Time Library from here to your Arduino Directory Structure:
96 http://www.pjrc.com/teensy/td_libs_Time.html
97 - Apply patch "arduino-1.5.7_linux.patch" at
98 <oic-resource>/tools/arduino/patches to your Arduino Directory Structure at
99 location <Arduino 1.5.7>.
100 - Create/Append "local.properties" file at location
101 <oic-resource>/resource/csdk/ with the following specified:
103 ARDUINO_DIR := <arduino-1.5.7>
104 ARDUINO_TOOLS_DIR := $(ARDUINO_DIR)/hardware/tools/avr/bin
106 Note: If you are building Unit Tests for Linux, building for Arduino Mega, and
107 building for Arduino Due you may find it useful to set the "local.properties"
108 file to look like this:
110 GTEST_DIR=<gtest-1.7.0>
112 ifeq ($(PLATFORM), arduinomega)
113 #Location of arduino sdk for Arduino Mega
114 ARDUINO_DIR := <arduino-1.0.5>
115 ARDUINO_TOOLS_DIR := $(ARDUINO_DIR)/hardware/tools/avr/bin
117 #Location of arduino sdk for Arduino Due
118 ARDUINO_DIR := <arduino-1.5.7>
119 ARDUINO_TOOLS_DIR := $(ARDUINO_DIR)/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin
122 ===============================================================================
124 Instructions for Common Build Processes:
126 NOTE: 'GNU Make' is required to utilize the build script at location:
127 <oic-resource>/buildScript.mk.
129 =======================================
130 == All Targets - Linux, ATMega & Due ==
131 =======================================
133 - All Modules, including OCICUC, in Release & Debug (Lite Stack, Lite Unit
134 Tests, Lite Examples, Rich Stack, Rich Unit Tests, Rich Examples, Rich
135 OCICUC) for linux, Arduino ATMega 2560 with Ethernet Shield, Arduino ATMega
136 ATMega 2560 with WiFi Shield, Arduino Due with Ethernet Shield and Arduino
137 Due with WiFi Shield:
138 (This will be what is used on the Build Server(s) to limit regression.)
140 make -f buildScript.mk all_dev
142 =======================================
143 == All Targets - Linux & ATMega 2560 ==
144 =======================================
146 - All Modules in Release (Lite Stack, Lite Unit Tests, Lite Examples, Rich
147 Stack, Rich Unit Tests, Rich Examples) for Linux & Arduino ATMega 2560 with
150 make -f buildScript.mk all
152 - All Modules in Debug (Lite Stack, Lite Unit Tests, Lite Examples, Rich Stack,
153 Rich Examples) for Linux & Arduino ATMega 2560 with Ethernet Shield:
155 make -f buildScript.mk all_debug
157 =======================================
158 == All Targets - Linux & Due ==
159 =======================================
161 - All Modules in Release (Lite Stack, Lite Unit Tests, Lite Examples, Rich
162 Stack, Rich Unit Tests, Rich Examples) for Linux & Arduino Due with Ethernet
165 make -f buildScript.mk complement
167 - All Modules in Debug (Lite Stack, Lite Unit Tests, Lite Examples, Rich Stack,
168 Rich Unit Tests, Rich Examples) for Linux & Arduino Due with Ethernet Shield:
170 make -f buildScript.mk complement_debug
172 =======================================
173 == All Targets - Linux Only ==
174 =======================================
176 - All Modules, without OCICUC, in Release (Lite Stack, Lite Unit Tests, Lite
177 Examples, Rich Stack, Rich Unit Tests, Rich Examples) for linux:
179 make -f buildScript.mk linux
181 - All Modules, without OCICUC, in Debug (Lite Stack, Lite Unit Tests, Lite
182 Examples, Rich Stack, Rich Unit Tests, Rich Examples) for linux:
184 make -f buildScript.mk linux_debug
186 - All Rich Stack Modules in Release, without OCICUC, (Lite Stack, Rich Stack,
187 Rich Unit Tests, Rich Examples) for Linux:
189 make -f buildScript.mk linux_ub
191 - All Rich Stack Modules in Debug, without OCICUC, (Lite Stack, Rich Stack,
192 Rich Unit Tests, Rich Examples) for Linux:
194 make -f buildScript.mk linux_ub_debug
196 - All Rich Stack Modules, including OCICUC, in Release & Debug (Lite Stack,
197 Rich Stack, Rich Unit Tests, Rich Examples, Rich OCICUC) for linux:
199 make -f buildScript.mk linux_ub_dev
201 - All Lite Stack Modules in Release (Lite Stack, Lite Unit Tests, Lite
204 make -f buildScript.mk linux_tb
206 - All Lite Stack Modules in Debug (Lite Stack, Lite Unit Tests, Lite Examples)
209 make -f buildScript.mk linux_tb_debug
211 =======================================
212 == All Targets - Mega Only ==
213 =======================================
215 - All Lite Stack Modules in Release (Lite Stack, Lite Unit Tests, Lite
216 Examples) for Arduino ATMega 2560 with Ethernet Shield:
218 make -f buildScript.mk arduinomega
220 - All Lite Stack Modules in Debug (Lite Stack, Lite Unit Tests, Lite Examples)
221 for Arduino ATMega 2560 with Ethernet Shield:
223 make -f buildScript.mk arduinomega_debug
225 - All Lite Stack Modules in Release (Lite Stack, Lite Unit Tests, Lite
226 Examples) for Arduino ATMega 2560 with WiFi Shield:
228 make -f buildScript.mk arduinomega_wifi
230 - All Lite Stack Modules in Debug (Lite Stack, Lite Unit Tests, Lite Examples)
231 for Arduino ATMega 2560 with WiFi Shield:
233 make -f buildScript.mk arduinomega_wifi_debug
235 =======================================
236 == All Targets - Due Only ==
237 =======================================
239 - All Lite Stack Modules in Release (Lite Stack, Lite Unit Tests, Lite
240 Examples) for Arduino Due with Ethernet Shield:
242 make -f buildScript.mk arduinodue_all
244 - All Lite Stack Modules in Debug (Lite Stack, Lite Unit Tests, Lite Examples)
245 Examples) for Arduino Due with Ethernet Shield:
247 make -f buildScript.mk arduinodue_all_debug
249 - All Lite Stack Modules in Release (Lite Stack, Lite Unit Tests, Lite
250 Examples) for Arduino Due with WiFi Shield:
252 make -f buildScript.mk arduinodue_wifi
254 - All Lite Stack Modules in Debug (Lite Stack, Lite Unit Tests, Lite Examples)
255 for Arduino Due with WiFi Shield:
257 make -f buildScript.mk arduinodue_wifi_debug
259 =======================================
260 == Clean All Targets ==
261 =======================================
265 make -f buildScript.mk clean