cbbbac120e599def17a886f6f756beb63d450adf
[platform/upstream/iotivity.git] / service / protocol-plugin / sample-app / linux / SConscript
1 ##
2 #sample-app build script
3 ##
4
5 Import('env')
6
7 # Add third party libraries
8 lib_env = env.Clone()
9 SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env')
10
11 sample_env = lib_env.Clone()
12
13 target_os = env.get('TARGET_OS')
14 ######################################################################
15 # Build flags
16 ######################################################################
17 sample_env.AppendUnique(CPPPATH = [
18                                 '../../plugin-manager/src/',
19                                 '../../lib/cpluff/libcpluff/',
20                                 '../../lib/rapidxml'])
21 if target_os not in ['windows', 'winrt']:
22         sample_env.AppendUnique(CXXFLAGS = ['-Wall', '-pthread', '-std=c++0x'])
23
24 sample_env.AppendUnique(LIBS = ['pthread'])
25 sample_env.AppendUnique(LIBS = ['oc', 'oc_logger', 'octbstack', 'coap', 'coap_csdk',
26                                                                 'connectivity_abstraction',
27                                                                 'ppm', 'pmimpl', 'dl'])
28
29 sample_env.ParseConfig('pkg-config --libs glib-2.0')
30
31 ######################################################################
32 # Source files and Targets
33 ######################################################################
34 mqttclient = sample_env.Program('mqtt/mqttclient', 'mqtt/mqttclient.cpp')
35
36 Alias('mqttclient', mqttclient)
37 env.AppendTarget('mqttclient')
38