#!/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`)

export CFLAGS=-I$(P)

%:
	dh $@ 

test:
	echo "P=$(P)"

override_dh_auto_build:
	dh_auto_build
	jar cf libusb.jar ch

override_dh_install:
	dh_install
	cp *.so* $(CURDIR)/debian/libusb-java/usr/lib/
	#cp -f libusb.jar $(CURDIR)/debian/libusb-java/usr/share/java/

override_dh_strip:
	dh_strip --dbg-package=libusb-java-dbg

override_dh_clean:
	make clean
	rm -f lib*.so.*
