[TIZEN] Tizen console application support for enrollee
[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.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',
33                                 'gobject-2.0','glib-2.0`'])
34
35 env.AppendUnique(CPPDEFINES = ['TB_LOG', 'ESWIFI'])
36
37 env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
38
39 if routing == 'GW':
40         env.AppendUnique(CPPDEFINES = ['ROUTING_GATEWAY'])
41 elif routing == 'EP':
42         env.AppendUnique(CPPDEFINES = ['ROUTING_EP'])
43 env.Append(LIBS=['octbstack','connectivity_abstraction','coap', 'ESSDKLibrary','pthread'])
44
45 if secured == '1':
46         env.PrependUnique(CPPPATH = [root_dir + '/external/inc/'])
47         env.AppendUnique(CPPDEFINES = ['__WITH_DTLS__'])
48         env.Append(LIBS=['-ltinydtls'])
49
50 env.Program('enrollee_wifi', [sample_dir + 'enrollee_wifi.cpp'])
51