[IOT-2291] Remove OCProvisionCRL from ocprovisioningmanager.h
[platform/upstream/iotivity.git] / auto_build.py
1 #!/usr/bin/python
2
3 import os
4 import sys
5 import platform
6 import subprocess
7 import multiprocessing
8
9 # help message
10 def helpmsg(script):
11     helpstr = '''
12 Usage:
13     build:
14         python %s <targetbuild>
15         Allowed values for <target_build>: all, linux_unsecured, linux_secured, linux_unsecured_with_ra, linux_secured_with_ra, linux_unsecured_with_rd, linux_secured_with_rd, android, arduino, tizen, simulator, darwin, windows, msys
16         Note: \"linux\" will build \"linux_unsecured\", \"linux_secured\", \"linux_unsecured_with_ra\", \"linux_secured_with_ra\", \"linux_secured_with_rd\", \"linux_unsecured_with_mq\", \"linux_secured_with_tcp\" & \"linux_unsecured_with_tcp\" & \"linux_unsecured_with_rd\".
17         Any selection will build both debug and release versions of all available targets in the scope you've selected.
18         To choose any specific command, please use the SCons commandline directly. Please refer to [IOTIVITY_REPO]/Readme.scons.txt.
19     clean:
20         python %s -c
21     '''
22     print (helpstr % (script, script))
23     sys.exit()
24
25 def call_scons(build_options, extra_option_str):
26     """
27     This function formats and runs a scons command
28     Arguments:
29     build_options    -- {Dictionary} build flags (keys) associated with values;
30     extra_option_str -- {String} extra options to append to scons command
31     """
32     cmd_line = "scons VERBOSE=" + VERBOSE
33     for key in build_options:
34         cmd_line += " " + key + "=" + str(build_options[key])
35
36     cmd_line += " " + str(extra_option_str)
37
38     print ("Running : " + cmd_line)
39     sys.stdout.flush()
40     exit_code = subprocess.Popen(cmd_line, shell=True).wait()
41     if exit_code != 0:
42         exit(exit_code)
43
44 def build_all(flag, extra_option_str):
45     if platform.system() == "Linux":
46         build_linux_unsecured(flag, extra_option_str)
47         build_linux_secured(flag, extra_option_str)
48         build_linux_unsecured_with_ra(flag, extra_option_str)
49         build_linux_secured_with_ra(flag, extra_option_str)
50         build_linux_unsecured_with_rm(flag, extra_option_str)
51         build_linux_unsecured_with_rd(flag, extra_option_str)
52         build_linux_secured_with_rd(flag, extra_option_str)
53         build_linux_unsecured_with_mq(flag, extra_option_str)
54         build_linux_unsecured_with_tcp(flag, extra_option_str)
55         build_linux_secured_with_tcp(flag, extra_option_str)
56         build_linux_unsecured_with_java(flag, extra_option_str)
57         build_linux_secured_with_java(flag, extra_option_str)
58         build_simulator(flag, extra_option_str)
59
60         build_android(flag, extra_option_str)
61         build_arduino(flag, extra_option_str)
62         build_tizen(flag, extra_option_str)
63
64     if platform.system() == "Windows":
65         build_windows(flag, extra_option_str)
66
67     if platform.system() == "Darwin":
68         build_darwin(flag, extra_option_str)
69
70 def build_linux(flag, extra_option_str):
71     build_linux_unsecured(flag, extra_option_str)
72     build_linux_secured(flag, extra_option_str)
73
74 def build_linux_unsecured(flag, extra_option_str):
75     print ("*********** Build for linux ************")
76     build_options = {
77                         'RELEASE':flag,
78                         'SECURED':0,
79                     }
80     call_scons(build_options, extra_option_str)
81
82 def build_linux_secured_with_tcp(flag, extra_option_str):
83     print ("*********** Build for linux with Secured TCP ************")
84     build_options = {
85                         'RELEASE':flag,
86                         'WITH_TCP': 1,
87                         'WITH_CLOUD':1,
88                     }
89     call_scons(build_options, extra_option_str)
90
91 def build_linux_unsecured_with_java(flag, extra_option_str):
92     print ("*********** Build for linux with Java support ************")
93     build_options = {
94                         'RELEASE':flag,
95                         'BUILD_JAVA': 1,
96                         'TARGET_TRANSPORT': 'IP',
97                     }
98     call_scons(build_options, extra_option_str)
99
100 def build_linux_secured_with_java(flag, extra_option_str):
101     print ("*********** Build for linux with Java support and secured ************")
102     build_options = {
103                         'RELEASE':flag,
104                         'BUILD_JAVA': 1,
105                         'TARGET_TRANSPORT': 'IP',
106                         'SECURED': 1,
107                     }
108     call_scons(build_options, extra_option_str)
109
110 def build_linux_unsecured_with_tcp(flag, extra_option_str):
111     print ("*********** Build for linux with TCP ************")
112     build_options = {
113                         'RELEASE':flag,
114                         'WITH_TCP': 1,
115                         'TARGET_TRANSPORT': 'IP',
116                         'SECURED':0,
117                     }
118     call_scons(build_options, extra_option_str)
119
120 def build_linux_unsecured_with_rm(flag, extra_option_str):
121     print ("*********** Build for linux with RoutingManager************")
122     build_options = {
123                         'ROUTING':'GW',
124                         'RELEASE':flag,
125                         'SECURED':0,
126                     }
127     call_scons(build_options, extra_option_str)
128
129 def build_linux_secured(flag, extra_option_str):
130     print ("*********** Build for linux with Security *************")
131     build_options = {
132                         'RELEASE':flag,
133                     }
134     call_scons(build_options, extra_option_str)
135
136 def build_linux_unsecured_with_ra(flag, extra_option_str):
137     print ("*********** Build for linux With Remote Access *************")
138     build_options = {
139                         'RELEASE':flag,
140                         'WITH_RA':1,
141                         'WITH_RA_IBB':1,
142                         'SECURED':0,
143                     }
144     call_scons(build_options, extra_option_str)
145
146 def build_linux_secured_with_ra(flag, extra_option_str):
147     print ("*********** Build for linux With Remote Access & Security ************")
148     build_options = {
149                         'RELEASE':flag,
150                         'WITH_RA':1,
151                         'WITH_RA_IBB':1,
152                     }
153     call_scons(build_options, extra_option_str)
154
155 def build_linux_unsecured_with_rd(flag, extra_option_str):
156     print ("*********** Build for linux With Resource Directory *************")
157     build_options = {
158                         'RELEASE':flag,
159                         'RD_MODE':'all',
160                         'SECURED':0,
161                     }
162     call_scons(build_options, extra_option_str)
163
164 def build_linux_secured_with_rd(flag, extra_option_str):
165     print ("*********** Build for linux With Resource Directory & Security ************")
166     build_options = {
167                         'RELEASE':flag,
168                         'RD_MODE':'all',
169                     }
170     call_scons(build_options, extra_option_str)
171
172 def build_linux_unsecured_with_mq(flag, extra_option_str):
173     print ("*********** Build for linux With Message Queue ************")
174     build_options = {
175                         'RELEASE':flag,
176                         'WITH_MQ':'PUB,SUB,BROKER',
177                         'SECURED':0,
178                     }
179     call_scons(build_options, extra_option_str)
180
181 def build_linux_unsecured_with_tcp(flag, extra_option_str):
182     print ("*********** Build for linux With tcp ************")
183     build_options = {
184                         'RELEASE':flag,
185                         'WITH_TCP':'1',
186                         'SECURED':0,
187                     }
188     call_scons(build_options, extra_option_str)
189
190 def build_android(flag, extra_option_str):
191     # Note: for android, as oic-resource uses C++11 feature stoi and to_string,
192     # it requires gcc-4.9, currently only android-ndk-r10(for linux)
193     # and windows android-ndk-r10(64bit target version) support these features.
194     print ("*********** Build for android armeabi *************")
195     build_options = {
196                         'TARGET_OS':'android',
197                         'TARGET_ARCH':'armeabi',
198                         'RELEASE':flag,
199                     }
200     call_scons(build_options, extra_option_str)
201
202 def build_android_x86(flag, extra_option_str):
203     """ Build Android x86 Suite """
204     build_android_x86_with_ip(flag, extra_option_str)
205     build_android_x86_with_bt(flag, extra_option_str)
206     build_android_x86_with_ble(flag, extra_option_str)
207
208 def build_android_x86_with_ip(flag, extra_option_str):
209     print ("*********** Build for android x86 *************")
210     build_options = {
211                         'TARGET_OS':'android',
212                         'TARGET_ARCH':'x86',
213                         'RELEASE':flag,
214                         'TARGET_TRANSPORT':'IP',
215                     }
216     call_scons(build_options, extra_option_str)
217
218 def build_android_x86_with_bt(flag, extra_option_str):
219     print ("*********** Build for android x86 with Bluetooth *************")
220     build_options = {
221                         'TARGET_OS':'android',
222                         'TARGET_ARCH':'x86',
223                         'RELEASE':flag,
224                         'TARGET_TRANSPORT':'BT',
225                     }
226     call_scons(build_options, extra_option_str)
227
228 def build_android_x86_with_ble(flag, extra_option_str):
229     print ("*********** Build for android x86 with Bluetooth Low Energy *************")
230     build_options = {
231                         'TARGET_OS':'android',
232                         'TARGET_ARCH':'x86',
233                         'RELEASE':flag,
234                         'TARGET_TRANSPORT':'BLE',
235                     }
236     call_scons(build_options, extra_option_str)
237
238 def build_android_x86_with_rm(flag, extra_option_str):
239     """ Build Android x86 Routing Manager Suite """
240     build_android_x86_with_rm_and_ip(flag, extra_option_str)
241     build_android_x86_with_rm_and_bt(flag, extra_option_str)
242     build_android_x86_with_rm_and_ble(flag, extra_option_str)
243
244 def build_android_x86_with_rm_and_ip(flag, extra_option_str):
245     print ("*********** Build for android x86 with Routing Manager *************")
246     build_options = {
247                         'TARGET_OS':'android',
248                         'TARGET_ARCH':'x86',
249                         'ROUTING':'GW',
250                         'RELEASE':flag,
251                         'TARGET_TRANSPORT':'IP',
252                     }
253     call_scons(build_options, extra_option_str)
254
255 def build_android_x86_with_rm_and_bt(flag, extra_option_str):
256     print ("*********** Build for android x86 with Routing Manager and Bluetooth *************")
257     build_options = {
258                         'TARGET_OS':'android',
259                         'TARGET_ARCH':'x86',
260                         'ROUTING':'GW',
261                         'RELEASE':flag,
262                         'TARGET_TRANSPORT':'BT',
263                     }
264     call_scons(build_options, extra_option_str)
265
266 def build_android_x86_with_rm_and_ble(flag, extra_option_str):
267     print ("*********** Build for android x86 with Routing Manager and Bluetooth Low Energy *************")
268     build_options = {
269                         'TARGET_OS':'android',
270                         'TARGET_ARCH':'x86',
271                         'ROUTING':'GW',
272                         'RELEASE':flag,
273                         'TARGET_TRANSPORT':'BLE',
274                     }
275     call_scons(build_options, extra_option_str)
276
277 def build_android_armeabi(flag, extra_option_str):
278     """ Build Android Armeabi Suite """
279     build_android_armeabi_with_ip(flag, extra_option_str)
280     build_android_armeabi_with_bt(flag, extra_option_str)
281     build_android_armeabi_with_ble(flag, extra_option_str)
282
283 def build_android_armeabi_with_ip(flag, extra_option_str):
284     print ("*********** Build for android armeabi *************")
285     build_options = {
286                         'TARGET_OS':'android',
287                         'TARGET_ARCH':'armeabi',
288                         'RELEASE':flag,
289                         'TARGET_TRANSPORT':'IP',
290                     }
291     call_scons(build_options, extra_option_str)
292
293 def build_android_armeabi_with_bt(flag, extra_option_str):
294     print ("*********** Build for android armeabi with Bluetooth *************")
295     build_options = {
296                         'TARGET_OS':'android',
297                         'TARGET_ARCH':'armeabi',
298                         'RELEASE':flag,
299                         'TARGET_TRANSPORT':'BT',
300                     }
301     call_scons(build_options, extra_option_str)
302
303 def build_android_armeabi_with_ble(flag, extra_option_str):
304     print ("*********** Build for android armeabi with Bluetooth Low Energy *************")
305     build_options = {
306                         'TARGET_OS':'android',
307                         'TARGET_ARCH':'armeabi',
308                         'RELEASE':flag,
309                         'TARGET_TRANSPORT':'BLE',
310                     }
311     call_scons(build_options, extra_option_str)
312
313 def build_android_armeabi_with_rm(flag, extra_option_str):
314     """ Build Android Armeabi Routing Manager Suite """
315     build_android_armeabi_with_rm_and_ip(flag, extra_option_str)
316     build_android_armeabi_with_rm_and_bt(flag, extra_option_str)
317     build_android_armeabi_with_rm_and_ble(flag, extra_option_str)
318
319 def build_android_armeabi_with_rm_and_ip(flag, extra_option_str):
320     print ("*********** Build for android armeabi with Routing Manager *************")
321     build_options = {
322                         'TARGET_OS':'android',
323                         'TARGET_ARCH':'armeabi',
324                         'ROUTING':'GW',
325                         'RELEASE':flag,
326                         'TARGET_TRANSPORT':'IP',
327                     }
328     call_scons(build_options, extra_option_str)
329
330 def build_android_armeabi_with_rm_and_bt(flag, extra_option_str):
331     print ("*********** Build for android armeabi with Routing Manager and Bluetooth *************")
332     build_options = {
333                         'TARGET_OS':'android',
334                         'TARGET_ARCH':'armeabi',
335                         'ROUTING':'GW',
336                         'RELEASE':flag,
337                         'TARGET_TRANSPORT':'BT',
338                     }
339     call_scons(build_options, extra_option_str)
340
341 def build_android_armeabi_with_rm_and_ble(flag, extra_option_str):
342     print ("*********** Build for android armeabi with Routing Manager and Bluetooth Low Energy *************")
343     build_options = {
344                         'TARGET_OS':'android',
345                         'TARGET_ARCH':'armeabi',
346                         'ROUTING':'GW',
347                         'RELEASE':flag,
348                         'TARGET_TRANSPORT':'BLE',
349                     }
350     call_scons(build_options, extra_option_str)
351
352 def build_arduino(flag, extra_option_str):
353     print ("*********** Build for arduino avr *************")
354     extra_option_str = "resource " + extra_option_str
355     build_options = {
356                         'TARGET_OS':'arduino',
357                         'UPLOAD':'false',
358                         'BOARD':'mega',
359                         'TARGET_ARCH':'avr',
360                         'TARGET_TRANSPORT':'IP',
361                         'SHIELD':'ETH',
362                         'RELEASE':flag,
363                     }
364     call_scons(build_options, extra_option_str)
365
366     build_options['SHIELD'] = 'WIFI'
367     call_scons(build_options, extra_option_str)
368
369     build_options['TARGET_TRANSPORT'] = 'BLE'
370     build_options['SHIELD']           = 'RBL_NRF8001'
371     call_scons(build_options, extra_option_str)
372
373     print ("*********** Build for arduino arm *************")
374     build_options['BOARD']            = 'arduino_due_x'
375     build_options['TARGET_ARCH']      = 'arm'
376     build_options['TARGET_TRANSPORT'] = 'IP'
377     build_options['SHIELD']           = 'ETH'
378     call_scons(build_options, extra_option_str)
379
380     build_options['SHIELD'] = 'WIFI'
381     call_scons(build_options, extra_option_str)
382
383     # BLE support for the Arduino Due is currently unavailable.
384
385 def build_tizen(flag, extra_option_str):
386     print ("*********** Build for Tizen *************")
387     cmd_line = "/bin/sh " + os.getcwd() + "/gbsbuild.sh"
388     print ("Running : " + cmd_line)
389     exit_code = subprocess.Popen([cmd_line], shell=True).wait()
390     if exit_code != 0:
391         exit(exit_code)
392
393     print ("*********** Build for Tizen octbstack lib and sample with security *************")
394     build_extra_options = "-f resource/csdk/stack/samples/tizen/build/SConscript " + extra_option_str
395     build_options = {
396                         'TARGET_OS':'tizen',
397                         'TARGET_TRANSPORT':'IP',
398                         'LOGGING':'true',
399                         'RELEASE':flag,
400                     }
401     call_scons(build_options, build_extra_options)
402
403     print ("*********** Build for Tizen octbstack lib and sample *************")
404     build_options['SECURED'] = 0
405     call_scons(build_options, build_extra_options)
406
407     print ("*********** Build for Tizen octbstack lib and sample with Routing Manager*************")
408     build_options['ROUTING'] = 'GW'
409     call_scons(build_options, build_extra_options)
410
411     print ("*********** Build for Tizen Easy-Setup  sample *************")
412     build_options['ROUTING'] = 'EP'
413     build_options['ES_TARGET_ENROLLEE'] = 'tizen'
414     build_extra_options = "-f service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/build/tizen/SConscript " + extra_option_str
415     call_scons(build_options, build_extra_options)
416
417 # Mac OS and iOS
418 def build_darwin(flag, extra_option_str):
419     print ("*********** Build for OSX *************")
420     build_options = {
421                         'TARGET_OS':'darwin',
422                         'SYS_VERSION':'10.9',
423                         'RELEASE':flag,
424                     }
425     call_scons(build_options, extra_option_str)
426
427     print ("*********** Build for IOS i386 *************")
428     build_options = {
429                         'TARGET_OS':'ios',
430                         'TARGET_ARCH':'i386',
431                         'SYS_VERSION':'7.0',
432                         'RELEASE':flag,
433                     }
434     call_scons(build_options, extra_option_str)
435
436     print ("*********** Build for IOS x86_64 *************")
437     build_options['TARGET_ARCH'] = 'x86_64'
438     call_scons(build_options, extra_option_str)
439
440     print ("*********** Build for IOS armv7 *************")
441     build_options['TARGET_ARCH'] = 'armv7'
442     call_scons(build_options, extra_option_str)
443
444     print ("*********** Build for IOS armv7s *************")
445     build_options['TARGET_ARCH'] = 'armv7s'
446     call_scons(build_options, extra_option_str)
447
448     print ("*********** Build for IOS arm64 *************")
449     build_options['TARGET_ARCH'] = 'arm64'
450     call_scons(build_options, extra_option_str)
451
452 # Windows
453 def build_windows(flag, extra_option_str):
454     print ("*********** Build for Windows *************")
455     os.environ["SCONSFLAGS"] = ""
456     build_options = {
457                         'TARGET_OS':'windows',
458                         'TARGET_ARCH':'amd64',
459                         'RELEASE':flag,
460                         'WITH_RA':0,
461                         'TARGET_TRANSPORT':'IP',
462                         'WITH_TCP':0,
463                         'BUILD_SAMPLE':'ON',
464                         'LOGGING':'off',
465                         'TEST':1,
466                         'RD_MODE':'all',
467                     }
468     call_scons(build_options, extra_option_str)
469
470 # Windows msys
471 def build_msys(flag, extra_option_str):
472     print ("*********** Build for msys_nt *************")
473     os.environ["SCONSFLAGS"] = ""
474     build_options = {
475                         'TARGET_OS':'msys_nt',
476                         'TARGET_ARCH':'x86_64',
477                         'RELEASE':flag,
478                         'WITH_RA':0,
479                         'TARGET_TRANSPORT':'IP',
480                         'WITH_TCP':0,
481                         'BUILD_SAMPLE':'ON',
482                         'LOGGING':'off',
483                         'TEST':1,
484                         'RD_MODE':'all',
485                     }
486     call_scons(build_options, extra_option_str)
487
488 def build_simulator(flag, extra_option_str):
489     print ("*********** Build for simulator plugin *************")
490     build_options = {
491                         'SIMULATOR':1,
492                         'RELEASE':flag,
493                     }
494     call_scons(build_options, extra_option_str)
495
496 def unit_tests():
497     print ("*********** Unit test Start *************")
498     build_options = {
499                         'RELEASE':'false',
500                     }
501     extra_option_str = "-c ."
502     call_scons(build_options, extra_option_str)
503
504     build_options = {
505                         'TEST':1,
506                         'RELEASE':'false',
507                         'SECURED':0,
508                     }
509     extra_option_str = ""
510     call_scons(build_options, extra_option_str)
511
512     build_options = {
513                         'TEST':1,
514                         'SECURED':1,
515                         'RELEASE':'false',
516                     }
517     call_scons(build_options, extra_option_str)
518
519     print ("*********** Unit test Stop *************")
520
521 # Main module starts here
522 if os.getenv("SCONSFLAGS", "") == "":
523     os.environ["SCONSFLAGS"] = "-Q -j " + str(multiprocessing.cpu_count())
524
525 arg_num     = len(sys.argv)
526 script_name = sys.argv[0]
527
528 # May be overridden in user's shell
529 VERBOSE = os.getenv("VERBOSE", "1")
530
531 if arg_num == 1:
532     build_all("true", "")
533     build_all("false", "")
534     unit_tests()
535
536 elif arg_num == 2:
537     if str(sys.argv[1]) == '-c':
538         build_all("true", "-c")
539         build_all("false", "-c")
540
541     elif str(sys.argv[1]) == "all":
542         build_all("true", "")
543         build_all("false", "")
544         unit_tests()
545
546     elif str(sys.argv[1]) == "linux":
547         build_linux("true", "")
548         build_linux("false", "")
549
550     elif str(sys.argv[1]) == "linux_unsecured":
551         build_linux_unsecured("true", "")
552         build_linux_unsecured("false", "")
553         build_linux_unsecured_with_rm("true", "")
554         build_linux_unsecured_with_rm("false", "")
555
556     elif str(sys.argv[1]) == "linux_secured":
557         build_linux_secured("true", "")
558         build_linux_secured("false", "")
559
560     elif str(sys.argv[1]) == "linux_unsecured_with_ra":
561         build_linux_unsecured_with_ra("true", "")
562         build_linux_unsecured_with_ra("false", "")
563
564     elif str(sys.argv[1]) == "linux_secured_with_ra":
565         build_linux_secured_with_ra("true", "")
566         build_linux_secured_with_ra("false", "")
567
568     elif str(sys.argv[1]) == "linux_unsecured_with_rd":
569         build_linux_unsecured_with_rd("true", "")
570         build_linux_unsecured_with_rd("false", "")
571
572     elif str(sys.argv[1]) == "linux_secured_with_rd":
573         build_linux_secured_with_rd("true", "")
574         build_linux_secured_with_rd("false", "")
575
576     elif str(sys.argv[1]) == "linux_unsecured_with_mq":
577         build_linux_unsecured_with_mq("true", "")
578         build_linux_unsecured_with_mq("false", "")
579
580     elif str(sys.argv[1]) == "linux_unsecured_with_tcp":
581         build_linux_unsecured_with_tcp("true", "")
582         build_linux_unsecured_with_tcp("false", "")
583
584     elif str(sys.argv[1]) == "linux_secured_with_tcp":
585         build_linux_secured_with_tcp("false", "")
586         build_linux_secured_with_tcp("true", "")
587
588     elif str(sys.argv[1]) == "linux_unsecured_with_java":
589         build_linux_unsecured_with_java("false", "")
590         build_linux_unsecured_with_java("true", "")
591
592     elif str(sys.argv[1]) == "linux_secured_with_java":
593         build_linux_secured_with_java("false", "")
594         build_linux_secured_with_java("true", "")
595
596     elif str(sys.argv[1]) == "android":
597         build_android("true", "")
598         build_android("false", "")
599
600     elif str(sys.argv[1]) == "android_x86":
601         build_android_x86("true", "")
602         build_android_x86("false", "")
603         build_android_x86_with_rm("true", "")
604         build_android_x86_with_rm("false", "")
605
606     elif str(sys.argv[1]) == "android_x86_with_ip":
607         build_android_x86_with_ip("true", "")
608         build_android_x86_with_ip("false", "")
609
610     elif str(sys.argv[1]) == "android_x86_with_bt":
611         build_android_x86_with_bt("true", "")
612         build_android_x86_with_bt("false", "")
613
614     elif str(sys.argv[1]) == "android_x86_with_ble":
615         build_android_x86_with_ble("true", "")
616         build_android_x86_with_ble("false", "")
617
618     elif str(sys.argv[1]) == "android_x86_with_rm_and_ip":
619         build_android_x86_with_rm_and_ip("true", "")
620         build_android_x86_with_rm_and_ip("false", "")
621
622     elif str(sys.argv[1]) == "android_x86_with_rm_and_bt":
623         build_android_x86_with_rm_and_bt("true", "")
624         build_android_x86_with_rm_and_bt("false", "")
625
626     elif str(sys.argv[1]) == "android_x86_with_rm_and_ble":
627         build_android_x86_with_rm_and_ble("true", "")
628         build_android_x86_with_rm_and_ble("false", "")
629
630     elif str(sys.argv[1]) == "android_armeabi":
631         build_android_armeabi("true", "")
632         build_android_armeabi("false", "")
633         build_android_armeabi_with_rm("true", "")
634         build_android_armeabi_with_rm("false", "")
635
636     elif str(sys.argv[1]) == "android_armeabi_with_ip":
637         build_android_armeabi_with_ip("true", "")
638         build_android_armeabi_with_ip("false", "")
639
640     elif str(sys.argv[1]) == "android_armeabi_with_bt":
641         build_android_armeabi_with_bt("true", "")
642         build_android_armeabi_with_bt("false", "")
643
644     elif str(sys.argv[1]) == "android_armeabi_with_ble":
645         build_android_armeabi_with_ble("true", "")
646         build_android_armeabi_with_ble("false", "")
647
648     elif str(sys.argv[1]) == "android_armeabi_with_rm_and_ip":
649         build_android_armeabi_with_rm_and_ip("true", "")
650         build_android_armeabi_with_rm_and_ip("false", "")
651
652     elif str(sys.argv[1]) == "android_armeabi_with_rm_and_bt":
653         build_android_armeabi_with_rm_and_bt("true", "")
654         build_android_armeabi_with_rm_and_bt("false", "")
655
656     elif str(sys.argv[1]) == "android_armeabi_with_rm_and_ble":
657         build_android_armeabi_with_rm_and_ble("true", "")
658         build_android_armeabi_with_rm_and_ble("false", "")
659
660     elif str(sys.argv[1]) == "arduino":
661         build_arduino("true", "")
662         build_arduino("false", "")
663
664     elif str(sys.argv[1]) == "windows":
665         build_windows("true", "")
666         build_windows("false", "")
667
668     elif str(sys.argv[1]) == "msys":
669         build_msys("true", "")
670         build_msys("false", "")
671
672     elif str(sys.argv[1]) == "tizen":
673         build_tizen("true", "")
674         build_tizen("false", "")
675
676     elif str(sys.argv[1]) == "simulator":
677         build_simulator("true", "")
678         build_simulator("false", "")
679
680     elif str(sys.argv[1]) == "darwin":
681         build_darwin("true", "")
682         build_darwin("false", "")
683
684     elif str(sys.argv[1]) == "unit_tests":
685         unit_tests()
686
687     else:
688         helpmsg(script_name)
689 else:
690         helpmsg(script_name)
691
692 print ("===================== done =====================")