1 #******************************************************************
3 # Copyright 2016 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 # CoAP-HTTP-Proxy Sample Apps build script
28 SConscript('#service/third_party_libs.scons', 'lib_env')
30 proxy_sample_app_env = lib_env.Clone()
32 target_os = env.get('TARGET_OS')
33 ######################################################################
35 ######################################################################
36 proxy_sample_app_env.AppendUnique(CPPPATH = ['../include'])
38 if target_os not in ['windows']:
39 proxy_sample_app_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-Wextra', '-std=c++0x'])
41 proxy_sample_app_env.PrependUnique(LIBS = ['m'])
43 proxy_sample_app_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
44 proxy_sample_app_env.AppendUnique(RPATH = [env.get('BUILD_DIR')])
45 proxy_sample_app_env.PrependUnique(LIBS = ['coap_http_proxy', 'oc', 'octbstack', 'curl', 'connectivity_abstraction', 'cjson', 'm'])
46 proxy_sample_app_env.AppendUnique(CPPPATH = ['#resource/csdk/security/include'])
48 if env.get('SECURED') == '1':
49 proxy_sample_app_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
51 ####################################################################
52 # Source files and Targets
53 ######################################################################
54 proxy_server = proxy_sample_app_env.Program('proxy_main', 'proxy_main.c')
55 proxy_client = proxy_sample_app_env.Program('proxy_client', 'proxy_client.c')
56 Alias("coap_http_proxy", [proxy_server])
58 env.AppendTarget('coap_http_proxy')
60 if env.get('SECURED') == '1':
61 proxy_sample_src_dir = proxy_sample_app_env.get('SRC_DIR') + '/service/coap-http-proxy/samples/'
62 proxy_sample_build_dir = proxy_sample_app_env.get('BUILD_DIR') +'/service/coap-http-proxy/samples'
63 proxy_sample_app_env.Alias("install", proxy_sample_app_env.Install( proxy_sample_build_dir,
64 proxy_sample_src_dir + 'oic_svr_db_server.dat'))
65 proxy_sample_app_env.Alias("install", proxy_sample_app_env.Install( proxy_sample_build_dir,
66 proxy_sample_src_dir + 'oic_svr_db_client_devowner.dat'))