-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·30 lines (21 loc) · 831 Bytes
/
build.sh
File metadata and controls
executable file
·30 lines (21 loc) · 831 Bytes
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
#
# YKUR 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
mkdir ykurcmd/linux
cp -fv hidapi/linux/libhidapi-hidraw.so ykurcmd/linux/
make --directory=hidapi/libusb -f Makefile-manual
cp -fv hidapi/libusb/libhidapi-libusb.so ykurcmd/linux/
echo "Configuring ykur app files..."
echo "#ifndef PLATFORMDEFS_H" > ykurcmd/platformdefs.h
echo "#define PLATFORMDEFS_H" >> ykurcmd/platformdefs.h
echo "#define _LINUX_" >> ykurcmd/platformdefs.h
echo "#endif" >> ykurcmd/platformdefs.h
echo "Building ykur command..."
make