Makefile.common: Clean up the miniupnpc check

This commit is contained in:
orbea 2017-12-25 20:45:17 -08:00
parent 5a4bd619ba
commit 9e7882ec96
2 changed files with 19 additions and 26 deletions

View File

@ -1525,27 +1525,24 @@ ifeq ($(HAVE_NETWORKING), 1)
cores/libretro-net-retropad/net_retropad_core.o
endif
ifeq ($(HAVE_MINIUPNPC), 1)
ifeq ($(HAVE_BUILTINMINIUPNPC), 1)
DEFINES += -DHAVE_BUILTINMINIUPNPC -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR
DEFINES += -I$(DEPS_DIR)
OBJ += \
$(DEPS_DIR)/miniupnpc/igd_desc_parse.o \
$(DEPS_DIR)/miniupnpc/upnpreplyparse.o \
$(DEPS_DIR)/miniupnpc/upnpcommands.o \
$(DEPS_DIR)/miniupnpc/upnperrors.o \
$(DEPS_DIR)/miniupnpc/connecthostport.o \
$(DEPS_DIR)/miniupnpc/portlistingparse.o \
$(DEPS_DIR)/miniupnpc/receivedata.o \
$(DEPS_DIR)/miniupnpc/upnpdev.o \
$(DEPS_DIR)/miniupnpc/minissdpc.o \
$(DEPS_DIR)/miniupnpc/miniwget.o \
$(DEPS_DIR)/miniupnpc/miniupnpc.o \
$(DEPS_DIR)/miniupnpc/minixml.o \
$(DEPS_DIR)/miniupnpc/minisoap.o
else
LIBS += $(MINIUPNPC_LIBS)
endif
ifeq ($(HAVE_BUILTINMINIUPNPC), 1)
DEFINES += -DHAVE_BUILTINMINIUPNPC -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR
DEFINES += -I$(DEPS_DIR)
OBJ += $(DEPS_DIR)/miniupnpc/igd_desc_parse.o \
$(DEPS_DIR)/miniupnpc/upnpreplyparse.o \
$(DEPS_DIR)/miniupnpc/upnpcommands.o \
$(DEPS_DIR)/miniupnpc/upnperrors.o \
$(DEPS_DIR)/miniupnpc/connecthostport.o \
$(DEPS_DIR)/miniupnpc/portlistingparse.o \
$(DEPS_DIR)/miniupnpc/receivedata.o \
$(DEPS_DIR)/miniupnpc/upnpdev.o \
$(DEPS_DIR)/miniupnpc/minissdpc.o \
$(DEPS_DIR)/miniupnpc/miniwget.o \
$(DEPS_DIR)/miniupnpc/miniupnpc.o \
$(DEPS_DIR)/miniupnpc/minixml.o \
$(DEPS_DIR)/miniupnpc/minisoap.o
else ifeq ($(HAVE_MINIUPNPC), 1)
LIBS += $(MINIUPNPC_LIBS)
endif
endif

View File

@ -195,13 +195,9 @@ if [ "$HAVE_NETWORKING" = 'yes' ]; then
HAVE_NETWORK_CMD=yes
HAVE_NETWORKGAMEPAD=yes
if [ "$HAVE_MINIUPNPC" != "no" ]; then
if [ "$HAVE_BUILTINMINIUPNPC" != "yes" ]; then
check_lib '' MINIUPNPC "-lminiupnpc"
fi
if [ "$HAVE_BUILTINMINIUPNPC" = "yes" ]; then
HAVE_MINIUPNPC='yes'
fi
else
die : 'Warning: All networking features have been disabled.'
HAVE_KEYMAPPER='no'