On Sun, 2008-08-03 at 21:37 -0400, Dan Streetman wrote:
> Please don't email me privately - use the mailing list.
> 
> You have confused me with Mike.  He is working on the windows (libusb)
> implementation.
I have changed the way the original developer compiled his code.  I
haven't committed the changes yet, but here is what I did to get it to
compile.

installed cygwin on a windows machine
I installed libusb-win32.dll as per that projects instructions
used cygwin-setup to install swig and gcc
I modified the Makefile to use those tools (see attached).
>From that, I was able to generate a .dll and the JNI.java type files to
access libusb-win32.
Made other changes to the *.java files to make it all work (trying to
get it committed soon).

Hope this helps.

> 
> On Sat, Aug 2, 2008 at 11:39 AM, Javier Fileiv <[EMAIL PROTECTED]> wrote:
> > Dan, can you make a tutorial, where you explain what you did to compile
> > javax on windows, please?
> >
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> javax-usb-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/javax-usb-devel
# Copyright (c) 2005 m-creations gmbh http://www.m-creations.com
#
# - JAVA_HOME should point to your jdk
# - location of SWIG should be corrected

SWIG          = /cygdrive/c/usr/bin/swigwin-1.3.36/swig.exe

JAVA_HOME     = /cygdrive/c/Program\ Files/Java/jdk1.6.0_07

IFILE         = Libusb
INTERFACE     = $(IFILE).i
WRAPFILE      = $(IFILE)_wrap

CC            = gcc

SWIG_DEST     = ../src/net/sf/libusb

LIBUSB_PATH   = ../../libusb-win32-device-bin-0.1.12.1
INCLUDE       = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/win32 -I$(LIBUSB_PATH)/include
JNI_DLL       = LibusbJNI.dll
java::
	$(SWIG) -package net.sf.libusb -I${INCLUDE} -v -Wall -java -o $(WRAPFILE).c $(INTERFACE)
	$(CC) -c -mno-cygwin -shared $(INCLUDE) $(WRAPFILE).c -o $(WRAPFILE).o
	$(CC) -shared $(WRAPFILE).o -o $(JNI_DLL) -L$(LIBUSB_PATH)/lib/gcc -lusb -Wl,--kill-at -mno-cygwin
	
	chmod 666 $(WRAPFILE).c
	chmod 777 $(JNI_DLL)
	mv $(JNI_DLL) ../lib/
	# the reset just makes an moves java files around
	chmod 666 *.java
	rm -f $(SWIG_DEST)/*.java
	mv *.java $(SWIG_DEST)/

clean :
	rm -f $(IFILE)_wrap.*
	rm -f LibusbJNI.*
	rm -f SWIGTYPE_*
	rm -f *.java
	rm -f *.class
	rm -f $(JNI_DLL)
	rm -f *~
	rm -f ../lib/$(JNI_DLL)


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
javax-usb-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel

Reply via email to