iotivity 0.9.0
[platform/upstream/iotivity.git] / resource / README.setup.txt
1 ******************************************************************
2
3  Copyright 2014 Intel Mobile Communications GmbH All Rights Reserved.
4
5 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
6
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
10
11       http://www.apache.org/licenses/LICENSE-2.0
12
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.
18
19 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
20
21 ===============================================================================
22 ==                    NOTICE - Transition to SCONS                           ==
23 ===============================================================================
24
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.
31
32 ===============================================================================
33 ==                      Rich Stack & Lite Stack                              ==
34 ===============================================================================
35
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
41 built under it.
42
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.
46
47 ===============================================================================
48
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
57   following specified:
58
59   GTEST_DIR=<gtest-1.7.0>
60
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
64 Arduino Due.
65
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.
69
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:
84
85   ARDUINO_DIR := <arduino-1.0.5>
86   ARDUINO_TOOLS_DIR := $(ARDUINO_DIR)/hardware/tools/avr/bin
87
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:
102
103   ARDUINO_DIR := <arduino-1.5.7>
104   ARDUINO_TOOLS_DIR := $(ARDUINO_DIR)/hardware/tools/avr/bin
105
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:
109
110 GTEST_DIR=<gtest-1.7.0>
111
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
116 else
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
120 endif
121
122 ===============================================================================
123
124 Instructions for Common Build Processes:
125
126 NOTE: 'GNU Make' is required to utilize the build script at location:
127 <oic-resource>/buildScript.mk.
128
129 =======================================
130 == All Targets - Linux, ATMega & Due ==
131 =======================================
132
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.)
139
140         make -f buildScript.mk all_dev
141
142 =======================================
143 == All Targets - Linux & ATMega 2560 ==
144 =======================================
145
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
148   Ethernet Shield:
149
150         make -f buildScript.mk all
151
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:
154
155         make -f buildScript.mk all_debug
156
157 =======================================
158 ==     All Targets - Linux & Due     ==
159 =======================================
160
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
163   Shield:
164
165         make -f buildScript.mk complement
166
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:
169
170         make -f buildScript.mk complement_debug
171
172 =======================================
173 ==     All Targets - Linux Only      ==
174 =======================================
175
176 - All Modules, without OCICUC, in Release (Lite Stack, Lite Unit Tests, Lite
177   Examples, Rich Stack, Rich Unit Tests, Rich Examples) for linux:
178
179         make -f buildScript.mk linux
180
181 - All Modules, without OCICUC, in Debug (Lite Stack, Lite Unit Tests, Lite
182   Examples, Rich Stack, Rich Unit Tests, Rich Examples) for linux:
183
184         make -f buildScript.mk linux_debug
185
186 - All Rich Stack Modules in Release, without OCICUC, (Lite Stack, Rich Stack,
187   Rich Unit Tests, Rich Examples) for Linux:
188
189         make -f buildScript.mk linux_ub
190
191 - All Rich Stack Modules in Debug, without OCICUC, (Lite Stack, Rich Stack,
192   Rich Unit Tests, Rich Examples) for Linux:
193
194         make -f buildScript.mk linux_ub_debug
195
196 - All Rich Stack Modules, including OCICUC, in Release & Debug (Lite Stack,
197   Rich Stack, Rich Unit Tests, Rich Examples, Rich OCICUC) for linux:
198
199         make -f buildScript.mk linux_ub_dev
200
201 - All Lite Stack Modules in Release (Lite Stack, Lite Unit Tests, Lite
202   Examples) for Linux:
203
204         make -f buildScript.mk linux_tb
205
206 - All Lite Stack Modules in Debug (Lite Stack, Lite Unit Tests, Lite Examples)
207   for Linux:
208
209         make -f buildScript.mk linux_tb_debug
210
211 =======================================
212 ==      All Targets - Mega Only      ==
213 =======================================
214
215 - All Lite Stack Modules in Release (Lite Stack, Lite Unit Tests, Lite
216   Examples) for Arduino ATMega 2560 with Ethernet Shield:
217
218         make -f buildScript.mk arduinomega
219
220 - All Lite Stack Modules in Debug (Lite Stack, Lite Unit Tests, Lite Examples)
221   for Arduino ATMega 2560 with Ethernet Shield:
222
223         make -f buildScript.mk arduinomega_debug
224
225 - All Lite Stack Modules in Release (Lite Stack, Lite Unit Tests, Lite
226   Examples) for Arduino ATMega 2560 with WiFi Shield:
227
228         make -f buildScript.mk arduinomega_wifi
229
230 - All Lite Stack Modules in Debug (Lite Stack, Lite Unit Tests, Lite Examples)
231   for Arduino ATMega 2560 with WiFi Shield:
232
233         make -f buildScript.mk arduinomega_wifi_debug
234
235 =======================================
236 ==      All Targets - Due Only      ==
237 =======================================
238
239 - All Lite Stack Modules in Release (Lite Stack, Lite Unit Tests, Lite
240   Examples) for Arduino Due with Ethernet Shield:
241
242         make -f buildScript.mk arduinodue_all
243
244 - All Lite Stack Modules in Debug (Lite Stack, Lite Unit Tests, Lite Examples)
245   Examples) for Arduino Due with Ethernet Shield:
246
247         make -f buildScript.mk arduinodue_all_debug
248
249 - All Lite Stack Modules in Release (Lite Stack, Lite Unit Tests, Lite
250   Examples) for Arduino Due with WiFi Shield:
251
252         make -f buildScript.mk arduinodue_wifi
253
254 - All Lite Stack Modules in Debug (Lite Stack, Lite Unit Tests, Lite Examples)
255   for Arduino Due with WiFi Shield:
256
257         make -f buildScript.mk arduinodue_wifi_debug
258
259 =======================================
260 ==         Clean All Targets         ==
261 =======================================
262
263 - Clean All:
264
265         make -f buildScript.mk clean
266