Add libupnp dependency for Android

This commit is contained in:
Yann Diorcet 2013-02-13 16:53:50 +01:00
parent ea897fbe56
commit 7defe94fc5
11 changed files with 427 additions and 3 deletions

3
.gitmodules vendored
View file

@ -61,3 +61,6 @@
[submodule "submodules/externals/libxml2"] [submodule "submodules/externals/libxml2"]
path = submodules/externals/libxml2 path = submodules/externals/libxml2
url = git://git.gnome.org/libxml2 url = git://git.gnome.org/libxml2
[submodule "submodules/externals/libupnp"]
path = submodules/externals/libupnp
url = git://git.code.sf.net/p/pupnp/code

View file

@ -8,6 +8,7 @@ LINPHONE_VERSION=$(shell cd submodules/linphone && git describe)
LINPHONE_ANDROID_DEBUG_VERSION=$(shell git describe) LINPHONE_ANDROID_DEBUG_VERSION=$(shell git describe)
ANDROID_MOST_RECENT_TARGET=$(shell android list target -c | grep android | tail -n1) ANDROID_MOST_RECENT_TARGET=$(shell android list target -c | grep android | tail -n1)
BUILD_UPNP=1
BUILD_REMOTE_PROVISIONING=1 BUILD_REMOTE_PROVISIONING=1
BUILD_X264=1 BUILD_X264=1
BUILD_AMRNB=full # 0, light or full BUILD_AMRNB=full # 0, light or full
@ -88,7 +89,7 @@ prepare-mediastreamer2:
prepare-sources: prepare-ffmpeg prepare-ilbc prepare-vpx prepare-silk prepare-srtp prepare-mediastreamer2 prepare-sources: prepare-ffmpeg prepare-ilbc prepare-vpx prepare-silk prepare-srtp prepare-mediastreamer2
generate-libs: generate-libs:
$(NDK_PATH)/ndk-build LINPHONE_VERSION=$(LINPHONE_VERSION) BUILD_REMOTE_PROVISIONING=$(BUILD_REMOTE_PROVISIONING) BUILD_X264=$(BUILD_X264) BUILD_AMRNB=$(BUILD_AMRNB) BUILD_AMRWB=$(BUILD_AMRWB) BUILD_GPLV3_ZRTP=$(BUILD_GPLV3_ZRTP) BUILD_SILK=$(BUILD_SILK) BUILD_G729=$(BUILD_G729) BUILD_TUNNEL=$(BUILD_TUNNEL) BUILD_WEBRTC_AECM=$(BUILD_WEBRTC_AECM) BUILD_FOR_X86=$(BUILD_FOR_X86) USE_JAVAH=$(USE_JAVAH) -j$(NUMCPUS) $(NDK_PATH)/ndk-build LINPHONE_VERSION=$(LINPHONE_VERSION) BUILD_UPNP=$(BUILD_UPNP) BUILD_REMOTE_PROVISIONING=$(BUILD_REMOTE_PROVISIONING) BUILD_X264=$(BUILD_X264) BUILD_AMRNB=$(BUILD_AMRNB) BUILD_AMRWB=$(BUILD_AMRWB) BUILD_GPLV3_ZRTP=$(BUILD_GPLV3_ZRTP) BUILD_SILK=$(BUILD_SILK) BUILD_G729=$(BUILD_G729) BUILD_TUNNEL=$(BUILD_TUNNEL) BUILD_WEBRTC_AECM=$(BUILD_WEBRTC_AECM) BUILD_FOR_X86=$(BUILD_FOR_X86) USE_JAVAH=$(USE_JAVAH) -j$(NUMCPUS)
update-project: update-project:
$(SDK_PATH)/android update project --path . --target $(ANDROID_MOST_RECENT_TARGET) $(SDK_PATH)/android update project --path . --target $(ANDROID_MOST_RECENT_TARGET)

View file

@ -1 +1 @@
version.name=1.2.2.2-822-gfedf522 version.name=2.0.3-1-20-gea897fb

View file

