diff --git a/miniupnpc/CMakeLists.txt b/miniupnpc/CMakeLists.txt index b3d63b4..b06ee90 100644 --- a/miniupnpc/CMakeLists.txt +++ b/miniupnpc/CMakeLists.txt @@ -144,6 +144,14 @@ if (UPNPC_BUILD_STATIC) RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) endif() endif () + + add_executable (upnp-listdevices-static src/listdevices.c) + target_link_libraries (upnp-listdevices-static PRIVATE libminiupnpc-static) + target_include_directories(upnp-listdevices-static PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) + if (NOT UPNPC_NO_INSTALL) + install (TARGETS upnp-listdevices-static + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + endif() endif () if (UPNPC_BUILD_SHARED) @@ -186,11 +194,11 @@ if (UPNPC_BUILD_SHARED) endif() endif () - add_executable (listdevices src/listdevices.c) - target_link_libraries (listdevices PRIVATE libminiupnpc-shared) - target_include_directories(listdevices PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) + add_executable (upnp-listdevices-shared src/listdevices.c) + target_link_libraries (upnp-listdevices-shared PRIVATE libminiupnpc-shared) + target_include_directories(upnp-listdevices-shared PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) if (NOT UPNPC_NO_INSTALL) - install (TARGETS listdevices + install (TARGETS upnp-listdevices-shared RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) endif() endif () diff --git a/miniupnpc/Changelog.txt b/miniupnpc/Changelog.txt index 8d2808e..831b40c 100644 --- a/miniupnpc/Changelog.txt +++ b/miniupnpc/Changelog.txt @@ -3,6 +3,7 @@ miniUPnP client Changelog. 2023/06/15: Make User-Agent compliant. + listdevices => upnp-listdevices VERSION 2.2.5 : released 2023/06/12 diff --git a/miniupnpc/Makefile b/miniupnpc/Makefile index 0ba6a3e..a2dbb74 100644 --- a/miniupnpc/Makefile +++ b/miniupnpc/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.145 2021/09/28 20:42:25 nanard Exp $ +# $Id: Makefile,v 1.149 2023/06/15 22:42:37 nanard Exp $ # MiniUPnP Project # http://miniupnp.free.fr/ # https://miniupnp.tuxfamily.org/ @@ -118,7 +118,7 @@ else endif endif -EXECUTABLES = $(addprefix $(BUILD)/, upnpc-static listdevices) +EXECUTABLES = $(addprefix $(BUILD)/, upnpc-static upnp-listdevices-static) EXECUTABLES_ADDTESTS = $(addprefix $(BUILD)/, testminixml minixmlvalid \ testupnpreplyparse testigddescparse testminiwget testportlistingparse) @@ -141,7 +141,7 @@ ifeq (, $(findstring amiga, $(OS))) ifeq (, $(findstring mingw, $(OS))$(findstring cygwin, $(OS))$(findstring msys, $(OS))) CFLAGS += -fPIC endif -EXECUTABLES += $(BUILD)/upnpc-shared +EXECUTABLES += $(BUILD)/upnpc-shared $(BUILD)/upnp-listdevices-shared TESTMINIWGETOBJS += $(BUILD)/minissdpc.o TESTIGDDESCPARSE += $(BUILD)/minissdpc.o LIBOBJS += $(BUILD)/minissdpc.o @@ -258,8 +258,10 @@ endif $(INSTALL) -d $(DESTDIR)$(INSTALLDIRBIN) ifneq (, $(findstring amiga, $(OS))) $(INSTALL) -m 755 $(BUILD)/upnpc-static $(DESTDIR)$(INSTALLDIRBIN)/upnpc + $(INSTALL) -m 755 $(BUILD)/upnp-listdevices-static $(DESTDIR)$(INSTALLDIRBIN)/upnp-listdevices else $(INSTALL) -m 755 $(BUILD)/upnpc-shared $(DESTDIR)$(INSTALLDIRBIN)/upnpc + $(INSTALL) -m 755 $(BUILD)/upnp-listdevices-shared $(DESTDIR)$(INSTALLDIRBIN)/upnp-listdevices endif $(INSTALL) -m 755 external-ip.sh $(DESTDIR)$(INSTALLDIRBIN)/external-ip ifeq (, $(findstring amiga, $(OS))) @@ -330,7 +332,11 @@ $(BUILD)/upnpc-static: $(BUILD)/upnpc.o $(LIBRARY) $(BUILD)/upnpc-shared: $(BUILD)/upnpc.o $(SHAREDLIBRARY) $(CC) $(LDFLAGS) -o $@ $^ $(LOADLIBES) $(LDLIBS) -$(BUILD)/listdevices: $(BUILD)/listdevices.o $(LIBRARY) +$(BUILD)/upnp-listdevices-static: $(BUILD)/listdevices.o $(LIBRARY) + $(CC) $(LDFLAGS) -o $@ $^ $(LOADLIBES) $(LDLIBS) + +$(BUILD)/upnp-listdevices-shared: $(BUILD)/listdevices.o $(SHAREDLIBRARY) + $(CC) $(LDFLAGS) -o $@ $^ $(LOADLIBES) $(LDLIBS) $(BUILD)/testminixml: $(TESTMINIXMLOBJS)