Merge branch 'notification-service'
[platform/upstream/iotivity.git] / service / easy-setup / sampleapp / enrollee / tizen-sdb / EnrolleeSample / scons / SConscript
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 Import('env')
22
23 target_os = env.get('TARGET_OS')
24 transport = env.get('TARGET_TRANSPORT')
25 secured = env.get('SECURED')
26 routing = env.get('ROUTING')
27 OIC_LIB = 'oic'
28 root_dir = env.get('ROOT_DIR')
29 build_dir = env.get('BUILD_DIR')
30 sample_dir = build_dir
31
32 env.ParseConfig("pkg-config --cflags --libs capi-network-wifi dlog gobject-2.0 gio-2.0 gthread-2.0 glib-2.0")
33 env.AppendUnique(CPPFLAGS = ['-std=c++0x', '-fPIC', '-D__TIZEN__','-DWITH_POSIX', '-Wall', '-DSLP_SDK_LOG', '-g','-D_GNU_SOURCE','-DTIZEN_DEBUG_ENABLE', '-DTB_LOG','`pkg-config', '--cflags', '--libs','dlog','capi-network-wifi',
34                 'gobject-2.0', 'gio-2.0', 'gthread-2.0', 'glib-2.0`'])
35
36 #env.AppendUnique(CPPFLAGS = ['-std=c++0x', '-fPIC', '-D__TIZEN__','-DWITH_POSIX', '-Wall', '-DSLP_SDK_LOG', '-g','-D_GNU_SOURCE','-DTIZEN_DEBUG_ENABLE', '-DTB_LOG','`pkg-config', '--cflags', '--libs','dlog','capi-network-wifi',
37 #                               'gobject-2.0','glib-2.0`'])
38
39 env.AppendUnique(CPPDEFINES = ['TB_LOG', 'ESWIFI'])
40
41 env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
42
43 if routing == 'GW':
44         env.AppendUnique(CPPDEFINES = ['ROUTING_GATEWAY'])
45 elif routing == 'EP':
46         env.AppendUnique(CPPDEFINES = ['ROUTING_EP'])
47
48 env.Append(LIBS=['-lgobject-2.0', '-lglib-2.0', '-lgio-2.0', '-lgthread-2.0'])
49 env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'connectivity_abstraction','coap', 'libESEnrolleeSDK','pthread'])
50
51 if secured == '1':
52         env.PrependUnique(CPPPATH = [root_dir + '/external/inc/'])
53         env.AppendUnique(CPPDEFINES = ['__WITH_DTLS__'])
54
55 env.Program('enrollee_wifi', [sample_dir + 'enrolleewifi.cpp', sample_dir + 'easysetup_wifi_conn.c'])