Generate makefile with cmake.
This commit is contained in:
scuti 2021-09-26 20:12:39 -07:00 committed by Gitea
parent bcde62a8ae
commit 894c82c381
4 changed files with 31 additions and 11 deletions

3
.gitignore vendored
View File

@ -3,6 +3,9 @@
# #
hvlusb hvlusb
# Files generated by cmake
build/
# #
# NOTE! Don't add files that are generated in specific # NOTE! Don't add files that are generated in specific
# subdirectories here. Add them in the ".gitignore" file # subdirectories here. Add them in the ".gitignore" file

20
CMakeLists.txt Normal file
View File

@ -0,0 +1,20 @@
cmake_minimum_required(VERSION 3.10)
project(hanvon-linux C)
add_executable(hvlusb hanvon-libusb.c)
find_package(PkgConfig)
pkg_check_modules(LIBUSB REQUIRED libusb-1.0)
pkg_check_modules(LIBEVDEV REQUIRED libevdev)
#pkg_check_modules(LIBUDEV REQUIRED libudev)
include_directories(
${LIBUSB_INCLUDE_DIRS}
${LIBEVDEV_INCLUDE_DIRS}
# ${LIBUDEV_INCLUDE_DIRS}
)
target_link_libraries(
hvlusb
${LIBUSB_LIBRARIES}
${LIBEVDEV_LIBRARIES}
# ${LIBUDEV_LIBRARIES}
)

View File

@ -1,9 +0,0 @@
.PHONY: all clean archive
obj-m += hanvon.o
all:
gcc hanvon-libusb.c -I/usr/include/libevdev-1.0/ -L/usr/local/lib -lusb-1.0 -ludev -levdev -g -o hvlusb
archive:
tar f - --exclude=.git -C ../ -c hanvon | gzip -c9 > ../hanvon-`date +%Y%m%d`.tgz

View File

@ -3,17 +3,23 @@
Userspace driver for Hanvon pen tablets adapted from the original Linux kernel driver. Supports tablet features such as pen coordinates, x and y tilt angle, hover detection, pressure detection, and button input. Userspace driver for Hanvon pen tablets adapted from the original Linux kernel driver. Supports tablet features such as pen coordinates, x and y tilt angle, hover detection, pressure detection, and button input.
## Dependencies
cmake pkg-config make libusb-devel libevdev-devel
## Building ## Building
mkdir build
cd build
cmake ..
make make
## Usage ## Usage
sudo hvlusb sudo ./hvlusb
Run the output executable from a terminal with sudo (preferrably in the background). Run the output executable from a terminal with sudo (preferrably in the background).
## Supported Hardware ## Supported Hardware
All tablets supported by the original driver should work with this libusb driver but only the GP0504 has been tested. All tablets supported by the original driver should work, but only GP0504 has been tested.
The original driver supported the following models: The original driver supported the following models: