2 # Builds Windows-specific helper library
4 Import('env common_env')
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])
12 ######################################################################
13 # Source files and Targets
14 ######################################################################
15 src_dir = Dir('src').abspath
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')
23 win_helper_env = common_env.Clone()
25 win_helper_env.AppendUnique(CPPPATH = ['#resource/csdk/logger/include'])
26 static_libwinhelper = win_helper_env.StaticLibrary('win_helper', helper_src)
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')
34 helper_lib = ['win_helper']
35 env.AppendUnique(LIBS = helper_lib)
36 common_env.AppendUnique(LIBS = helper_lib)