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 # ResourceDirectory Sample Apps build script
28 SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env')
30 rd_sample_app_env = lib_env.Clone()
32 ######################################################################
34 ######################################################################
35 rd_sample_app_env.AppendUnique(CPPPATH = ['../include'])
37 rd_sample_app_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-Wextra', '-std=c++0x'])
38 rd_sample_app_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
39 rd_sample_app_env.AppendUnique(RPATH = [env.get('BUILD_DIR')])
40 rd_sample_app_env.PrependUnique(LIBS = ['resource_directory', 'oc', 'octbstack'])
42 if env.get('SECURED') == '1':
43 rd_sample_app_env.AppendUnique(LIBS = ['tinydtls'])
45 ####################################################################
46 # Source files and Targets
47 ######################################################################
48 rd_server = rd_sample_app_env.Program('rd_server', 'rd_main.c')
49 rd_publishingClient = rd_sample_app_env.Program('rd_publishingClient', 'rd_publishingClient.cpp')
50 rd_queryClient = rd_sample_app_env.Program('rd_queryClient', 'rd_queryClient.cpp')
52 Alias("resource_directory", [rd_server, rd_publishingClient])
54 env.AppendTarget('resource_directory')