2 # Building sample application
9 ca_os = app_env.get('TARGET_OS')
10 ca_transport = app_env.get('TARGET_TRANSPORT')
11 secured = app_env.get('SECURED')
14 main_dir = Dir('.').srcnode().abspath
15 jni_dir = main_dir + '/sample_serivce/android/jni'
16 env.PrependUnique(CPPPATH = ['jni_dir'])
17 app_env.PrependUnique(CPPDEFINES = ['__ANDROID__'])
19 #####################################################################
20 # Source files and Target(s)
21 ######################################################################
23 print"Reading ca script %s"%ca_transport
25 app_env.AppendUnique(CPPPATH = [root_dir + '/api/'])
26 app_env.AppendUnique(CPPPATH = [root_dir + '/inc/'])
27 app_env.AppendUnique(CPPPATH = [root_dir + '/common/inc/'])
28 app_env.AppendUnique(CPPPATH = [root_dir + 'lib/libcoap-4.1.1'])
30 print "Reading sample application build script"
32 build_dir = app_env.get('BUILD_DIR')
33 secured = app_env.get('SECURED')
35 print "Sample secured flag is %s" % secured
37 sample_dir = 'casample/sampleService/src/main/jni/'
38 sample_src = [sample_dir + 'ResourceModel.c',]
40 print " sample src %s" % sample_src
42 app_env.AppendUnique(LIBPATH = [app_env.get('BUILD_DIR'), '.',])
43 app_env.AppendUnique(CPPPATH = ['lib/android'])
44 app_env.PrependUnique(LIBS = ['connectivity_abstraction'])
45 app_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
49 app_env.AppendUnique(CPPPATH = [root_dir + 'external/inc/'])
50 app_env.PrependUnique(CPPDEFINES = ['__WITH_DTLS__'])
52 libRMInterface = app_env.SharedLibrary('RMInterface', sample_src, OBJPREFIX='libRMInterface_')
53 app_env.InstallTarget(libRMInterface, 'RMInterface')