Merge "Broke out build script into variability.. Added support to build either in...
[platform/upstream/iotivity.git] / README
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 ==                      UB Stack & TB Stack                                  ==
23 ===============================================================================
24
25 The OIC-RESOURCE repository contains two SDKs with underlying code
26 (i.e. "stack"). The two SDKs are referred to as "UB SDK" (or "C++ SDK") and "TB
27 SDK" (or "C SDK"). The associated stacks are referred to as "UB Stack" (or "C++
28 Stack") and "TB Stack" (or "C Stack"), respectively. The UB Stack-SDK pair
29 requires that the TB Stack-SDK pair is built under it.
30
31 For a list of artifact locations for all possible build processes in the
32 OIC-RESOURCE repository, please refer to:
33 <oic-resource>/artifact_output_locations.txt.
34
35 ===============================================================================
36
37 The UB Stack is intended ONLY for Linux Ubuntu 12.04 operating system.
38 To build UB Stack, please follow these requirements:
39 - GCC compiler version is 4.6
40 - Pre-install the "gnu-libc" libraries package.
41 - The OIC-UTILITIES repository must be a sibling directory to the OIC-RESOURCE
42   repository.
43 - You have pre-built the TB Stack for Linux Ubuntu 12.04.
44
45 The TB Stack is intended ONLY for Linux Ubuntu 12.04, Arduino ATMega 2560 with
46 Arduino Framework 1.0.5, and Arduino Due with Arduino Framework 1.5.7.
47 Tip: Use Cutecom in Ubuntu 12.04 to view logs from Arduino ATMega 2560 and
48 Arduino Due.
49
50 To build TB Stack, please follow these requirements for Linux Ubuntu 12.04:
51 - GCC compiler version is 4.6
52 - Pre-install the "gnu-libc" libraries package.
53 - The OIC-UTILITIES repository must be a sibling directory to the OIC-RESOURCE
54   repository.
55
56 To build TB Stack, please follow these requirements for Arduino ATMega 2560:
57 - AVR-GCC compiler version is 4.5.3 (Distributed with Arduino 1.0.5, no further
58   action necessary if framework was obtained from http://www.arduino.cc. Note:
59   Frameworks obtained from apt-get have had different compiler versions.)
60 - Unzip the Time Library from here to your Arduino Directory Structure:
61   http://playground.arduino.cc/code/time
62 - The OIC-UTILITIES repository must be a sibling directory to the OIC-RESOURCE
63   repository.
64 - Apply patches at OIC-UTILITIES/tb/ to your Arduino Directory Structure at
65   locations <Arduino 1.0.5>/libraries/Ethernet &
66   <Arduino 1.0.5>/libraries/Ethernet/utility/.
67
68 To build TB Stack, please follow these requirements for Arduino Due:
69 - AVR-GCC compiler version is 4.8.3 (Distributed with Arduino 1.5.7, no further
70   action necessary if framework was obtained from http://www.arduino.cc. Note:
71   Frameworks obtained from apt-get have had different compiler versions.)
72 - Unzip the Time Library from here to your Arduino Directory Structure:
73   http://www.pjrc.com/teensy/td_libs_Time.html
74 - The OIC-UTILITIES repository must be a sibling directory to the OIC-RESOURCE
75   repository.
76 - Apply patches at OIC-UTILITIES/tb/ to your Arduino Directory Structure at
77   locations <Arduino 1.5.7>/libraries/Ethernet &
78   <Arduino 1.5.7>/libraries/Ethernet/utility/.
79
80 ===============================================================================
81
82 Instructions for Common Build Processes:
83
84 NOTE: 'GNU Make' is required to utilize the build script at location:
85 <oic-resource>/buildScript.mk.
86
87 =======================================
88 == All Targets - Linux, ATMega & Due ==
89 =======================================
90
91 - All Modules, including OCICUC, in Release & Debug (TB Stack, TB Unit Tests,
92 TB Examples, UB Stack, UB Examples, UB OCICUC) for linux, Arduino ATMega 2560
93 with Ethernet Shield, Arduino ATMega ATMega 2560 with WiFi Shield, Arduino
94 Due with Ethernet Shield and Arduino Due with WiFi Shield:
95 (This will be what is used on the Build Server(s) to limit regression.)
96
97         make -f buildScript.mk all_dev
98
99 =======================================
100 == All Targets - Linux & ATMega 2560 ==
101 =======================================
102
103 - All Modules in Release (TB Stack, TB Unit Tests, TB Examples, UB Stack, UB
104 Examples) for Linux & Arduino ATMega 2560 with Ethernet Shield:
105
106         make -f buildScript.mk all
107
108 - All Modules in Debug (TB Stack, TB Unit Tests, TB Examples, UB Stack, UB
109 Examples) for Linux & Arduino ATMega 2560 with Ethernet Shield:
110
111         make -f buildScript.mk all_debug
112
113 =======================================
114 ==     All Targets - Linux & Due     ==
115 =======================================
116
117 - All Modules in Release (TB Stack, TB Unit Tests, TB Examples, UB Stack, UB
118 Examples) for Linux & Arduino Due with Ethernet Shield:
119
120         make -f buildScript.mk complement
121
122 - All Modules in Debug (TB Stack, TB Unit Tests, TB Examples, UB Stack, UB
123 Examples) for Linux & Arduino Due with Ethernet Shield:
124
125         make -f buildScript.mk complement_debug
126
127 =======================================
128 ==     All Targets - Linux Only      ==
129 =======================================
130
131 - All Modules, without OCICUC, in Release (TB Stack, TB Unit Tests,
132 TB Examples, UB Stack, UB Examples) for linux:
133
134         make -f buildScript.mk linux
135
136 - All Modules, without OCICUC, in Debug (TB Stack, TB Unit Tests,
137 TB Examples, UB Stack, UB Examples) for linux:
138
139         make -f buildScript.mk linux_debug
140
141 - All UB Stack Modules in Release, without OCICUC, (TB Stack, UB Stack, UB
142 Examples) for Linux:
143
144         make -f buildScript.mk linux_ub
145
146 - All UB Stack Modules in Debug, without OCICUC, (TB Stack, UB Stack, UB
147 Examples) for Linux:
148
149         make -f buildScript.mk linux_ub_debug
150
151 - All UB Stack Modules, including OCICUC, in Release & Debug (TB Stack,
152 UB Stack, UB Examples, UB OCICUC) for linux:
153
154         make -f buildScript.mk linux_ub_dev
155
156 - All TB Stack Modules in Release (TB Stack, TB Unit Tests,
157 TB Examples) for Linux:
158
159         make -f buildScript.mk linux_tb
160
161 - All TB Stack Modules in Debug (TB Stack, TB Unit Tests,
162 TB Examples) for Linux:
163
164         make -f buildScript.mk linux_tb_debug
165
166 =======================================
167 ==      All Targets - Mega Only      ==
168 =======================================
169
170 - All TB Stack Modules in Release (TB Stack, TB Unit Tests,
171 TB Examples) for Arduino ATMega 2560 with Ethernet Shield:
172
173         make -f buildScript.mk arduinomega
174
175 - All TB Stack Modules in Debug (TB Stack, TB Unit Tests,
176 TB Examples) for Arduino ATMega 2560 with Ethernet Shield:
177
178         make -f buildScript.mk arduinomega_debug
179
180 - All TB Stack Modules in Release (TB Stack, TB Unit Tests,
181 TB Examples) for Arduino ATMega 2560 with WiFi Shield:
182
183         make -f buildScript.mk arduinomega_wifi
184
185 - All TB Stack Modules in Debug (TB Stack, TB Unit Tests,
186 TB Examples) for Arduino ATMega 2560 with WiFi Shield:
187
188         make -f buildScript.mk arduinomega_wifi_debug
189
190 =======================================
191 ==      All Targets - Due Only      ==
192 =======================================
193
194 - All TB Stack Modules in Release (TB Stack, TB Unit Tests,
195 TB Examples) for Arduino Due with Ethernet Shield:
196
197         make -f buildScript.mk arduinodue_all
198
199 - All TB Stack Modules in Debug (TB Stack, TB Unit Tests,
200 TB Examples) for Arduino Due with Ethernet Shield:
201
202         make -f buildScript.mk arduinodue_all_debug
203
204 - All TB Stack Modules in Release (TB Stack, TB Unit Tests,
205 TB Examples) for Arduino Due with WiFi Shield:
206
207         make -f buildScript.mk arduinodue_wifi
208
209 - All TB Stack Modules in Debug (TB Stack, TB Unit Tests,
210 TB Examples) for Arduino Due with WiFi Shield:
211
212         make -f buildScript.mk arduinodue_wifi_debug
213
214 =======================================
215 ==         Clean All Targets         ==
216 =======================================
217
218 - Clean All:
219
220         make -f buildScript.mk clean
221