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 == Rich Stack & Lite Stack ==
23 ===============================================================================
25 The OIC-RESOURCE repository (referred as "<oic-resource>") contains two SDKs
26 with underlying code (i.e. "stack"). The two SDKs are referred to as "Rich SDK"
27 (or "C++ SDK") and "Lite SDK" (or "C SDK"). The associated stacks are referred
28 to as "Rich Stack" (or "C++ Stack") and "Lite Stack" (or "C Stack"),
29 respectively. The Rich Stack-SDK pair requires that the Lite Stack-SDK pair is
32 For a list of artifact locations for all possible build processes in the
33 OIC-RESOURCE repository, please refer to:
34 <oic-resource>/artifact_output_locations.txt.
36 ===============================================================================
38 The Rich Stack is intended ONLY for Linux Ubuntu 12.04 operating system.
39 To build Rich Stack, please follow these requirements:
40 - GCC compiler version is 4.6
41 - Pre-install the "gnu-libc" libraries package.
42 - You have pre-built the Lite Stack for Linux Ubuntu 12.04.
43 - You have installed and pre-built Boost 1.54.
44 - To compile Rich Unit Tests, you must have Google Test 1.7.0 and must also
45 create/append "local.properties" file at <oic-resource>/csdk/ with the
48 GTEST_DIR=<gtest-1.7.0>
50 The Lite Stack is intended ONLY for Linux Ubuntu 12.04, Arduino ATMega 2560 with
51 Arduino Framework 1.0.5, and Arduino Due with Arduino Framework 1.5.7.
52 Tip: Use Cutecom in Ubuntu 12.04 to view logs from Arduino ATMega 2560 and
55 To build Lite Stack, please follow these requirements for Linux Ubuntu 12.04:
56 - GCC compiler version is 4.6
57 - Pre-install the "gnu-libc" libraries package.
59 To build Lite Stack, please follow these requirements for Arduino ATMega 2560:
60 - Arduino Framework 1.0.5 is installed. (Newer versions of the Arduino
61 Framework for Arduino ATMega 2560 have not been tested.)
62 - AVR-GCC compiler version is 4.5.3 (Distributed with Arduino 1.0.5, no further
63 action necessary if framework was obtained from
64 http://arduino.cc/en/Main/OldSoftwareReleases. Note: Frameworks obtained from
65 apt-get have had different compiler versions.)
66 - Unzip the Time Library from here to your Arduino Directory Structure:
67 http://playground.arduino.cc/code/time
68 - Apply patch "arduino-1.0.5_linux.patch" at
69 <oic-resource>/tools/arduino/patches to your Arduino Directory Structure at
70 location <Arduino 1.0.5>.
71 - Create/Append "local.properties" file at location
72 <oic-resource>/resource/csdk/ with the following specified:
74 ARDUINO_DIR := <arduino-1.0.5>
75 ARDUINO_TOOLS_DIR := $(ARDUINO_DIR)/hardware/tools/avr/bin
77 To build Lite Stack, please follow these requirements for Arduino Due:
78 - Arduino Framework 1.5.7 is installed. (Newer versions of the Arduino
79 Framework for Arduino Due have not been tested.)
80 - AVR-GCC compiler version is 4.8.3 (Distributed with Arduino 1.5.7, no further
81 action necessary if framework was obtained from
82 http://arduino.cc/en/Main/OldSoftwareReleases. Note: Frameworks obtained from
83 apt-get have had different compiler versions.)
84 - Unzip the Time Library from here to your Arduino Directory Structure:
85 http://www.pjrc.com/teensy/td_libs_Time.html
86 - Apply patch "arduino-1.5.7_linux.patch" at
87 <oic-resource>/tools/arduino/patches to your Arduino Directory Structure at
88 location <Arduino 1.5.7>.
89 - Create/Append "local.properties" file at location
90 <oic-resource>/resource/csdk/ with the following specified:
92 ARDUINO_DIR := <arduino-1.5.7>
93 ARDUINO_TOOLS_DIR := $(ARDUINO_DIR)/hardware/tools/avr/bin
95 Note: If you are building Unit Tests for Linux, building for Arduino Mega, and
96 building for Arduino Due you may find it useful to set the "local.properties"
97 file to look like this:
99 GTEST_DIR=<gtest-1.7.0>
101 ifeq ($(PLATFORM), arduinomega)
102 #Location of arduino sdk for Arduino Mega
103 ARDUINO_DIR := <arduino-1.0.5>
104 ARDUINO_TOOLS_DIR := $(ARDUINO_DIR)/hardware/tools/avr/bin
106 #Location of arduino sdk for Arduino Due
107 ARDUINO_DIR := <arduino-1.5.7>
108 ARDUINO_TOOLS_DIR := $(ARDUINO_DIR)/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin
111 ===============================================================================
113 Instructions for Common Build Processes:
115 NOTE: 'GNU Make' is required to utilize the build script at location:
116 <oic-resource>/buildScript.mk.
118 =======================================
119 == All Targets - Linux, ATMega & Due ==
120 =======================================
122 - All Modules, including OCICUC, in Release & Debug (Lite Stack, Lite Unit
123 Tests, Lite Examples, Rich Stack, Rich Unit Tests, Rich Examples, Rich
124 OCICUC) for linux, Arduino ATMega 2560 with Ethernet Shield, Arduino ATMega
125 ATMega 2560 with WiFi Shield, Arduino Due with Ethernet Shield and Arduino
126 Due with WiFi Shield:
127 (This will be what is used on the Build Server(s) to limit regression.)
129 make -f buildScript.mk all_dev
131 =======================================
132 == All Targets - Linux & ATMega 2560 ==
133 =======================================
135 - All Modules in Release (Lite Stack, Lite Unit Tests, Lite Examples, Rich
136 Stack, Rich Unit Tests, Rich Examples) for Linux & Arduino ATMega 2560 with
139 make -f buildScript.mk all
141 - All Modules in Debug (Lite Stack, Lite Unit Tests, Lite Examples, Rich Stack,
142 Rich Examples) for Linux & Arduino ATMega 2560 with Ethernet Shield:
144 make -f buildScript.mk all_debug
146 =======================================
147 == All Targets - Linux & Due ==
148 =======================================
150 - All Modules in Release (Lite Stack, Lite Unit Tests, Lite Examples, Rich
151 Stack, Rich Unit Tests, Rich Examples) for Linux & Arduino Due with Ethernet
154 make -f buildScript.mk complement
156 - All Modules in Debug (Lite Stack, Lite Unit Tests, Lite Examples, Rich Stack,
157 Rich Unit Tests, Rich Examples) for Linux & Arduino Due with Ethernet Shield:
159 make -f buildScript.mk complement_debug
161 =======================================
162 == All Targets - Linux Only ==
163 =======================================
165 - All Modules, without OCICUC, in Release (Lite Stack, Lite Unit Tests, Lite
166 Examples, Rich Stack, Rich Unit Tests, Rich Examples) for linux:
168 make -f buildScript.mk linux
170 - All Modules, without OCICUC, in Debug (Lite Stack, Lite Unit Tests, Lite
171 Examples, Rich Stack, Rich Unit Tests, Rich Examples) for linux:
173 make -f buildScript.mk linux_debug
175 - All Rich Stack Modules in Release, without OCICUC, (Lite Stack, Rich Stack,
176 Rich Unit Tests, Rich Examples) for Linux:
178 make -f buildScript.mk linux_ub
180 - All Rich Stack Modules in Debug, without OCICUC, (Lite Stack, Rich Stack,
181 Rich Unit Tests, Rich Examples) for Linux:
183 make -f buildScript.mk linux_ub_debug
185 - All Rich Stack Modules, including OCICUC, in Release & Debug (Lite Stack,
186 Rich Stack, Rich Unit Tests, Rich Examples, Rich OCICUC) for linux:
188 make -f buildScript.mk linux_ub_dev
190 - All Lite Stack Modules in Release (Lite Stack, Lite Unit Tests, Lite
193 make -f buildScript.mk linux_tb
195 - All Lite Stack Modules in Debug (Lite Stack, Lite Unit Tests, Lite Examples)
198 make -f buildScript.mk linux_tb_debug
200 =======================================
201 == All Targets - Mega Only ==
202 =======================================
204 - All Lite Stack Modules in Release (Lite Stack, Lite Unit Tests, Lite
205 Examples) for Arduino ATMega 2560 with Ethernet Shield:
207 make -f buildScript.mk arduinomega
209 - All Lite Stack Modules in Debug (Lite Stack, Lite Unit Tests, Lite Examples)
210 for Arduino ATMega 2560 with Ethernet Shield:
212 make -f buildScript.mk arduinomega_debug
214 - All Lite Stack Modules in Release (Lite Stack, Lite Unit Tests, Lite
215 Examples) for Arduino ATMega 2560 with WiFi Shield:
217 make -f buildScript.mk arduinomega_wifi
219 - All Lite Stack Modules in Debug (Lite Stack, Lite Unit Tests, Lite Examples)
220 for Arduino ATMega 2560 with WiFi Shield:
222 make -f buildScript.mk arduinomega_wifi_debug
224 =======================================
225 == All Targets - Due Only ==
226 =======================================
228 - All Lite Stack Modules in Release (Lite Stack, Lite Unit Tests, Lite
229 Examples) for Arduino Due with Ethernet Shield:
231 make -f buildScript.mk arduinodue_all
233 - All Lite Stack Modules in Debug (Lite Stack, Lite Unit Tests, Lite Examples)
234 Examples) for Arduino Due with Ethernet Shield:
236 make -f buildScript.mk arduinodue_all_debug
238 - All Lite Stack Modules in Release (Lite Stack, Lite Unit Tests, Lite
239 Examples) for Arduino Due with WiFi Shield:
241 make -f buildScript.mk arduinodue_wifi
243 - All Lite Stack Modules in Debug (Lite Stack, Lite Unit Tests, Lite Examples)
244 for Arduino Due with WiFi Shield:
246 make -f buildScript.mk arduinodue_wifi_debug
248 =======================================
249 == Clean All Targets ==
250 =======================================
254 make -f buildScript.mk clean