1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
P=$(shell dirname `find /usr/lib/jvm/ -name jni.h | head -n 1` )
export CFLAGS=-I$(P)
%:
dh $@
test:
echo "P=$(P)"
DOCPATH=doc/html
override_dh_auto_build-arch:
$(MAKE) STRIP="# not stripping: " libs
touch build-arch-stamp
override_dh_auto_build-indep:
$(MAKE) STRIP="# not stripping: " classes
jar cf libusb.jar `find ch -name "*.class"`
[ -d $(DOCPATH) ] || mkdir -p $(DOCPATH)
javadoc -Xdoclint:none -source 1.7 -encoding ISO-8859-1 -classpath . -d $(DOCPATH) ch.ntb.usb
touch build-indep-stamp
LIBPACKAGE=libusb-java-lib
# /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libusb.a(usb.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
override_dh_auto_install-arch:
dh_install
[ -d $(CURDIR)/debian/$(LIBPACKAGE)/usr/lib/ ] || mkdir -p $(CURDIR)/debian/$(LIBPACKAGE)/usr/lib/
cp libusbJavaSh.so $(CURDIR)/debian/$(LIBPACKAGE)/usr/lib/libusbJava.so.0.8
override_dh_auto_install-indep:
cp libusb.jar $(CURDIR)/debian/libusb-java/usr/share/java/
override_dh_clean:
dh_clean
[ ! -r Makefile ] || make clean
rm -f lib*.so.* libusb.jar
rm -rf doc
rm -f build-indep-stamp
rm -f build-arch-stamp build-indep-stamp
.PHONY: build-arch-stamp build-indep-stamp
|