Make miniupnpc jar file build on win32

This commit is contained in:
Leah X Schmidt 2012-12-21 12:13:04 -05:00 committed by Thomas Bernard
parent 3b5eacb3ae
commit b74bb40780
3 changed files with 17 additions and 0 deletions

View File

@ -3,6 +3,7 @@ build/
*.o *.o
*.a *.a
*.so *.so
*.dll
*.dylib *.dylib
Makefile.bak Makefile.bak
miniupnpcstrings.h miniupnpcstrings.h

View File

@ -19,6 +19,9 @@ endif
ifeq ($(OS), Linux) ifeq ($(OS), Linux)
JARSUFFIX=linux JARSUFFIX=linux
endif endif
ifneq (,$(findstring NT-5.1,$(OS)))
JARSUFFIX=win32
endif
HAVE_IPV6 ?= yes HAVE_IPV6 ?= yes
export HAVE_IPV6 export HAVE_IPV6
@ -77,9 +80,14 @@ ifeq ($(OS), Darwin)
SONAME = $(basename $(SHAREDLIBRARY)).$(APIVERSION).dylib SONAME = $(basename $(SHAREDLIBRARY)).$(APIVERSION).dylib
CFLAGS := -DMACOSX -D_DARWIN_C_SOURCE $(CFLAGS) CFLAGS := -DMACOSX -D_DARWIN_C_SOURCE $(CFLAGS)
else else
ifeq ($(OS), Linux)
SHAREDLIBRARY = libminiupnpc.so SHAREDLIBRARY = libminiupnpc.so
SONAME = $(SHAREDLIBRARY).$(APIVERSION) SONAME = $(SHAREDLIBRARY).$(APIVERSION)
endif endif
ifeq ($(JARSUFFIX), win32)
SHAREDLIBRARY = miniupnpc.dll
endif
endif
EXECUTABLES = upnpc-static EXECUTABLES = upnpc-static
EXECUTABLES_ADDTESTS = testminixml minixmlvalid testupnpreplyparse \ EXECUTABLES_ADDTESTS = testminixml minixmlvalid testupnpreplyparse \

8
miniupnpc/java/testjava.bat Executable file
View File

@ -0,0 +1,8 @@
@echo off
set JAVA=java
set JAVAC=javac
REM notice the semicolon for Windows. Write once, run ... oh nevermind
set CP=miniupnpc_win32.jar;.
%JAVAC% -cp "%CP%" JavaBridgeTest.java || exit 1
%JAVA% -cp "%CP%" JavaBridgeTest 12345 UDP || exit 1