replace : iotivity -> iotivity-sec
[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 iotivity")
33 env.AppendUnique(CPPFLAGS = ['-fPIC', '-D__TIZEN__','-DWITH_POSIX', '-Wall', '-DSLP_SDK_LOG', '-g','-D_GNU_SOURCE','-DTIZEN_DEBUG_ENABLE', '-DTB_LOG','`pkg-config', '--cflags', '--libs', 'iotivity', 'dlog','capi-network-wifi',
34                 'gobject-2.0', 'gio-2.0', 'gthread-2.0', 'glib-2.0`'])
35
36 env.AppendUnique(CPPDEFINES = ['TB_LOG'])
37
38 env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
39
40 if routing == 'GW':
41         env.AppendUnique(CPPDEFINES = ['ROUTING_GATEWAY'])
42 elif routing == 'EP':
43         env.AppendUnique(CPPDEFINES = ['ROUTING_EP'])
44
45 env.Append(LIBS=['-lgobject-2.0', '-lglib-2.0', '-lgio-2.0', '-lgthread-2.0'])
46 env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'connectivity_abstraction','coap', 'libESEnrolleeSDK','pthread'])
47
48 if secured == '1':
49         env.PrependUnique(CPPPATH = [root_dir + '/external/inc/'])
50         env.AppendUnique(CPPDEFINES = ['__WITH_DTLS__'])
51
52 env.Program('enrollee_wifi', [sample_dir + 'enrolleewifi.cpp', sample_dir + 'easysetup_wifi_conn.c'])