mirror of
https://github.com/status-im/miniupnp.git
synced 2025-01-18 10:22:03 +00:00
Merge branch 'include-dir'
This commit is contained in:
commit
ee071c62f0
@ -56,42 +56,23 @@ configure_file (${CMAKE_CURRENT_SOURCE_DIR}/miniupnpcstrings.h.cmake ${CMAKE_CUR
|
||||
target_include_directories(miniupnpc-private INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)
|
||||
|
||||
set (MINIUPNPC_SOURCES
|
||||
igd_desc_parse.c
|
||||
miniupnpc.c
|
||||
minixml.c
|
||||
minisoap.c
|
||||
minissdpc.c
|
||||
miniwget.c
|
||||
upnpcommands.c
|
||||
upnpdev.c
|
||||
upnpreplyparse.c
|
||||
upnperrors.c
|
||||
connecthostport.c
|
||||
portlistingparse.c
|
||||
receivedata.c
|
||||
addr_is_reserved.c
|
||||
connecthostport.h
|
||||
igd_desc_parse.h
|
||||
minisoap.h
|
||||
minissdpc.h
|
||||
miniupnpc.h
|
||||
miniupnpctypes.h
|
||||
miniwget.h
|
||||
minixml.h
|
||||
portlistingparse.h
|
||||
receivedata.h
|
||||
upnpcommands.h
|
||||
upnpdev.h
|
||||
upnperrors.h
|
||||
upnpreplyparse.h
|
||||
addr_is_reserved.h
|
||||
src/igd_desc_parse.c
|
||||
src/miniupnpc.c
|
||||
src/minixml.c
|
||||
src/minisoap.c
|
||||
src/minissdpc.c
|
||||
src/miniwget.c
|
||||
src/upnpcommands.c
|
||||
src/upnpdev.c
|
||||
src/upnpreplyparse.c
|
||||
src/upnperrors.c
|
||||
src/connecthostport.c
|
||||
src/portlistingparse.c
|
||||
src/receivedata.c
|
||||
src/addr_is_reserved.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/miniupnpcstrings.h
|
||||
)
|
||||
|
||||
if (NOT WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "AmigaOS")
|
||||
set (MINIUPNPC_SOURCES ${MINIUPNPC_SOURCES} minissdpc.c)
|
||||
endif ()
|
||||
|
||||
if (WIN32)
|
||||
target_link_libraries(miniupnpc-private INTERFACE ws2_32 iphlpapi)
|
||||
elseif (CMAKE_SYSTEM_NAME STREQUAL "SunOS")
|
||||
@ -105,12 +86,15 @@ elseif (HAIKU)
|
||||
find_library (SOCKET_LIBRARY NAMES network)
|
||||
find_library (NSL_LIBRARY NAMES network)
|
||||
find_library (RESOLV_LIBRARY NAMES network)
|
||||
set (LDLIBS ${SOCKET_LIBRARY} ${NSL_LIBRARY} ${RESOLV_LIBRARY} ${LDLIBS})
|
||||
set (LDLIBS ${SOCKET_LIBRARY} ${NSL_LIBRARY} ${RESOLV_LIBRARY} ${LDLIBS})
|
||||
endif ()
|
||||
|
||||
|
||||
if (UPNPC_BUILD_STATIC)
|
||||
add_library (libminiupnpc-static STATIC ${MINIUPNPC_SOURCES})
|
||||
target_include_directories (libminiupnpc-static PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include/miniupnpc>)
|
||||
if (NOT UPNPC_BUILD_SHARED)
|
||||
add_library (miniupnpc::miniupnpc ALIAS libminiupnpc-static)
|
||||
endif()
|
||||
@ -143,7 +127,7 @@ if (UPNPC_BUILD_STATIC)
|
||||
endif()
|
||||
|
||||
if (UPNPC_BUILD_SAMPLE)
|
||||
add_executable (upnpc-static upnpc.c)
|
||||
add_executable (upnpc-static src/upnpc.c)
|
||||
target_link_libraries (upnpc-static PRIVATE libminiupnpc-static)
|
||||
target_include_directories(upnpc-static PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
||||
endif ()
|
||||
@ -151,6 +135,9 @@ endif ()
|
||||
|
||||
if (UPNPC_BUILD_SHARED)
|
||||
add_library (libminiupnpc-shared SHARED ${MINIUPNPC_SOURCES})
|
||||
target_include_directories (libminiupnpc-shared PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include/miniupnpc>)
|
||||
add_library (miniupnpc::miniupnpc ALIAS libminiupnpc-shared)
|
||||
set_target_properties (libminiupnpc-shared PROPERTIES EXPORT_NAME miniupnpc)
|
||||
set_target_properties (libminiupnpc-shared PROPERTIES OUTPUT_NAME "miniupnpc")
|
||||
@ -177,12 +164,12 @@ if (UPNPC_BUILD_SHARED)
|
||||
endif()
|
||||
|
||||
if (UPNPC_BUILD_SAMPLE)
|
||||
add_executable (upnpc-shared upnpc.c)
|
||||
add_executable (upnpc-shared src/upnpc.c)
|
||||
target_link_libraries (upnpc-shared PRIVATE libminiupnpc-shared)
|
||||
target_include_directories(upnpc-shared PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
||||
endif ()
|
||||
|
||||
add_executable (listdevices listdevices.c)
|
||||
add_executable (listdevices src/listdevices.c)
|
||||
target_link_libraries (listdevices PRIVATE libminiupnpc-shared)
|
||||
target_include_directories(listdevices PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
||||
endif ()
|
||||
@ -192,32 +179,40 @@ if (UPNPC_BUILD_TESTS)
|
||||
target_link_libraries(miniupnpc-tests INTERFACE miniupnpc-private)
|
||||
target_compile_definitions(miniupnpc-tests INTERFACE MINIUPNP_STATICLIB)
|
||||
|
||||
add_executable (testminixml testminixml.c minixml.c igd_desc_parse.c)
|
||||
add_executable (testminixml src/testminixml.c src/minixml.c src/igd_desc_parse.c)
|
||||
target_include_directories (testminixml PRIVATE
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
|
||||
target_link_libraries (testminixml PRIVATE miniupnpc-tests)
|
||||
|
||||
add_executable (minixmlvalid minixmlvalid.c minixml.c)
|
||||
add_executable (minixmlvalid src/minixmlvalid.c src/minixml.c)
|
||||
target_link_libraries (minixmlvalid PRIVATE miniupnpc-tests)
|
||||
|
||||
add_executable (testupnpreplyparse testupnpreplyparse.c
|
||||
minixml.c upnpreplyparse.c)
|
||||
add_executable (testupnpreplyparse src/testupnpreplyparse.c
|
||||
src/minixml.c src/upnpreplyparse.c)
|
||||
target_include_directories (testupnpreplyparse PRIVATE
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
|
||||
target_link_libraries (testupnpreplyparse PRIVATE miniupnpc-tests)
|
||||
|
||||
add_executable (testigddescparse testigddescparse.c
|
||||
igd_desc_parse.c minixml.c miniupnpc.c miniwget.c minissdpc.c
|
||||
upnpcommands.c upnpreplyparse.c minisoap.c connecthostport.c
|
||||
portlistingparse.c receivedata.c addr_is_reserved.c
|
||||
add_executable (testigddescparse src/testigddescparse.c
|
||||
src/igd_desc_parse.c src/minixml.c src/miniupnpc.c src/miniwget.c src/minissdpc.c
|
||||
src/upnpcommands.c src/upnpreplyparse.c src/minisoap.c src/connecthostport.c
|
||||
src/portlistingparse.c src/receivedata.c src/addr_is_reserved.c
|
||||
)
|
||||
target_include_directories (testigddescparse PRIVATE
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
|
||||
target_link_libraries (testigddescparse PRIVATE miniupnpc-tests)
|
||||
|
||||
add_executable (testminiwget testminiwget.c
|
||||
miniwget.c miniupnpc.c minisoap.c upnpcommands.c minissdpc.c
|
||||
upnpreplyparse.c minixml.c igd_desc_parse.c connecthostport.c
|
||||
portlistingparse.c receivedata.c addr_is_reserved.c
|
||||
add_executable (testminiwget src/testminiwget.c
|
||||
src/miniwget.c src/miniupnpc.c src/minisoap.c src/upnpcommands.c src/minissdpc.c
|
||||
src/upnpreplyparse.c src/minixml.c src/igd_desc_parse.c src/connecthostport.c
|
||||
src/portlistingparse.c src/receivedata.c src/addr_is_reserved.c
|
||||
)
|
||||
target_include_directories (testminiwget PRIVATE
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
|
||||
target_link_libraries (testminiwget PRIVATE miniupnpc-tests)
|
||||
|
||||
add_executable (testaddr_is_reserved testaddr_is_reserved.c
|
||||
addr_is_reserved.c
|
||||
add_executable (testaddr_is_reserved src/testaddr_is_reserved.c
|
||||
src/addr_is_reserved.c
|
||||
)
|
||||
target_link_libraries (testaddr_is_reserved PRIVATE miniupnpc-tests)
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
$Id: Changelog.txt,v 1.249 2021/03/02 23:47:36 nanard Exp $
|
||||
miniUPnP client Changelog.
|
||||
|
||||
2021/08/13:
|
||||
Change directory structure : include/ and src/ directories.
|
||||
|
||||
VERSION 2.2.2 : released 2021/03/03
|
||||
|
||||
2021/01/15:
|
||||
|
@ -1,9 +1,10 @@
|
||||
include README
|
||||
include VERSION
|
||||
include LICENSE
|
||||
include miniupnpcmodule.c
|
||||
include src/miniupnpcmodule.c
|
||||
include setup.py
|
||||
include Makefile
|
||||
include *.[ch]
|
||||
include src/*.[ch]
|
||||
include include/*.h
|
||||
include *.h.in
|
||||
include *.sh
|
||||
|
@ -27,6 +27,11 @@ endif
|
||||
HAVE_IPV6 ?= yes
|
||||
export HAVE_IPV6
|
||||
|
||||
# directories
|
||||
INCDIR = include
|
||||
SRCDIR = src
|
||||
BUILD = build
|
||||
|
||||
CC ?= gcc
|
||||
#AR = gar
|
||||
#CFLAGS = -O -g
|
||||
@ -39,6 +44,7 @@ CFLAGS ?= -O
|
||||
CFLAGS += -Wall
|
||||
CFLAGS += -W -Wstrict-prototypes
|
||||
CFLAGS += -fno-common
|
||||
CPPFLAGS += -I$(BUILD)
|
||||
CPPFLAGS += -DMINIUPNPC_SET_SOCKET_TIMEOUT
|
||||
CPPFLAGS += -DMINIUPNPC_GET_SRC_ADDR
|
||||
CPPFLAGS += -D_BSD_SOURCE
|
||||
@ -53,6 +59,9 @@ endif
|
||||
#CFLAGS += -ansi
|
||||
#CPPFLAGS += -DNO_GETADDRINFO
|
||||
|
||||
DEPFLAGS = -MM -MG
|
||||
|
||||
MKDIR = mkdir -p
|
||||
INSTALL = install
|
||||
SH = /bin/sh
|
||||
JAVA = java
|
||||
@ -77,75 +86,65 @@ endif
|
||||
# APIVERSION is used to build SONAME
|
||||
APIVERSION = 17
|
||||
|
||||
SRCS = igd_desc_parse.c miniupnpc.c minixml.c minisoap.c miniwget.c \
|
||||
upnpc.c upnpcommands.c upnpreplyparse.c testminixml.c \
|
||||
minixmlvalid.c testupnpreplyparse.c minissdpc.c \
|
||||
upnperrors.c testigddescparse.c testminiwget.c \
|
||||
connecthostport.c portlistingparse.c receivedata.c \
|
||||
upnpdev.c testportlistingparse.c miniupnpcmodule.c \
|
||||
minihttptestserver.c addr_is_reserved.c testaddr_is_reserved.c \
|
||||
listdevices.c
|
||||
SRCS = $(wildcard $(SRCDIR)/*.c)
|
||||
|
||||
LIBOBJS = miniwget.o minixml.o igd_desc_parse.o minisoap.o \
|
||||
LIBOBJS = $(addprefix $(BUILD)/,miniwget.o minixml.o igd_desc_parse.o minisoap.o \
|
||||
miniupnpc.o upnpreplyparse.o upnpcommands.o upnperrors.o \
|
||||
connecthostport.o portlistingparse.o receivedata.o upnpdev.o \
|
||||
addr_is_reserved.o
|
||||
addr_is_reserved.o)
|
||||
|
||||
ifeq (, $(findstring amiga, $(OS)))
|
||||
ifeq (, $(findstring mingw, $(OS))$(findstring cygwin, $(OS))$(findstring msys, $(OS)))
|
||||
CFLAGS := -fPIC $(CFLAGS)
|
||||
endif
|
||||
LIBOBJS := $(LIBOBJS) minissdpc.o
|
||||
endif
|
||||
BUILDINCLUDES = $(addprefix $(BUILD)/, miniupnpcstrings.h)
|
||||
|
||||
OBJS = $(patsubst %.c,%.o,$(SRCS))
|
||||
OBJS = $(patsubst $(SRCDIR)/%.c,$(BUILD)/%.o,$(SRCS))
|
||||
DEPS = $(patsubst $(SRCDIR)/%.c,$(BUILD)/%.d,$(SRCS))
|
||||
|
||||
# HEADERS to install
|
||||
HEADERS = miniupnpc.h miniwget.h upnpcommands.h igd_desc_parse.h \
|
||||
upnpreplyparse.h upnperrors.h miniupnpctypes.h \
|
||||
portlistingparse.h \
|
||||
upnpdev.h \
|
||||
miniupnpc_declspec.h
|
||||
CPPFLAGS += -I$(INCDIR)
|
||||
HEADERS = $(wildcard $(INCDIR)/*.h)
|
||||
|
||||
# library names
|
||||
LIBRARY = libminiupnpc.a
|
||||
LIBRARY = $(BUILD)/libminiupnpc.a
|
||||
ifneq (, $(findstring darwin, $(OS)))
|
||||
SHAREDLIBRARY = libminiupnpc.dylib
|
||||
SONAME = $(basename $(SHAREDLIBRARY)).$(APIVERSION).dylib
|
||||
SHAREDLIBRARY = $(BUILD)/libminiupnpc.dylib
|
||||
SONAME = $(notdir $(basename $(SHAREDLIBRARY))).$(APIVERSION).dylib
|
||||
CPPFLAGS += -D_DARWIN_C_SOURCE
|
||||
else
|
||||
ifeq ($(JARSUFFIX), win32)
|
||||
SHAREDLIBRARY = miniupnpc.dll
|
||||
SHAREDLIBRARY = $(BUILD)/miniupnpc.dll
|
||||
else
|
||||
# Linux/BSD/etc.
|
||||
SHAREDLIBRARY = libminiupnpc.so
|
||||
SONAME = $(SHAREDLIBRARY).$(APIVERSION)
|
||||
SHAREDLIBRARY = $(BUILD)/libminiupnpc.so
|
||||
SONAME = $(notdir $(SHAREDLIBRARY)).$(APIVERSION)
|
||||
endif
|
||||
endif
|
||||
|
||||
EXECUTABLES = upnpc-static listdevices
|
||||
EXECUTABLES_ADDTESTS = testminixml minixmlvalid testupnpreplyparse \
|
||||
testigddescparse testminiwget testportlistingparse
|
||||
EXECUTABLES = $(addprefix $(BUILD)/, upnpc-static listdevices)
|
||||
EXECUTABLES_ADDTESTS = $(addprefix $(BUILD)/, testminixml minixmlvalid \
|
||||
testupnpreplyparse testigddescparse testminiwget testportlistingparse)
|
||||
|
||||
TESTMINIXMLOBJS = minixml.o igd_desc_parse.o testminixml.o
|
||||
TESTMINIXMLOBJS = $(addprefix $(BUILD)/, minixml.o igd_desc_parse.o testminixml.o)
|
||||
|
||||
TESTMINIWGETOBJS = miniwget.o testminiwget.o connecthostport.o receivedata.o
|
||||
TESTMINIWGETOBJS = $(addprefix $(BUILD)/, miniwget.o testminiwget.o connecthostport.o receivedata.o)
|
||||
|
||||
TESTUPNPREPLYPARSE = testupnpreplyparse.o minixml.o upnpreplyparse.o
|
||||
TESTUPNPREPLYPARSE = $(addprefix $(BUILD)/, testupnpreplyparse.o minixml.o upnpreplyparse.o)
|
||||
|
||||
TESTPORTLISTINGPARSE = testportlistingparse.o minixml.o portlistingparse.o
|
||||
TESTPORTLISTINGPARSE = $(addprefix $(BUILD)/, testportlistingparse.o minixml.o portlistingparse.o)
|
||||
|
||||
TESTADDR_IS_RESERVED = testaddr_is_reserved.o addr_is_reserved.o
|
||||
TESTADDR_IS_RESERVED = $(addprefix $(BUILD)/, testaddr_is_reserved.o addr_is_reserved.o)
|
||||
|
||||
TESTIGDDESCPARSE = testigddescparse.o igd_desc_parse.o minixml.o \
|
||||
TESTIGDDESCPARSE = $(addprefix $(BUILD)/, testigddescparse.o igd_desc_parse.o minixml.o \
|
||||
miniupnpc.o miniwget.o upnpcommands.o upnpreplyparse.o \
|
||||
minisoap.o connecthostport.o receivedata.o \
|
||||
portlistingparse.o addr_is_reserved.o
|
||||
portlistingparse.o addr_is_reserved.o)
|
||||
|
||||
ifeq (, $(findstring amiga, $(OS)))
|
||||
EXECUTABLES := $(EXECUTABLES) upnpc-shared
|
||||
TESTMINIWGETOBJS := $(TESTMINIWGETOBJS) minissdpc.o
|
||||
TESTIGDDESCPARSE := $(TESTIGDDESCPARSE) minissdpc.o
|
||||
ifeq (, $(findstring mingw, $(OS))$(findstring cygwin, $(OS))$(findstring msys, $(OS)))
|
||||
CFLAGS += -fPIC
|
||||
endif
|
||||
EXECUTABLES += $(BUILD)/upnpc-shared
|
||||
TESTMINIWGETOBJS += $(BUILD)/minissdpc.o
|
||||
TESTIGDDESCPARSE += $(BUILD)/minissdpc.o
|
||||
LIBOBJS += $(BUILD)/minissdpc.o
|
||||
endif
|
||||
|
||||
LIBDIR ?= lib
|
||||
@ -163,13 +162,12 @@ PKGCONFIGDIR = $(INSTALLDIRLIB)/pkgconfig
|
||||
|
||||
FILESTOINSTALL = $(LIBRARY) $(EXECUTABLES)
|
||||
ifeq (, $(findstring amiga, $(OS)))
|
||||
FILESTOINSTALL := $(FILESTOINSTALL) $(SHAREDLIBRARY) miniupnpc.pc
|
||||
FILESTOINSTALL += $(SHAREDLIBRARY) miniupnpc.pc
|
||||
endif
|
||||
|
||||
|
||||
.PHONY: install clean depend all check test everything \
|
||||
installpythonmodule updateversion
|
||||
# validateminixml validateminiwget
|
||||
|
||||
all: $(LIBRARY) $(EXECUTABLES)
|
||||
|
||||
@ -180,53 +178,53 @@ check: validateminixml validateminiwget validateupnpreplyparse \
|
||||
|
||||
everything: all $(EXECUTABLES_ADDTESTS)
|
||||
|
||||
pythonmodule: $(LIBRARY) miniupnpcmodule.c setup.py
|
||||
pythonmodule: $(LIBRARY) $(SRCDIR)/miniupnpcmodule.c setup.py
|
||||
MAKE=$(MAKE) python setup.py build
|
||||
touch $@
|
||||
|
||||
installpythonmodule: pythonmodule
|
||||
MAKE=$(MAKE) python setup.py install
|
||||
|
||||
pythonmodule3: $(LIBRARY) miniupnpcmodule.c setup.py
|
||||
pythonmodule3: $(LIBRARY) $(SRCDIR)/miniupnpcmodule.c setup.py
|
||||
MAKE=$(MAKE) python3 setup.py build
|
||||
touch $@
|
||||
|
||||
installpythonmodule3: pythonmodule3
|
||||
MAKE=$(MAKE) python3 setup.py install
|
||||
|
||||
validateminixml: minixmlvalid
|
||||
validateminixml: $(BUILD)/minixmlvalid
|
||||
@echo "minixml validation test"
|
||||
./minixmlvalid
|
||||
./$<
|
||||
touch $@
|
||||
|
||||
validateminiwget: testminiwget minihttptestserver testminiwget.sh
|
||||
validateminiwget: testminiwget.sh $(BUILD)/testminiwget $(BUILD)/minihttptestserver
|
||||
@echo "miniwget validation test"
|
||||
./testminiwget.sh
|
||||
./$<
|
||||
touch $@
|
||||
|
||||
validateupnpreplyparse: testupnpreplyparse testupnpreplyparse.sh
|
||||
validateupnpreplyparse: testupnpreplyparse.sh $(BUILD)/testupnpreplyparse
|
||||
@echo "upnpreplyparse validation test"
|
||||
./testupnpreplyparse.sh
|
||||
./$<
|
||||
touch $@
|
||||
|
||||
validateportlistingparse: testportlistingparse
|
||||
validateportlistingparse: $(BUILD)/testportlistingparse
|
||||
@echo "portlistingparse validation test"
|
||||
./testportlistingparse
|
||||
./$<
|
||||
touch $@
|
||||
|
||||
validateigddescparse: testigddescparse
|
||||
validateigddescparse: $(BUILD)/testigddescparse
|
||||
@echo "igd desc parse validation test"
|
||||
./testigddescparse testdesc/new_LiveBox_desc.xml testdesc/new_LiveBox_desc.values
|
||||
./testigddescparse testdesc/linksys_WAG200G_desc.xml testdesc/linksys_WAG200G_desc.values
|
||||
./$< testdesc/new_LiveBox_desc.xml testdesc/new_LiveBox_desc.values
|
||||
./$< testdesc/linksys_WAG200G_desc.xml testdesc/linksys_WAG200G_desc.values
|
||||
touch $@
|
||||
|
||||
validateaddr_is_reserved: testaddr_is_reserved
|
||||
validateaddr_is_reserved: $(BUILD)/testaddr_is_reserved
|
||||
@echo "addr_is_reserved() validation test"
|
||||
./testaddr_is_reserved
|
||||
./$<
|
||||
touch $@
|
||||
|
||||
clean:
|
||||
$(RM) $(LIBRARY) $(SHAREDLIBRARY) $(EXECUTABLES) $(OBJS) miniupnpcstrings.h
|
||||
$(RM) $(LIBRARY) $(SHAREDLIBRARY) $(EXECUTABLES) $(OBJS) $(BUILDINCLUDES)
|
||||
$(RM) $(EXECUTABLES_ADDTESTS)
|
||||
# clean python stuff
|
||||
$(RM) pythonmodule pythonmodule3
|
||||
@ -242,9 +240,9 @@ clean:
|
||||
distclean: clean
|
||||
$(RM) $(JNAERATOR) java/*.jar java/*.class out.errors.txt
|
||||
|
||||
updateversion: miniupnpc.h
|
||||
cp miniupnpc.h miniupnpc.h.bak
|
||||
sed 's/\(.*MINIUPNPC_API_VERSION\s\+\)[0-9]\+/\1$(APIVERSION)/' < miniupnpc.h.bak > miniupnpc.h
|
||||
updateversion: include/miniupnpc.h
|
||||
cp $< $<.bak
|
||||
sed 's/\(.*MINIUPNPC_API_VERSION\s\+\)[0-9]\+/\1$(APIVERSION)/' < $<.bak > $<
|
||||
|
||||
install: updateversion $(FILESTOINSTALL)
|
||||
$(INSTALL) -d $(DESTDIR)$(INSTALLDIRINC)
|
||||
@ -285,7 +283,8 @@ cleaninstall:
|
||||
$(RM) $(DESTDIR)$(INSTALLDIRLIB)/$(LIBRARY)
|
||||
$(RM) $(DESTDIR)$(INSTALLDIRLIB)/$(SHAREDLIBRARY)
|
||||
|
||||
miniupnpc.pc: VERSION
|
||||
$(BUILD)/miniupnpc.pc: VERSION
|
||||
@$(MKDIR) $(@D)
|
||||
$(RM) $@
|
||||
echo "prefix=$(INSTALLPREFIX)" >> $@
|
||||
echo "exec_prefix=\$${prefix}" >> $@
|
||||
@ -298,8 +297,7 @@ miniupnpc.pc: VERSION
|
||||
echo "Libs: -L\$${libdir} -lminiupnpc" >> $@
|
||||
echo "Cflags: -I\$${includedir}" >> $@
|
||||
|
||||
depend:
|
||||
makedepend -Y -- $(CFLAGS) $(CPPFLAGS) -- $(SRCS) 2>/dev/null
|
||||
depend: $(DEPS)
|
||||
|
||||
$(LIBRARY): $(LIBOBJS)
|
||||
ifneq (, $(findstring darwin, $(OS)))
|
||||
@ -316,30 +314,40 @@ else
|
||||
$(CC) -shared $(LDFLAGS) -Wl,-soname,$(SONAME) -o $@ $^
|
||||
endif
|
||||
|
||||
upnpc-static: upnpc.o $(LIBRARY)
|
||||
$(BUILD)/%.o: $(SRCDIR)/%.c $(BUILD)/%.d
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
$(DEPS): $(BUILDINCLUDES)
|
||||
|
||||
$(BUILD)/%.d: $(SRCDIR)/%.c
|
||||
@$(MKDIR) $(@D)
|
||||
$(CC) $(CPPFLAGS) $(DEPFLAGS) -MT $@ -o $@ $<
|
||||
|
||||
$(BUILD)/upnpc-static: $(BUILD)/upnpc.o $(LIBRARY)
|
||||
$(CC) $(LDFLAGS) -o $@ $^ $(LOADLIBES) $(LDLIBS)
|
||||
|
||||
upnpc-shared: upnpc.o $(SHAREDLIBRARY)
|
||||
$(BUILD)/upnpc-shared: $(BUILD)/upnpc.o $(SHAREDLIBRARY)
|
||||
$(CC) $(LDFLAGS) -o $@ $^ $(LOADLIBES) $(LDLIBS)
|
||||
|
||||
listdevices: listdevices.o $(LIBRARY)
|
||||
$(BUILD)/listdevices: $(BUILD)/listdevices.o $(LIBRARY)
|
||||
|
||||
testminixml: $(TESTMINIXMLOBJS)
|
||||
$(BUILD)/testminixml: $(TESTMINIXMLOBJS)
|
||||
|
||||
testminiwget: $(TESTMINIWGETOBJS)
|
||||
$(BUILD)/testminiwget: $(TESTMINIWGETOBJS)
|
||||
|
||||
minixmlvalid: minixml.o minixmlvalid.o
|
||||
$(BUILD)/minixmlvalid: $(addprefix $(BUILD)/, minixml.o minixmlvalid.o)
|
||||
|
||||
testupnpreplyparse: $(TESTUPNPREPLYPARSE)
|
||||
$(BUILD)/testupnpreplyparse: $(TESTUPNPREPLYPARSE)
|
||||
|
||||
testigddescparse: $(TESTIGDDESCPARSE)
|
||||
$(BUILD)/testigddescparse: $(TESTIGDDESCPARSE)
|
||||
|
||||
testportlistingparse: $(TESTPORTLISTINGPARSE)
|
||||
$(BUILD)/testportlistingparse: $(TESTPORTLISTINGPARSE)
|
||||
|
||||
testaddr_is_reserved: $(TESTADDR_IS_RESERVED)
|
||||
$(BUILD)/testaddr_is_reserved: $(TESTADDR_IS_RESERVED)
|
||||
|
||||
miniupnpcstrings.h: miniupnpcstrings.h.in updateminiupnpcstrings.sh VERSION
|
||||
$(SH) updateminiupnpcstrings.sh
|
||||
$(BUILD)/miniupnpcstrings.h: miniupnpcstrings.h.in updateminiupnpcstrings.sh VERSION
|
||||
@$(MKDIR) $(@D)
|
||||
$(SH) updateminiupnpcstrings.sh $@ $<
|
||||
|
||||
# ftp tool supplied with OpenBSD can download files from http.
|
||||
jnaerator-%.jar:
|
||||
@ -379,43 +387,9 @@ ideb:
|
||||
|
||||
minihttptestserver: minihttptestserver.o
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
print-%:
|
||||
@echo "$* = $($*)"
|
||||
|
||||
igd_desc_parse.o: igd_desc_parse.h
|
||||
miniupnpc.o: miniupnpc.h miniupnpc_declspec.h igd_desc_parse.h upnpdev.h
|
||||
miniupnpc.o: minissdpc.h miniwget.h minisoap.h minixml.h upnpcommands.h
|
||||
miniupnpc.o: upnpreplyparse.h portlistingparse.h miniupnpctypes.h
|
||||
miniupnpc.o: connecthostport.h
|
||||
minixml.o: minixml.h
|
||||
minisoap.o: minisoap.h miniupnpcstrings.h
|
||||
miniwget.o: miniupnpcstrings.h miniwget.h miniupnpc_declspec.h
|
||||
miniwget.o: connecthostport.h receivedata.h
|
||||
upnpc.o: miniwget.h miniupnpc_declspec.h miniupnpc.h igd_desc_parse.h
|
||||
upnpc.o: upnpdev.h upnpcommands.h upnpreplyparse.h portlistingparse.h
|
||||
upnpc.o: miniupnpctypes.h upnperrors.h miniupnpcstrings.h
|
||||
upnpcommands.o: upnpcommands.h upnpreplyparse.h portlistingparse.h
|
||||
upnpcommands.o: miniupnpc_declspec.h miniupnpctypes.h miniupnpc.h
|
||||
upnpcommands.o: igd_desc_parse.h upnpdev.h
|
||||
upnpreplyparse.o: upnpreplyparse.h minixml.h
|
||||
testminixml.o: minixml.h igd_desc_parse.h
|
||||
minixmlvalid.o: minixml.h
|
||||
testupnpreplyparse.o: upnpreplyparse.h
|
||||
minissdpc.o: minissdpc.h miniupnpc_declspec.h upnpdev.h miniupnpc.h
|
||||
minissdpc.o: igd_desc_parse.h receivedata.h codelength.h
|
||||
upnperrors.o: upnperrors.h miniupnpc_declspec.h upnpcommands.h
|
||||
upnperrors.o: upnpreplyparse.h portlistingparse.h miniupnpctypes.h
|
||||
upnperrors.o: miniupnpc.h igd_desc_parse.h upnpdev.h
|
||||
testigddescparse.o: igd_desc_parse.h minixml.h miniupnpc.h
|
||||
testigddescparse.o: miniupnpc_declspec.h upnpdev.h
|
||||
testminiwget.o: miniwget.h miniupnpc_declspec.h
|
||||
connecthostport.o: connecthostport.h
|
||||
portlistingparse.o: portlistingparse.h miniupnpc_declspec.h miniupnpctypes.h
|
||||
portlistingparse.o: minixml.h
|
||||
receivedata.o: receivedata.h
|
||||
upnpdev.o: upnpdev.h miniupnpc_declspec.h
|
||||
testportlistingparse.o: portlistingparse.h miniupnpc_declspec.h
|
||||
testportlistingparse.o: miniupnpctypes.h
|
||||
miniupnpcmodule.o: miniupnpc.h miniupnpc_declspec.h igd_desc_parse.h
|
||||
miniupnpcmodule.o: upnpdev.h upnpcommands.h upnpreplyparse.h
|
||||
miniupnpcmodule.o: portlistingparse.h miniupnpctypes.h upnperrors.h
|
||||
listdevices.o: miniupnpc.h miniupnpc_declspec.h igd_desc_parse.h upnpdev.h
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
-include $(DEPS)
|
||||
endif
|
||||
|
@ -7,6 +7,9 @@
|
||||
# To cross compile on a *nix machine :
|
||||
# make -f Makefile.mingw DLLWRAP=mingw32-dllwrap CC=mingw32-gcc AR=mingw32-ar
|
||||
#
|
||||
SRCDIR = src
|
||||
INCDIR = include
|
||||
|
||||
CC ?= gcc
|
||||
SETUP_COMPILER_FLAG?=
|
||||
DLLWRAP = dllwrap
|
||||
@ -18,8 +21,12 @@ RM = del
|
||||
else
|
||||
RM = rm -f
|
||||
endif
|
||||
#CFLAGS = -Wall -g -DDEBUG -D_WIN32_WINNT=0X501
|
||||
CFLAGS = -Wall -W -Wstrict-prototypes -Os -DNDEBUG -D_WIN32_WINNT=0X501
|
||||
#CFLAGS = -Wall -g
|
||||
#CPPFLAGS = -DDEBUG -D_WIN32_WINNT=0X501
|
||||
CFLAGS = -Wall -W -Wstrict-prototypes -Os
|
||||
CPPFLAGS = -DNDEBUG -D_WIN32_WINNT=0X501
|
||||
CPPFLAGS += -Iinclude
|
||||
CPPFLAGS += -I.
|
||||
LDLIBS = -lws2_32 -liphlpapi
|
||||
# -lwsock32
|
||||
# -liphlpapi is needed for GetBestRoute() and GetIpAddrTable()
|
||||
@ -74,14 +81,14 @@ miniupnpc.dll: miniupnpc.def $(OBJSDLL)
|
||||
|
||||
miniupnpc.lib: miniupnpc.dll
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -DMINIUPNP_STATICLIB -c -o $@ $<
|
||||
%.o: $(SRCDIR)/%.c
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -DMINIUPNP_STATICLIB -c -o $@ $<
|
||||
|
||||
dll-%.o: %.c
|
||||
$(CC) $(CFLAGS) -DMINIUPNP_EXPORTS -c -o $@ $<
|
||||
dll-%.o: $(SRCDIR)/%.c
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -DMINIUPNP_EXPORTS -c -o $@ $<
|
||||
|
||||
%-shared.o: %.c
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
%-shared.o: $(SRCDIR)/%.c
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
|
||||
|
||||
# --enable-stdcall-fixup
|
||||
%-static.exe: %.o libminiupnpc.a
|
||||
@ -95,7 +102,7 @@ dll-%.o: %.c
|
||||
# sed (if cross compiling from another platform).
|
||||
ifeq ($(OS),Windows_NT)
|
||||
wingenminiupnpcstrings.exe: wingenminiupnpcstrings.c
|
||||
$(CC) $(CFLAGS) -o $@ $^
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $^
|
||||
|
||||
miniupnpcstrings.h: miniupnpcstrings.h.in wingenminiupnpcstrings.exe VERSION
|
||||
.\wingenminiupnpcstrings.exe $< $@ rc_version.h
|
||||
@ -120,25 +127,26 @@ winres.o: miniupnpc.rc rc_version.h
|
||||
testminixml.exe: testminixml.o minixml.o igd_desc_parse.o
|
||||
$(CC) -static -o $@ $^
|
||||
|
||||
minixml.o: minixml.c minixml.h
|
||||
minixml.o: $(SRCDIR)/minixml.c $(SRCDIR)/minixml.h
|
||||
|
||||
upnpc.o: miniwget.h minisoap.h miniupnpc.h igd_desc_parse.h
|
||||
upnpc.o: upnpreplyparse.h upnpcommands.h upnperrors.h miniupnpcstrings.h
|
||||
upnpc.o: include/miniwget.h $(SRCDIR)/minisoap.h include/miniupnpc.h include/igd_desc_parse.h
|
||||
upnpc.o: include/upnpreplyparse.h include/upnpcommands.h include/upnperrors.h miniupnpcstrings.h
|
||||
|
||||
miniwget.o: miniwget.c miniwget.h miniupnpcstrings.h connecthostport.h
|
||||
miniwget.o: $(SRCDIR)/miniwget.c include/miniwget.h miniupnpcstrings.h $(SRCDIR)/connecthostport.h
|
||||
|
||||
minisoap.o: minisoap.c minisoap.h miniupnpcstrings.h
|
||||
minisoap.o: $(SRCDIR)/minisoap.c $(SRCDIR)/minisoap.h miniupnpcstrings.h
|
||||
|
||||
miniupnpc.o: miniupnpc.c miniupnpc.h minisoap.h miniwget.h minixml.h \
|
||||
addr_is_reserved.h
|
||||
miniupnpc.o: $(SRCDIR)/miniupnpc.c include/miniupnpc.h $(SRCDIR)/minisoap.h \
|
||||
include/miniwget.h $(SRCDIR)/minixml.h $(SRCDIR)/addr_is_reserved.h
|
||||
|
||||
igd_desc_parse.o: igd_desc_parse.c igd_desc_parse.h
|
||||
igd_desc_parse.o: $(SRCDIR)/igd_desc_parse.c include/igd_desc_parse.h
|
||||
|
||||
upnpreplyparse.o: upnpreplyparse.c upnpreplyparse.h minixml.h
|
||||
upnpreplyparse.o: $(SRCDIR)/upnpreplyparse.c include/upnpreplyparse.h $(SRCDIR)/minixml.h
|
||||
|
||||
upnpcommands.o: upnpcommands.c upnpcommands.h upnpreplyparse.h miniupnpc.h portlistingparse.h
|
||||
upnpcommands.o: $(SRCDIR)/upnpcommands.c include/upnpcommands.h include/upnpreplyparse.h \
|
||||
include/miniupnpc.h include/portlistingparse.h
|
||||
|
||||
minissdpc.o: minissdpc.c minissdpc.h receivedata.h
|
||||
minissdpc.o: $(SRCDIR)/minissdpc.c $(SRCDIR)/minissdpc.h $(SRCDIR)/receivedata.h
|
||||
|
||||
upnpdev.o: upnpdev.c upnpdev.h
|
||||
upnpdev.o: $(SRCDIR)/upnpdev.c include/upnpdev.h
|
||||
|
||||
|
@ -91,6 +91,7 @@
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<AdditionalIncludeDirectories>..;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<PreBuildEvent>
|
||||
<Command>genminiupnpcstrings.vbs</Command>
|
||||
@ -110,6 +111,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<AdditionalIncludeDirectories>..;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<PreBuildEvent>
|
||||
<Command>genminiupnpcstrings.vbs</Command>
|
||||
@ -131,6 +133,7 @@
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<AdditionalIncludeDirectories>..;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<PreBuildEvent>
|
||||
<Command>genminiupnpcstrings.vbs</Command>
|
||||
@ -150,6 +153,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<AdditionalIncludeDirectories>..;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<PreBuildEvent>
|
||||
<Command>genminiupnpcstrings.vbs</Command>
|
||||
@ -162,40 +166,41 @@
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\addr_is_reserved.c" />
|
||||
<ClCompile Include="..\connecthostport.c" />
|
||||
<ClCompile Include="..\igd_desc_parse.c" />
|
||||
<ClCompile Include="..\minisoap.c" />
|
||||
<ClCompile Include="..\minissdpc.c" />
|
||||
<ClCompile Include="..\miniupnpc.c" />
|
||||
<ClCompile Include="..\miniwget.c" />
|
||||
<ClCompile Include="..\minixml.c" />
|
||||
<ClCompile Include="..\portlistingparse.c" />
|
||||
<ClCompile Include="..\receivedata.c" />
|
||||
<ClCompile Include="..\upnpcommands.c" />
|
||||
<ClCompile Include="..\upnpdev.c" />
|
||||
<ClCompile Include="..\upnperrors.c" />
|
||||
<ClCompile Include="..\upnpreplyparse.c" />
|
||||
<ClCompile Include="..\src\addr_is_reserved.c" />
|
||||
<ClCompile Include="..\src\connecthostport.c" />
|
||||
<ClCompile Include="..\src\igd_desc_parse.c" />
|
||||
<ClCompile Include="..\src\minisoap.c" />
|
||||
<ClCompile Include="..\src\minissdpc.c" />
|
||||
<ClCompile Include="..\src\miniupnpc.c" />
|
||||
<ClCompile Include="..\src\miniwget.c" />
|
||||
<ClCompile Include="..\src\minixml.c" />
|
||||
<ClCompile Include="..\src\portlistingparse.c" />
|
||||
<ClCompile Include="..\src\receivedata.c" />
|
||||
<ClCompile Include="..\src\upnpcommands.c" />
|
||||
<ClCompile Include="..\src\upnpdev.c" />
|
||||
<ClCompile Include="..\src\upnperrors.c" />
|
||||
<ClCompile Include="..\src\upnpreplyparse.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\addr_is_reserved.h" />
|
||||
<ClInclude Include="..\connecthostport.h" />
|
||||
<ClInclude Include="..\igd_desc_parse.h" />
|
||||
<ClInclude Include="..\minisoap.h" />
|
||||
<ClInclude Include="..\minissdpc.h" />
|
||||
<ClInclude Include="..\miniupnpc.h" />
|
||||
<ClInclude Include="..\src\addr_is_reserved.h" />
|
||||
<ClInclude Include="..\src\connecthostport.h" />
|
||||
<ClInclude Include="..\include\igd_desc_parse.h" />
|
||||
<ClInclude Include="..\src\minisoap.h" />
|
||||
<ClInclude Include="..\src\minissdpc.h" />
|
||||
<ClInclude Include="..\include\miniupnpc.h" />
|
||||
<ClInclude Include="..\miniupnpcstrings.h" />
|
||||
<ClInclude Include="..\miniupnpctypes.h" />
|
||||
<ClInclude Include="..\miniupnpc_declspec.h" />
|
||||
<ClInclude Include="..\miniwget.h" />
|
||||
<ClInclude Include="..\minixml.h" />
|
||||
<ClInclude Include="..\portlistingparse.h" />
|
||||
<ClInclude Include="..\receivedata.h" />
|
||||
<ClInclude Include="..\upnpcommands.h" />
|
||||
<ClInclude Include="..\upnpdev.h" />
|
||||
<ClInclude Include="..\upnperrors.h" />
|
||||
<ClInclude Include="..\upnpreplyparse.h" />
|
||||
<ClInclude Include="..\win32_snprintf.h" />
|
||||
<ClInclude Include="..\include\miniupnpctypes.h" />
|
||||
<ClInclude Include="..\include\miniupnpc_declspec.h" />
|
||||
<ClInclude Include="..\include\miniwget.h" />
|
||||
<ClInclude Include="..\src\miniwget_private.h" />
|
||||
<ClInclude Include="..\src\minixml.h" />
|
||||
<ClInclude Include="..\include\portlistingparse.h" />
|
||||
<ClInclude Include="..\src\receivedata.h" />
|
||||
<ClInclude Include="..\include\upnpcommands.h" />
|
||||
<ClInclude Include="..\include\upnpdev.h" />
|
||||
<ClInclude Include="..\include\upnperrors.h" />
|
||||
<ClInclude Include="..\include\upnpreplyparse.h" />
|
||||
<ClInclude Include="..\src\win32_snprintf.h" />
|
||||
<ClInclude Include="..\rc_version.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@ -207,4 +212,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
@ -18,107 +18,107 @@
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\connecthostport.c">
|
||||
<ClCompile Include="..\src\addr_is_reserved.c">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\igd_desc_parse.c">
|
||||
<ClCompile Include="..\src\connecthostport.c">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\minisoap.c">
|
||||
<ClCompile Include="..\src\igd_desc_parse.c">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\minissdpc.c">
|
||||
<ClCompile Include="..\src\minisoap.c">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\miniupnpc.c">
|
||||
<ClCompile Include="..\src\minissdpc.c">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\miniwget.c">
|
||||
<ClCompile Include="..\src\miniupnpc.c">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\minixml.c">
|
||||
<ClCompile Include="..\src\miniwget.c">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\portlistingparse.c">
|
||||
<ClCompile Include="..\src\minixml.c">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\receivedata.c">
|
||||
<ClCompile Include="..\src\portlistingparse.c">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\upnpcommands.c">
|
||||
<ClCompile Include="..\src\receivedata.c">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\upnpdev.c">
|
||||
<ClCompile Include="..\src\upnpcommands.c">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\upnperrors.c">
|
||||
<ClCompile Include="..\src\upnpdev.c">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\upnpreplyparse.c">
|
||||
<ClCompile Include="..\src\upnperrors.c">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\addr_is_reserved.c">
|
||||
<ClCompile Include="..\src\upnpreplyparse.c">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\connecthostport.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\igd_desc_parse.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\minisoap.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\minissdpc.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\miniupnpc.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\miniupnpcstrings.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\miniupnpctypes.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\miniwget.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\minixml.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\portlistingparse.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\receivedata.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\upnpcommands.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\upnpdev.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\upnperrors.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\upnpreplyparse.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\miniupnpc_declspec.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\addr_is_reserved.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\win32_snprintf.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\rc_version.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\addr_is_reserved.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\connecthostport.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\igd_desc_parse.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\minisoap.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\minissdpc.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\miniupnpc.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\miniupnpcstrings.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\miniupnpctypes.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\miniupnpc_declspec.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\miniwget.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\minixml.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\portlistingparse.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\receivedata.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\upnpcommands.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\upnpdev.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\upnperrors.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\upnpreplyparse.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\win32_snprintf.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="genminiupnpcstrings.vbs">
|
||||
|
@ -84,6 +84,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<AdditionalIncludeDirectories>..;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<PreBuildEvent>
|
||||
<Command>genminiupnpcstrings.vbs</Command>
|
||||
@ -103,6 +104,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<AdditionalIncludeDirectories>..;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<PreBuildEvent>
|
||||
<Command>genminiupnpcstrings.vbs</Command>
|
||||
@ -125,6 +127,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<AdditionalIncludeDirectories>..;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<PreBuildEvent>
|
||||
<Command>genminiupnpcstrings.vbs</Command>
|
||||
@ -144,6 +147,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<AdditionalIncludeDirectories>..;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<PreBuildEvent>
|
||||
<Command>genminiupnpcstrings.vbs</Command>
|
||||
@ -156,43 +160,42 @@
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\addr_is_reserved.c" />
|
||||
<ClCompile Include="..\connecthostport.c" />
|
||||
<ClCompile Include="..\igd_desc_parse.c" />
|
||||
<ClCompile Include="..\minisoap.c" />
|
||||
<ClCompile Include="..\minissdpc.c" />
|
||||
<ClCompile Include="..\miniupnpc.c" />
|
||||
<ClCompile Include="..\miniwget.c" />
|
||||
<ClCompile Include="..\minixml.c" />
|
||||
<ClCompile Include="..\portlistingparse.c" />
|
||||
<ClCompile Include="..\receivedata.c" />
|
||||
<ClCompile Include="..\upnpcommands.c" />
|
||||
<ClCompile Include="..\upnpdev.c" />
|
||||
<ClCompile Include="..\upnperrors.c" />
|
||||
<ClCompile Include="..\upnpreplyparse.c" />
|
||||
<ClCompile Include="..\src\addr_is_reserved.c" />
|
||||
<ClCompile Include="..\src\connecthostport.c" />
|
||||
<ClCompile Include="..\src\igd_desc_parse.c" />
|
||||
<ClCompile Include="..\src\minisoap.c" />
|
||||
<ClCompile Include="..\src\minissdpc.c" />
|
||||
<ClCompile Include="..\src\miniupnpc.c" />
|
||||
<ClCompile Include="..\src\miniwget.c" />
|
||||
<ClCompile Include="..\src\minixml.c" />
|
||||
<ClCompile Include="..\src\portlistingparse.c" />
|
||||
<ClCompile Include="..\src\receivedata.c" />
|
||||
<ClCompile Include="..\src\upnpcommands.c" />
|
||||
<ClCompile Include="..\src\upnpdev.c" />
|
||||
<ClCompile Include="..\src\upnperrors.c" />
|
||||
<ClCompile Include="..\src\upnpreplyparse.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\addr_is_reserved.h" />
|
||||
<ClInclude Include="..\connecthostport.h" />
|
||||
<ClInclude Include="..\igd_desc_parse.h" />
|
||||
<ClInclude Include="..\minisoap.h" />
|
||||
<ClInclude Include="..\minissdpc.h" />
|
||||
<ClInclude Include="..\miniupnpc.h" />
|
||||
<ClInclude Include="..\src\addr_is_reserved.h" />
|
||||
<ClInclude Include="..\src\connecthostport.h" />
|
||||
<ClInclude Include="..\include\igd_desc_parse.h" />
|
||||
<ClInclude Include="..\src\minisoap.h" />
|
||||
<ClInclude Include="..\src\minissdpc.h" />
|
||||
<ClInclude Include="..\include\miniupnpc.h" />
|
||||
<ClInclude Include="..\miniupnpcstrings.h" />
|
||||
<ClInclude Include="..\miniupnpctypes.h" />
|
||||
<ClInclude Include="..\miniupnpc_declspec.h" />
|
||||
<ClInclude Include="..\miniupnpc_socketdef.h" />
|
||||
<ClInclude Include="..\miniwget.h" />
|
||||
<ClInclude Include="..\miniwget_private.h" />
|
||||
<ClInclude Include="..\minixml.h" />
|
||||
<ClInclude Include="..\portlistingparse.h" />
|
||||
<ClInclude Include="..\receivedata.h" />
|
||||
<ClInclude Include="..\upnpcommands.h" />
|
||||
<ClInclude Include="..\upnpdev.h" />
|
||||
<ClInclude Include="..\upnperrors.h" />
|
||||
<ClInclude Include="..\upnpreplyparse.h" />
|
||||
<ClInclude Include="..\win32_snprintf.h" />
|
||||
<ClInclude Include="..\rc_version.h" />
|
||||
<ClInclude Include="..\include\miniupnpctypes.h" />
|
||||
<ClInclude Include="..\include\miniupnpc_declspec.h" />
|
||||
<ClInclude Include="..\include\miniwget.h" />
|
||||
<ClInclude Include="..\src\miniwget_private.h" />
|
||||
<ClInclude Include="..\src\minixml.h" />
|
||||
<ClInclude Include="..\include\portlistingparse.h" />
|
||||
<ClInclude Include="..\src\receivedata.h" />
|
||||
<ClInclude Include="..\include\upnpcommands.h" />
|
||||
<ClInclude Include="..\include\upnpdev.h" />
|
||||
<ClInclude Include="..\include\upnperrors.h" />
|
||||
<ClInclude Include="..\include\upnpreplyparse.h" />
|
||||
<ClInclude Include="..\src\win32_snprintf.h" />
|
||||
<ClInclude Include="..\rc_version.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="genminiupnpcstrings.vbs" />
|
||||
@ -203,4 +206,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
@ -95,6 +95,7 @@
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<AdditionalIncludeDirectories>..;..\include</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>ws2_32.lib;$(Configuration)\miniupnpc.lib;IPHlpApi.Lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@ -114,6 +115,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<AdditionalIncludeDirectories>..;..\include</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>ws2_32.lib;$(Configuration)\miniupnpc.lib;$(AdditionalDependencies)</AdditionalDependencies>
|
||||
@ -132,6 +134,7 @@
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<AdditionalIncludeDirectories>..;..\include</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>ws2_32.lib;$(Configuration)\miniupnpc.lib;IPHlpApi.Lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@ -153,6 +156,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<AdditionalIncludeDirectories>..;..\include</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>ws2_32.lib;$(Configuration)\miniupnpc.lib;IPHlpApi.Lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@ -164,7 +168,7 @@
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\upnpc.c" />
|
||||
<ClCompile Include="..\src\upnpc.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="miniupnpc.vcxproj">
|
||||
|
@ -15,7 +15,7 @@
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\upnpc.c">
|
||||
<ClCompile Include="..\src\upnpc.c">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
|
@ -88,6 +88,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<AdditionalIncludeDirectories>..;..\include</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>ws2_32.lib;IPHlpApi.Lib;$(Configuration)\miniupnpc.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@ -107,6 +108,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<AdditionalIncludeDirectories>..;..\include</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>ws2_32.lib;$(Configuration)\miniupnpc.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@ -126,6 +128,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<AdditionalIncludeDirectories>..;..\include</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>ws2_32.lib;IPHlpApi.Lib;$(Configuration)\miniupnpc.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@ -147,6 +150,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<AdditionalIncludeDirectories>..;..\include</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>ws2_32.lib;$(Configuration)\miniupnpc.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
@ -158,7 +162,7 @@
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\upnpc.c" />
|
||||
<ClCompile Include="..\src\upnpc.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="miniupnpc_vs2010.vcxproj">
|
||||
|
@ -1,7 +1,7 @@
|
||||
#! /usr/bin/env python
|
||||
# vim: tabstop=8 shiftwidth=8 expandtab
|
||||
# $Id: setup.py,v 1.14 2020/04/06 10:23:02 nanard Exp $
|
||||
# the MiniUPnP Project (c) 2007-2020 Thomas Bernard
|
||||
# the MiniUPnP Project (c) 2007-2021 Thomas Bernard
|
||||
# https://miniupnp.tuxfamily.org/ or http://miniupnp.free.fr/
|
||||
#
|
||||
# python script to build the miniupnpc module under unix
|
||||
@ -13,7 +13,7 @@ from setuptools.command import build_ext
|
||||
import subprocess
|
||||
import os
|
||||
|
||||
EXT = ['libminiupnpc.a']
|
||||
EXT = ['build/libminiupnpc.a']
|
||||
|
||||
class make_then_build_ext(build_ext.build_ext):
|
||||
def run(self):
|
||||
@ -29,7 +29,7 @@ setup(name="miniupnpc",
|
||||
description='miniUPnP client',
|
||||
cmdclass={'build_ext': make_then_build_ext},
|
||||
ext_modules=[
|
||||
Extension(name="miniupnpc", sources=["miniupnpcmodule.c"],
|
||||
extra_objects=EXT)
|
||||
Extension(name="miniupnpc", sources=["src/miniupnpcmodule.c"],
|
||||
include_dirs=['include'], extra_objects=EXT)
|
||||
])
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#! /usr/bin/env python
|
||||
# vim: tabstop=8 shiftwidth=8 expandtab
|
||||
# $Id: setupmingw32.py,v 1.12 2020/04/06 10:23:02 nanard Exp $
|
||||
# the MiniUPnP Project (c) 2007-2020 Thomas Bernard
|
||||
# the MiniUPnP Project (c) 2007-2021 Thomas Bernard
|
||||
# https://miniupnp.tuxfamily.org/ or http://miniupnp.free.fr/
|
||||
#
|
||||
# python script to build the miniupnpc module under windows (using mingw32)
|
||||
@ -28,8 +28,8 @@ setup(name="miniupnpc",
|
||||
url='http://miniupnp.free.fr/',
|
||||
description='miniUPnP client',
|
||||
ext_modules=[
|
||||
Extension(name="miniupnpc", sources=["miniupnpcmodule.c"],
|
||||
Extension(name="miniupnpc", sources=["src/miniupnpcmodule.c"],
|
||||
libraries=["ws2_32", "iphlpapi"] + compat_lib,
|
||||
extra_objects=["miniupnpc.lib"])
|
||||
include_dirs=['include'], extra_objects=["miniupnpc.lib"])
|
||||
])
|
||||
|
||||
|
@ -17,6 +17,8 @@
|
||||
# it should now also run with dash
|
||||
|
||||
TMPD=`mktemp -d -t miniwgetXXXXXXXXXX`
|
||||
TESTSERVER=./build/minihttptestserver
|
||||
TESTMINIWGET=./build/testminiwget
|
||||
HTTPSERVEROUT="${TMPD}/httpserverout"
|
||||
EXPECTEDFILE="${TMPD}/expectedfile"
|
||||
DOWNLOADEDFILE="${TMPD}/downloadedfile"
|
||||
@ -50,11 +52,15 @@ case "$HAVE_IPV6" in
|
||||
|
||||
esac
|
||||
|
||||
#make minihttptestserver
|
||||
#make testminiwget
|
||||
if [ ! -x "$TESTSERVER" ] || [ ! -x "$TESTMINIWGET" ] ; then
|
||||
echo "Please build $TESTSERVER and $TESTMINIWGET"
|
||||
#make minihttptestserver
|
||||
#make testminiwget
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# launching the test HTTP server
|
||||
./minihttptestserver $SERVERARGS -e $EXPECTEDFILE > $HTTPSERVEROUT &
|
||||
$TESTSERVER $SERVERARGS -e $EXPECTEDFILE > $HTTPSERVEROUT &
|
||||
SERVERPID=$!
|
||||
while [ -z "$PORT" ]; do
|
||||
sleep 1
|
||||
@ -74,7 +80,7 @@ URL3="http://$ADDR:$PORT/addcrap"
|
||||
URL4="http://$ADDR:$PORT/malformed"
|
||||
|
||||
echo "standard test ..."
|
||||
./testminiwget $URL1 "${DOWNLOADEDFILE}.1"
|
||||
$TESTMINIWGET $URL1 "${DOWNLOADEDFILE}.1"
|
||||
if cmp $EXPECTEDFILE "${DOWNLOADEDFILE}.1" ; then
|
||||
echo "ok"
|
||||
else
|
||||
@ -83,7 +89,7 @@ else
|
||||
fi
|
||||
|
||||
echo "chunked transfert encoding test ..."
|
||||
./testminiwget $URL2 "${DOWNLOADEDFILE}.2"
|
||||
$TESTMINIWGET $URL2 "${DOWNLOADEDFILE}.2"
|
||||
if cmp $EXPECTEDFILE "${DOWNLOADEDFILE}.2" ; then
|
||||
echo "ok"
|
||||
else
|
||||
@ -92,7 +98,7 @@ else
|
||||
fi
|
||||
|
||||
echo "response too long test ..."
|
||||
./testminiwget $URL3 "${DOWNLOADEDFILE}.3"
|
||||
$TESTMINIWGET $URL3 "${DOWNLOADEDFILE}.3"
|
||||
if cmp $EXPECTEDFILE "${DOWNLOADEDFILE}.3" ; then
|
||||
echo "ok"
|
||||
else
|
||||
@ -101,7 +107,7 @@ else
|
||||
fi
|
||||
|
||||
echo "malformed response test ..."
|
||||
./testminiwget $URL4 "${DOWNLOADEDFILE}.4"
|
||||
$TESTMINIWGET $URL4 "${DOWNLOADEDFILE}.4"
|
||||
|
||||
# kill the test HTTP server
|
||||
kill $SERVERPID
|
||||
|
@ -1,8 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
TESTUPNPREPLYPARSE=./build/testupnpreplyparse
|
||||
|
||||
for f in testreplyparse/*.xml ; do
|
||||
bf="`dirname $f`/`basename $f .xml`"
|
||||
if ./testupnpreplyparse $f $bf.namevalue ; then
|
||||
if $TESTUPNPREPLYPARSE $f $bf.namevalue ; then
|
||||
echo "$f : passed"
|
||||
else
|
||||
echo "$f : FAILED"
|
||||
|
@ -1,12 +1,23 @@
|
||||
#! /bin/sh
|
||||
# $Id: updateminiupnpcstrings.sh,v 1.7 2011/01/04 11:41:53 nanard Exp $
|
||||
# project miniupnp : http://miniupnp.free.fr/
|
||||
# (c) 2009 Thomas Bernard
|
||||
# (c) 2009-2021 Thomas Bernard
|
||||
|
||||
FILE=miniupnpcstrings.h
|
||||
TMPFILE=miniupnpcstrings.h.tmp
|
||||
TEMPLATE_FILE=${FILE}.in
|
||||
|
||||
if [ -n "$1" ] ; then
|
||||
FILE="$1"
|
||||
fi
|
||||
if [ -n "$2" ] ; then
|
||||
TEMPLATE_FILE="$2"
|
||||
fi
|
||||
TMPFILE=`mktemp -t miniupnpcstringsXXXXXX`
|
||||
if [ ! -f "$TMPFILE" ] ; then
|
||||
echo "mktemp failure"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# detecting the OS name and version
|
||||
OS_NAME=`uname -s`
|
||||
OS_VERSION=`uname -r`
|
||||
@ -49,5 +60,5 @@ sed -e "$EXPR" < $TEMPLATE_FILE > $TMPFILE
|
||||
EXPR="s|MINIUPNPC_VERSION_STRING \".*\"|MINIUPNPC_VERSION_STRING \"${MINIUPNPC_VERSION}\"|"
|
||||
echo "setting MINIUPNPC_VERSION_STRING macro value to ${MINIUPNPC_VERSION} in $FILE."
|
||||
sed -e "$EXPR" < $TMPFILE > $FILE
|
||||
rm $TMPFILE
|
||||
rm -v $TMPFILE
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user