参考博客:
http://blog.csdn.net/mcy_cool/article/details/10178841
涉及到的源码: http://files.cnblogs.com/files/pengdonglin137/libusb_utls.tar.gz,解压后会得到两个文件:libusb-1.0.9.tar.bz2和usbutils-008.tar.xz。
编译生成libusb库
tar -xf libusb-1.0..tar.bz2
cd libusb-1.0./
./configure --prefix=/home/pengdonglin/usb_study/lsusb_code/build
make
make install
编译生成lsusb可执行程序
tar -xf usbutils-.tar.xz
cd usbutils-/ ./configure --prefix=/home/pengdonglin/usb_study/lsusb_code/build LIBUSB_CFLAGS=-I/home/pengdonglin/usb_study/lsusb_code/build/include/libusb-1.0 LIBUSB_LIBS=/home/pengdonglin/usb_study/lsusb_code/build/lib/libusb-1.0.so CPPFLAGS=-I/home/pengdonglin/usb_study/lsusb_code/build/include/libusb-1.0/ make
make install
完