X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=extlibs%2Flibcoap%2FSConscript;h=6441a5a665923f3d531d84e2b8a8790048509328;hb=c315c87e07c4080ecd0ef488e7a1047bc3c509b2;hp=338e6506acc4c97262f0e591562de0ff03f7b6fb;hpb=1a06bd70ae5f6842dae31c1b50976f65feb60595;p=platform%2Fupstream%2Fiotivity.git diff --git a/extlibs/libcoap/SConscript b/extlibs/libcoap/SConscript index 338e650..6441a5a 100644 --- a/extlibs/libcoap/SConscript +++ b/extlibs/libcoap/SConscript @@ -36,13 +36,17 @@ ca_transport = libcoap_env.get('TARGET_TRANSPORT') with_tcp = libcoap_env.get('WITH_TCP') with_upstream_libcoap = libcoap_env.get('WITH_UPSTREAM_LIBCOAP') +# Temporary LibCoAP URL is a fork of the original. +# Once a pull request is merged, change this back to the obgm original below. +libcoap_repo_url = 'https://github.com/dthaler/libcoap' +#libcoap_repo_url = 'https://github.com/obgm/libcoap' + ###################################################################### # Download libCoAP ###################################################################### libcoap_branch = 'develop' libcoap_dir = os.path.join(src_dir, 'extlibs', 'libcoap', 'libcoap') libcoap_zip_file = os.path.join(src_dir, 'extlibs', 'libcoap', libcoap_branch + '.zip') -libcoap_repo_url = 'https://github.com/obgm/libcoap' libcoap_url = libcoap_repo_url + '/archive/' + libcoap_branch + '.zip' libcoap_checkout_command = 'git clone ' + libcoap_repo_url + '.git extlibs/libcoap/libcoap --branch ' + libcoap_branch @@ -111,11 +115,11 @@ if target_os == 'msys_nt': libcoap_env.AppendUnique(CPPDEFINES = ['_DEFAULT_SOURCE']) libcoap_env.AppendUnique(CFLAGS = ['-std=c99']) -if target_os in ['linux', 'tizen', 'android', 'ios', 'arduino']: +if target_os in ['linux', 'tizen', 'android', 'ios', 'arduino', 'tizenrt']: if with_tcp == True: libcoap_env.AppendUnique(CPPDEFINES = ['WITH_TCP']) -if target_os in ['linux', 'tizen', 'android', 'arduino']: +if target_os in ['linux', 'tizen', 'android', 'arduino', 'tizenrt']: libcoap_env.AppendUnique(LIBS = ['log']) if (('BLE' in ca_transport) or ('BT' in ca_transport) or ('ALL' in ca_transport)): libcoap_env.AppendUnique(CPPDEFINES = ['WITH_TCP']) @@ -134,6 +138,7 @@ if env.get('LOGGING') == '1': ###################################################################### with_upstream_libcoap = libcoap_env.get('WITH_UPSTREAM_LIBCOAP') if with_upstream_libcoap == '1': + libcoap_env.PrependUnique(CPPPATH = ['libcoap/include/coap']) libcoap_env.AppendUnique(CPPDEFINES = ['WITH_UPSTREAM_LIBCOAP']) libcoap_src_root = os.path.join(libcoap_dir, 'src') @@ -151,11 +156,14 @@ if with_upstream_libcoap == '1': '\@LIBCOAP_PACKAGE_VERSION\@' : libcoap_version } libcoap_env.Substfile(coap_h_pc_file, SUBST_DICT = pc_vars) + + libcoap_src = glob.glob(os.path.join(libcoap_src_root, '*.c')) + libcoap_src.remove(os.path.join(libcoap_src_root, 'coap_io_lwip.c')) else: # For bring up purposes only, the forked version will live here. libcoap_src_root = src_dir + '/resource/csdk/connectivity/lib/libcoap-4.1.1' + libcoap_src = glob.glob(os.path.join(libcoap_src_root, '*.c')) -libcoap_src = glob.glob(os.path.join(libcoap_src_root, '*.c')) libcoap = libcoap_env.StaticLibrary('coap', libcoap_src, OBJPREFIX='libcoap_') libcoap_env.InstallTarget([libcoap], 'coap')