diff --git a/android/jni/Android.mk b/android/jni/Android.mk index f8651f31462d..48c68aafa17b 100644 --- a/android/jni/Android.mk +++ b/android/jni/Android.mk @@ -423,6 +423,7 @@ EXEC_AND_LIB_FILES := \ $(SRC)/Core/Util/AudioFormat.cpp \ $(SRC)/Core/Util/PortManager.cpp \ $(SRC)/Core/Util/GameManager.cpp \ + $(SRC)/Core/Util/PortManager.cpp \ $(SRC)/Core/Util/BlockAllocator.cpp \ $(SRC)/Core/Util/PPGeDraw.cpp \ $(SRC)/git-version.cpp @@ -590,6 +591,7 @@ ifeq ($(UNITTEST),1) include $(BUILD_EXECUTABLE) endif +$(call import-module,miniupnpc-build) $(call import-module,libzip) $(call import-module,native) $(call import-module,glslang-build) diff --git a/ext/miniupnpc-build/Android.mk b/ext/miniupnpc-build/Android.mk new file mode 100644 index 000000000000..28642b3453d3 --- /dev/null +++ b/ext/miniupnpc-build/Android.mk @@ -0,0 +1,45 @@ +# Basic Android.mk for miniupnpc in PPSSPP + +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_MODULE := miniupnpc-build +LOCAL_ARM_MODE := arm +LOCAL_SRC_FILES := \ + ../miniupnp/miniupnpc/connecthostport.c \ + ../miniupnp/miniupnpc/igd_desc_parse.c \ + ../miniupnp/miniupnpc/minisoap.c \ + ../miniupnp/miniupnpc/minissdpc.c \ + ../miniupnp/miniupnpc/miniupnpc.c \ + ../miniupnp/miniupnpc/miniwget.c \ + ../miniupnp/miniupnpc/minixml.c \ + ../miniupnp/miniupnpc/minixmlvalid.c \ + ../miniupnp/miniupnpc/portlistingparse.c \ + ../miniupnp/miniupnpc/receivedata.c \ + ../miniupnp/miniupnpc/upnpcommands.c \ + ../miniupnp/miniupnpc/upnpdev.c \ + ../miniupnp/miniupnpc/upnperrors.c \ + ../miniupnp/miniupnpc/upnpreplyparse.c # \ + # miniupnpcstrings.h + + +LOCAL_CFLAGS := -O3 -fsigned-char -fno-strict-aliasing -Wno-multichar -DNO_GETADDRINFO -DMINIUPNPC_SET_SOCKET_TIMEOUT -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112L -fPIC +LOCAL_CPPFLAGS := -fno-exceptions -std=gnu++11 -fno-rtti -Wno-reorder +# Note: LOCAL_PATH is the directory this file is in. +LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. $(LOCAL_PATH)/../miniupnp/miniupnpc .. + +ifeq ($(findstring armeabi-v7a,$(TARGET_ARCH_ABI)),armeabi-v7a) +LOCAL_CFLAGS := $(LOCAL_CFLAGS) -DARM -DARMEABI_V7A +else ifeq ($(TARGET_ARCH_ABI),armeabi) +LOCAL_CFLAGS := $(LOCAL_CFLAGS) -DARM -DARMEABI -march=armv6 +else ifeq ($(TARGET_ARCH_ABI),arm64-v8a) +LOCAL_CFLAGS := $(LOCAL_CFLAGS) -D_ARCH_64 -DARM64 +else ifeq ($(TARGET_ARCH_ABI),x86) +LOCAL_CFLAGS := $(LOCAL_CFLAGS) -D_M_IX86 +else ifeq ($(TARGET_ARCH_ABI),x86_64) +LOCAL_CFLAGS := $(LOCAL_CFLAGS) -D_M_X64 +endif + +# LOCAL_STATIC_LIBRARIES:=miniupnpc +include $(BUILD_STATIC_LIBRARY) diff --git a/ext/miniupnpc-build/miniupnpcstrings.h b/ext/miniupnpc-build/miniupnpcstrings.h new file mode 100644 index 000000000000..16d9b22836a6 --- /dev/null +++ b/ext/miniupnpc-build/miniupnpcstrings.h @@ -0,0 +1,23 @@ +/* $Id: miniupnpcstrings.h.in,v 1.6 2014/11/04 22:31:55 nanard Exp $ */ +/* Project: miniupnp + * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ + * Author: Thomas Bernard + * Copyright (c) 2005-2014 Thomas Bernard + * This software is subjects to the conditions detailed + * in the LICENCE file provided within this distribution */ +#ifndef MINIUPNPCSTRINGS_H_INCLUDED +#define MINIUPNPCSTRINGS_H_INCLUDED + +#define OS_STRING "MSWindows/10.0.19041" +#define MINIUPNPC_VERSION_STRING "2.1" + +#if 0 +/* according to "UPnP Device Architecture 1.0" */ +#define UPNP_VERSION_STRING "UPnP/1.0" +#else +/* according to "UPnP Device Architecture 1.1" */ +#define UPNP_VERSION_STRING "UPnP/1.1" +#endif + +#endif +