|
From: Mike C. <mc...@us...> - 2008-08-05 20:07:46
|
Update of /cvsroot/javax-usb/javax-usb-libusb/swig In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv2966/swig Modified Files: makefile Log Message: changes that make it easier to switch from windows to linux implementations of libusb Index: makefile =================================================================== RCS file: /cvsroot/javax-usb/javax-usb-libusb/swig/makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** makefile 5 Aug 2008 15:23:56 -0000 1.2 --- makefile 5 Aug 2008 20:07:32 -0000 1.3 *************** *** 1,28 **** # 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/ --- 1,40 ---- + # Copyright (c) 2008 Gulf Coast Data Concepts http://www.gcdataconcepts.com # Copyright (c) 2005 m-creations gmbh http://www.m-creations.com # + ifdef CYGWIN SWIG = /cygdrive/c/usr/bin/swigwin-1.3.36/swig.exe JAVA_HOME = /cygdrive/c/Program\ Files/Java/jdk1.6.0_07 + LIBUSB_PATH = ../../libusb-win32-device-bin-0.1.12.1 + C_OPTIONS = -mno-cygwin + JNI_DLL = LibusbJNI.dll + INCLUDE = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/win32 -I$(LIBUSB_PATH)/include + LINK_OPTIONS = -Wl,--kill-at -mno-cygwin + else + # swig doesn't work with version 1.3.31, works with version 1.3.36 + SWIG = /usr/local/bin/swig + JAVA_HOME = /usr/local/jdk1.6.0_04 + LIBUSB_PATH = /usr + C_OPTIONS = + JNI_DLL = libusbJNI.so + INCLUDE = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -I$(LIBUSB_PATH)/include + LINK_OPTINS = + endif IFILE = Libusb INTERFACE = $(IFILE).i WRAPFILE = $(IFILE)_wrap CC = gcc SWIG_DEST = ../src/net/sf/libusb java:: + ifdef CYGWIN + echo "compiling for CYGWIN target" + endif $(SWIG) -package net.sf.libusb -I${INCLUDE} -v -Wall -java -o $(WRAPFILE).c $(INTERFACE) ! $(CC) -c $(C_OPTIONS) -shared $(INCLUDE) $(WRAPFILE).c -o $(WRAPFILE).o ! $(CC) -shared $(WRAPFILE).o -o $(JNI_DLL) -L$(LIBUSB_PATH)/lib/gcc -lusb $(LINK_OPTIONS) ! rm $(WRAPFILE).c chmod 777 $(JNI_DLL) mv $(JNI_DLL) ../lib/ |