File: build.sh

package info (click to toggle)
ykush-control 1.1.0+ds-1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 184 kB
  • ctags: 44
  • sloc: cpp: 320; sh: 24; makefile: 23
file content (29 lines) | stat: -rwxr-xr-x 818 bytes parent folder | download
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
#!/bin/bash
#
# YKUSH command application build script

rm -rf hidapi

echo "Checking for git..."
command -v git >/dev/null 2>&1 || { echo >&2 "Git is required and is not installed. Aborting."; exit 1; }

echo "Fetching latest version of hidapi..."
git clone git://github.com/signal11/hidapi.git

echo "Building hidapi..."
make --directory=hidapi/linux -f Makefile-manual
cp -fv hidapi/linux/libhidapi-hidraw.so ykushcmd/linux/

make --directory=hidapi/libusb -f Makefile-manual
cp -fv hidapi/libusb/libhidapi-libusb.so ykushcmd/linux/

echo "Configuring ykush app files..."

echo "#ifndef PLATFORMDEFS_H" > ykushcmd/platformdefs.h
echo "#define PLATFORMDEFS_H" >> ykushcmd/platformdefs.h
echo "#define LINUX" >> ykushcmd/platformdefs.h
echo "#endif" >> ykushcmd/platformdefs.h

echo "Building ykush command..."
make