@ -36,6 +36,11 @@ SRTP_C_INCLUDE= \
endif endif
#endif #endif
#libupnp
ifeq ($(BUILD_UPNP),1)
include $(linphone-root-dir)/submodules/externals/build/libupnp/Android.mk
endif
#libxml2 #libxml2
ifeq ($(BUILD_REMOTE_PROVISIONING),1) ifeq ($(BUILD_REMOTE_PROVISIONING),1)
include $(linphone-root-dir)/submodules/externals/build/libxml2/Android.mk include $(linphone-root-dir)/submodules/externals/build/libxml2/Android.mk

View file

@ -2,6 +2,11 @@ APP_PROJECT_PATH := $(call my-dir)/../
APP_MODULES :=libspeex libgsm libortp libosip2 libeXosip2 libmediastreamer2 liblinphone liblinphonenoneon libneon APP_MODULES :=libspeex libgsm libortp libosip2 libeXosip2 libmediastreamer2 liblinphone liblinphonenoneon libneon
APP_STL := stlport_static APP_STL := stlport_static
#uPnp
ifeq ($(BUILD_UPNP),1)
APP_MODULES += libupnp
endif
#remote provisioning #remote provisioning
ifeq ($(BUILD_REMOTE_PROVISIONING),1) ifeq ($(BUILD_REMOTE_PROVISIONING),1)
APP_MODULES += libxml2 libxml2lpc liblpc2xml APP_MODULES += libxml2 libxml2lpc liblpc2xml

View file

@ -0,0 +1,70 @@
LOCAL_PATH:= $(call my-dir)/../../libupnp
include $(CLEAR_VARS)
# We need to build this for both the device (as a shared library)
# and the host (as a static library for tools to use).
LOCAL_C_INCLUDES += \
$(LOCAL_PATH)/../build/libupnp/inc \
$(LOCAL_PATH)/upnp/inc \
$(LOCAL_PATH)/upnp/src/inc \
$(LOCAL_PATH)/threadutil/inc \
$(LOCAL_PATH)/ixml/inc \
$(LOCAL_PATH)/ixml/src/inc \
LOCAL_SRC_FILES := \
upnp/src/ssdp/ssdp_device.c \
upnp/src/ssdp/ssdp_server.c \
upnp/src/ssdp/ssdp_ctrlpt.c \
upnp/src/genlib/service_table/service_table.c \
upnp/src/genlib/util/upnp_timeout.c \
upnp/src/genlib/util/membuffer.c \
upnp/src/genlib/util/strintmap.c \
upnp/src/genlib/util/util.c \
upnp/src/genlib/net/uri/uri.c \
upnp/src/genlib/net/http/httpreadwrite.c \
upnp/src/genlib/net/http/statcodes.c \
upnp/src/genlib/net/http/httpparser.c \
upnp/src/genlib/net/http/webserver.c \
upnp/src/genlib/net/http/parsetools.c \
upnp/src/genlib/net/sock.c \
upnp/src/genlib/miniserver/miniserver.c \
upnp/src/genlib/client_table/client_table.c \
upnp/src/api/upnptools.c \
upnp/src/api/UpnpString.c \
upnp/src/api/upnpapi.c \
upnp/src/api/upnpdebug.c \
upnp/src/uuid/sysdep.c \
upnp/src/uuid/uuid.c \
upnp/src/uuid/md5.c \
upnp/src/soap/soap_device.c \
upnp/src/soap/soap_ctrlpt.c \
upnp/src/soap/soap_common.c \
upnp/src/win_dll.c \
upnp/src/inet_pton.c \
upnp/src/urlconfig/urlconfig.c \
upnp/src/gena/gena_callback2.c \
upnp/src/gena/gena_ctrlpt.c \
upnp/src/gena/gena_device.c \
threadutil/src/FreeList.c \
threadutil/src/LinkedList.c \
threadutil/src/ThreadPool.c \
threadutil/src/TimerThread.c \
ixml/src/ixmldebug.c \
ixml/src/node.c \
ixml/src/ixmlmembuf.c \
ixml/src/attr.c \
ixml/src/ixmlparser.c \
ixml/src/element.c \
ixml/src/nodeList.c \
ixml/src/ixml.c \
ixml/src/document.c \
ixml/src/namedNodeMap.c \
LOCAL_C_FLAGS += -DPTHREAD_MUTEX_RECURSIVE=PTHREAD_MUTEX_RECURSIVE
LOCAL_MODULE:= libupnp
include $(BUILD_STATIC_LIBRARY)

