IOT-1583: Removing /W4 warning from resource/c_common.
[platform/upstream/iotivity.git] / resource / c_common / windows / SConscript
1 ##
2 # Builds Windows-specific helper library
3 ##
4 Import('env common_env')
5 import os.path
6
7 # Include any headers that might be missing on Windows
8 header = os.path.abspath('./include')
9 env.AppendUnique(CPPPATH = [header])
10 common_env.AppendUnique(CPPPATH = [header])
11
12 ######################################################################
13 # Source files and Targets
14 ######################################################################
15 src_dir = Dir('src').abspath
16 helper_src = [
17         os.path.join(src_dir, 'getopt.c'),
18         os.path.join(src_dir, 'win_sleep.c'),
19         os.path.join(src_dir, 'snprintf.c'),
20         os.path.join(src_dir, 'pthread_create.c')
21         ]
22
23 win_helper_env = common_env.Clone()
24
25 win_helper_env.AppendUnique(CPPPATH = ['#resource/csdk/logger/include'])
26 static_libwinhelper = win_helper_env.StaticLibrary('win_helper', helper_src)
27
28 win_helper_env.InstallTarget(static_libwinhelper, 'win_helper')
29 win_helper_env.UserInstallTargetLib(static_libwinhelper, 'win_helper')
30 win_helper_env.UserInstallTargetHeader('include/win_sleep.h', 'c_common/windows/include', 'win_sleep.h')
31 win_helper_env.UserInstallTargetHeader('include/pthread_create.h', 'c_common/windows/include', 'pthread_create.h')
32 win_helper_env.UserInstallTargetHeader('include/vs12_snprintf.h', 'c_common/windows/include', 'vs12_snprintf.h')
33
34 helper_lib = ['win_helper']
35 env.AppendUnique(LIBS = helper_lib)
36 common_env.AppendUnique(LIBS = helper_lib)