1 #******************************************************************
3 # Copyright 2015 Samsung Electronics All Rights Reserved.
5 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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
11 # http://www.apache.org/licenses/LICENSE-2.0
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.
19 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
22 # linux RE Secure sample apps build script (Secure Server & Client)
26 # Add third party libraries
28 SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env')
30 sample_env = lib_env.Clone()
32 sample_env.AppendUnique(CXXFLAGS = ['-Wall', '-std=c++0x'])
33 sample_env.AppendUnique(LIBS = [
38 'connectivity_abstraction',
43 sample_env.AppendUnique(CPPPATH = ['../../../include'])
45 if 'rt' in sample_env.get('LIBS'):
46 sample_env.Append(LIBS = ['rt'])
48 ######################################################################
49 # ##### Authorized Client #####
50 ######################################################################
51 client_env = sample_env.Clone()
52 client_env.AppendUnique(LIBS = 'rcs_client')
54 sampleAuthorizedClient = client_env.Program('sampleAuthorizedClient', 'SampleAuthorizedClient.cpp')
55 client_env.InstallTarget(sampleAuthorizedClient, 'sampleAuthorizedClient')
57 ######################################################################
58 # ##### Secure Server #####
59 ######################################################################
60 server_env = sample_env.Clone()
61 server_env.AppendUnique(LIBS = 'rcs_server')
63 sampleSecureServer = server_env.Program('sampleSecureServer', 'SampleSecureServer.cpp')
64 server_env.InstallTarget(sampleSecureServer, 'sampleSecureServer')
66 ######################################################################
67 # ##### Copy the client & Server credentials files to build directory #####
68 ######################################################################
70 src_dir = sample_env.get('SRC_DIR')
71 svr_db_src_dir = src_dir + '/service/resource-encapsulation/examples/linux/secureResourceExample/'
72 svr_db_build_dir = env.get('BUILD_DIR') +'/service/resource-encapsulation/examples/linux/secureResourceExample/'
73 sample_env.Alias("install", sample_env.Install( svr_db_build_dir,
74 svr_db_src_dir + 'oic_svr_db_client.json'))
75 sample_env.Alias("install", sample_env.Install( svr_db_build_dir,
76 svr_db_src_dir + 'oic_svr_db_server.json'))