View file

@ -0,0 +1,202 @@
/* autoconfig.h. Generated from autoconfig.h.in by configure. */
/* autoconfig.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 to compile debug code */
/* #undef DEBUG */
/* Define to 1 if you have the <arpa/inet.h> header file. */
#define HAVE_ARPA_INET_H 1
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
/* #undef HAVE_DOPRNT */
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
#define HAVE_FSEEKO 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the <netdb.h> header file. */
#define HAVE_NETDB_H 1
/* Define to 1 if you have the <netinet/in.h> header file. */
#define HAVE_NETINET_IN_H 1
/* Define if you have POSIX threads libraries and header files. */
#define HAVE_PTHREAD 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Defines if strndup is available on your system */
#define HAVE_STRNDUP 1
/* Defines if strnlen is available on your system */
#define HAVE_STRNLEN 1
/* Define to 1 if you have the <syslog.h> header file. */
#define HAVE_SYSLOG_H 1
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
#define HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the `vprintf' function. */
#define HAVE_VPRINTF 1
/* Define to 1 if you have the <ws2tcpip.h> header file. */
/* #undef HAVE_WS2TCPIP_H */
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* Define to 1 to prevent compilation of assert() */
#define NDEBUG 1
/* Define to 1 to prevent some debug code */
#define NO_DEBUG 1
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
/* #undef NO_MINUS_C_MINUS_O */
/* Name of package */
#define PACKAGE "libupnp"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "mroberto@users.sourceforge.net"
/* Define to the full name of this package. */
#define PACKAGE_NAME "libupnp"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "libupnp 1.6.17"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "libupnp"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.6.17"
/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
/* #undef PTHREAD_CREATE_JOINABLE */
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* see upnpconfig.h */
#define UPNP_ENABLE_BLOCKING_TCP_CONNECTIONS 1
/* see upnpconfig.h */
/* #undef UPNP_ENABLE_IPV6 */
/* see upnpconfig.h */
#define UPNP_ENABLE_NOTIFICATION_REORDERING 1
/* see upnpconfig.h */
/* #undef UPNP_ENABLE_UNSPECIFIED_SERVER */
/* see upnpconfig.h */
#define UPNP_HAVE_CLIENT 1
/* see upnpconfig.h */
/* #undef UPNP_HAVE_DEBUG */
/* see upnpconfig.h */
#define UPNP_HAVE_DEVICE 1
/* see upnpconfig.h */
#define UPNP_HAVE_GENA 1
/* see upnpconfig.h */
#define UPNP_HAVE_OPTSSDP 1
/* see upnpconfig.h */
#define UPNP_HAVE_SOAP 1
/* see upnpconfig.h */
#define UPNP_HAVE_SSDP 1
/* see upnpconfig.h */
#define UPNP_HAVE_TOOLS 1
/* see upnpconfig.h */
#define UPNP_HAVE_WEBSERVER 1
/* Do not use pthread_rwlock_t */
/* #undef UPNP_USE_RWLOCK */
/* see upnpconfig.h */
#define UPNP_VERSION_MAJOR 1
/* see upnpconfig.h */
#define UPNP_VERSION_MINOR 6
/* see upnpconfig.h */
#define UPNP_VERSION_PATCH 17
/* see upnpconfig.h */
#define UPNP_VERSION_STRING "1.6.17"
/* Version number of package */
#define VERSION "1.6.17"
/* File Offset size */
#define _FILE_OFFSET_BITS 64
/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
/* #undef _LARGEFILE_SOURCE */
/* Large files support */
#define _LARGE_FILE_SOURCE /**/
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `long int' if <sys/types.h> does not define. */
/* #undef off_t */
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */
/* Type for storing the length of struct sockaddr */
/* #undef socklen_t */

View file

@ -0,0 +1,136 @@
/* upnp/inc/upnpconfig.h. Generated from upnpconfig.h.in by configure. */
/* -*- C -*- */
/*******************************************************************************
*
* Copyright (c) 2006 Rémi Turboult <r3mi@users.sourceforge.net>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/
#ifndef UPNP_CONFIG_H
#define UPNP_CONFIG_H
/***************************************************************************
* Library version
***************************************************************************/
/** The library version (string) e.g. "1.3.0" */
#define UPNP_VERSION_STRING "1.6.17"
/** Major version of the library */
#define UPNP_VERSION_MAJOR 1
/** Minor version of the library */
#define UPNP_VERSION_MINOR 6
/** Patch version of the library */
#define UPNP_VERSION_PATCH 17
/** The library version (numeric) e.g. 10300 means version 1.3.0 */
#define UPNP_VERSION \
((UPNP_VERSION_MAJOR * 100 + UPNP_VERSION_MINOR) * 100 + UPNP_VERSION_PATCH)
/***************************************************************************
* Large file support
***************************************************************************/
/** File Offset size */
#define _FILE_OFFSET_BITS 64
/** Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
/* #undef _LARGEFILE_SOURCE */
/** Large files support */
#define _LARGE_FILE_SOURCE /**/
/***************************************************************************
* Library optional features
***************************************************************************/
/*
* The following defines can be tested in order to know which
* optional features have been included in the installed library.
*/
/** Defined to 1 if the library has been compiled with DEBUG enabled
* (i.e. configure --enable-debug) : <upnp/upnpdebug.h> file is available */
/* #undef UPNP_HAVE_DEBUG */
/** Defined to 1 if the library has been compiled with client API enabled
* (i.e. configure --enable-client) */
#define UPNP_HAVE_CLIENT 1
/** Defined to 1 if the library has been compiled with device API enabled
* (i.e. configure --enable-device) */
/* #undef UPNP_HAVE_DEVICE */
/** Defined to 1 if the library has been compiled with integrated web server
* (i.e. configure --enable-webserver --enable-device) */
/* #undef UPNP_HAVE_WEBSERVER */
/** Defined to 1 if the library has been compiled with the SSDP part enabled
* (i.e. configure --enable-ssdp) */
#define UPNP_HAVE_SSDP 1
/** Defined to 1 if the library has been compiled with optional SSDP headers
* support (i.e. configure --enable-optssdp) */
#define UPNP_HAVE_OPTSSDP 1
/** Defined to 1 if the library has been compiled with the SOAP part enabled
* (i.e. configure --enable-soap) */
#define UPNP_HAVE_SOAP 1
/** Defined to 1 if the library has been compiled with the GENA part enabled
* (i.e. configure --enable-gena) */
#define UPNP_HAVE_GENA 1
/** Defined to 1 if the library has been compiled with helper API
* (i.e. configure --enable-tools) : <upnp/upnptools.h> file is available */
#define UPNP_HAVE_TOOLS 1
/** Defined to 1 if the library has been compiled with ipv6 support
* (i.e. configure --enable-ipv6) */
/* #undef UPNP_ENABLE_IPV6 */
/** Defined to 1 if the library has been compiled with unspecified SERVER
* header (i.e. configure --enable-unspecified_server) */
/* #undef UPNP_ENABLE_UNSPECIFIED_SERVER */
#endif /* UPNP_CONFIG_H */

View file

@ -1,4 +1,5 @@
LOCAL_PATH:= $(call my-dir)/../../libxml2 LOCAL_PATH:= $(call my-dir)/../../libxml2
include $(CLEAR_VARS)
# We need to build this for both the device (as a shared library) # We need to build this for both the device (as a shared library)
# and the host (as a static library for tools to use). # and the host (as a static library for tools to use).

1
submodules/externals/libupnp vendored Submodule

@ -0,0 +1 @@
Subproject commit d0b16d056e0f681a2bc6bd70859303b4bba521dc

@ -1 +1 @@
Subproject commit ee6366003f803184830617e21e3bb709c9f09a8c Subproject commit 04fef5fcca637a601025b01a62843f1423ff0d96