#****************************************************************** # # Copyright 2016 Samsung Electronics All Rights Reserved. # #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Import('env') mediator_env = env.Clone() target_os = env.get('TARGET_OS') ###################################################################### # Build flags ###################################################################### mediator_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')]) if env.get('RELEASE'): mediator_env.AppendUnique(CCFLAGS = ['-Os']) mediator_env.AppendUnique(CPPDEFINES = ['NDEBUG']) else: mediator_env.AppendUnique(CCFLAGS = ['-g']) if env.get('LOGGING'): env.AppendUnique(CPPDEFINES = ['TB_LOG']) env.AppendUnique(CPPDEFINES = ['CPP_MEDIATOR']) if target_os not in ['windows', 'winrt']: mediator_env.AppendUnique(CXXFLAGS = ['-Wall', '-std=c++0x']) mediator_env.PrependUnique(CPPPATH = [ env.get('SRC_DIR') + '/resource/include', env.get('SRC_DIR') + '/resource/oc_logger/include', env.get('SRC_DIR') + '/resource/csdk/ocmalloc/include', env.get('SRC_DIR') + '/resource/csdk/stack/include', env.get('SRC_DIR') + '/resource/csdk/logger/include', env.get('SRC_DIR') + '/resource/csdk/security/include', env.get('SRC_DIR') + '/extlibs/cjson', env.get('SRC_DIR') + '/service/easy-setup/mediator/richsdk/inc', env.get('SRC_DIR') + '/service/easy-setup/mediator/richsdk/src', env.get('SRC_DIR') + '/service/easy-setup/inc']) mediator_env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'pthread', 'connectivity_abstraction', 'coap', 'ESMediatorRich']) if env.get('SECURED') == '1': mediator_env.PrependUnique(LIBS = ['ocpmapi', 'ocprovision']) mediator = mediator_env.Program('mediator_rich', 'mediator_cpp.cpp') i_mediator = mediator_env.Install(env.get('BUILD_DIR'), mediator) Alias('mediator_rich', i_mediator) env.AppendTarget('mediator_rich')