1
0

build.sh 818 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/bash
  2. #
  3. # YKUSH command application build script
  4. rm -rf hidapi
  5. echo "Checking for git..."
  6. command -v git >/dev/null 2>&1 || { echo >&2 "Git is required and is not installed. Aborting."; exit 1; }
  7. echo "Fetching latest version of hidapi..."
  8. git clone git://github.com/signal11/hidapi.git
  9. echo "Building hidapi..."
  10. make --directory=hidapi/linux -f Makefile-manual
  11. cp -fv hidapi/linux/libhidapi-hidraw.so ykushcmd/linux/
  12. make --directory=hidapi/libusb -f Makefile-manual
  13. cp -fv hidapi/libusb/libhidapi-libusb.so ykushcmd/linux/
  14. echo "Configuring ykush app files..."
  15. echo "#ifndef PLATFORMDEFS_H" > ykushcmd/platformdefs.h
  16. echo "#define PLATFORMDEFS_H" >> ykushcmd/platformdefs.h
  17. echo "#define LINUX" >> ykushcmd/platformdefs.h
  18. echo "#endif" >> ykushcmd/platformdefs.h
  19. echo "Building ykush command..."
  20. make