1 #******************************************************************
3 # Copyright 2014 Intel Mobile Communications GmbH 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 # liboc_logger examples build script
28 SConscript(env.get('SRC_DIR') + '/resource/third_party_libs.scons', 'lib_env')
30 examples_env = lib_env.Clone()
31 ######################################################################
33 ######################################################################
34 examples_env.PrependUnique(CPPPATH = ['../include'])
35 examples_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
36 examples_env.AppendUnique(LIBS = ['oc_logger', 'stdc++'])
38 target_os = env.get('TARGET_OS')
39 if target_os == 'android':
40 examples_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
41 examples_env.AppendUnique(LIBS = ['gnustl_shared'])
43 if target_os not in ['arduino', 'windows', 'winrt']:
44 examples_env.AppendUnique(CFLAGS = Split('-Wall -std=c99 -Werror'))
45 examples_env.AppendUnique(CXXFLAGS = Split('-Wall -std=c++0x'))
47 ######################################################################
48 # Source files and Targets
49 ######################################################################
50 examples_c = examples_env.Program('examples_c', 'test_logging.c', OBJPREFIX='c_')
51 examples_cpp = examples_env.Program('examples_cpp', 'test_logging.cpp')
53 Alias('liboc_logger_examples', [examples_c, examples_cpp])
54 examples_env.AppendTarget('liboc_logger_examples')