mirror of https://github.com/nirenjan/libx52.git
commit
f52e328a8b
|
|
@ -1,9 +1,6 @@
|
|||
#!/bin/bash -x
|
||||
# Install dependencies to build and test on Ubuntu runners
|
||||
brew install \
|
||||
autoconf \
|
||||
automake \
|
||||
libtool \
|
||||
pkg-config \
|
||||
python3 \
|
||||
gettext \
|
||||
|
|
|
|||
|
|
@ -2,9 +2,6 @@
|
|||
# Install dependencies to build and test on Ubuntu runners
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
autoconf \
|
||||
automake \
|
||||
libtool \
|
||||
pkg-config \
|
||||
python3 \
|
||||
gettext \
|
||||
|
|
@ -17,7 +14,6 @@ sudo apt-get install -y \
|
|||
libcmocka-dev \
|
||||
faketime \
|
||||
meson \
|
||||
ninja-build \
|
||||
libinih-dev
|
||||
ninja-build
|
||||
|
||||
exit 0
|
||||
|
|
|
|||
|
|
@ -10,10 +10,13 @@ x52test*
|
|||
x52evtest*
|
||||
libx52/test_*
|
||||
libx52test*
|
||||
libx52util/util_char_map.c
|
||||
libx52util/char_map.c
|
||||
udev/*.rules
|
||||
# Built artifacts / local installs named x52d*; daemon sources use short names.
|
||||
# Keep tracked daemon files that still use the x52d prefix (headers, configs).
|
||||
x52d*
|
||||
!daemon/x52d*.*
|
||||
!libx52/x52dcomm.h
|
||||
test-*
|
||||
libx52-*.tar.gz
|
||||
|
||||
|
|
|
|||
|
|
@ -988,7 +988,7 @@ FILE_PATTERNS = libx52.h \
|
|||
libx52util.h \
|
||||
vkm.h \
|
||||
x52_cli.c \
|
||||
x52ctl.c \
|
||||
daemon_control.c \
|
||||
x52dcomm.h \
|
||||
*.dox
|
||||
|
||||
|
|
@ -1021,7 +1021,9 @@ EXCLUDE_SYMLINKS = NO
|
|||
# Note that the wildcards are matched against the file with absolute path, so to
|
||||
# exclude all test directories for example use the pattern */test/*
|
||||
|
||||
EXCLUDE_PATTERNS =
|
||||
EXCLUDE_PATTERNS = */libx52/libx52io.h \
|
||||
*/libx52/libx52util.h \
|
||||
*/libx52/x52dcomm.h
|
||||
|
||||
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
|
||||
# (namespaces, classes, functions, etc.) that should be excluded from the
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ Build has been tested on the following operating systems (x86-64 only):
|
|||
| Platform | Install instructions |
|
||||
| -------- | -------------------- |
|
||||
| Ubuntu | `sudo apt-get install meson gettext libhidapi-dev libevdev-dev libusb-1.0-0-dev libinih-dev pkg-config python3 git` |
|
||||
| MacOS + Homebrew | `brew install meson gettext hidapi libtool libusb pkg-config python3 git` |
|
||||
| MacOS + Homebrew | `brew install meson gettext hidapi libusb pkg-config python3 git` |
|
||||
| Arch Linux | `pacman -S base-devel meson libusb hidapi libevdev libinih python git` |
|
||||
| Fedora | `sudo dnf install meson gettext-devel findutils hidapi-devel libusb-devel libevdev-devel inih-devel pkg-config python3 git` |
|
||||
|
||||
|
|
@ -47,13 +47,13 @@ Build has been tested on the following operating systems (x86-64 only):
|
|||
git clone https://github.com/nirenjan/libx52.git
|
||||
```
|
||||
|
||||
2. Run autogen.sh
|
||||
2. Configure the build (from the repository root)
|
||||
```
|
||||
cd ./libx52
|
||||
cd libx52
|
||||
meson setup build -Dprefix=/usr
|
||||
```
|
||||
|
||||
3. Run the following commands:
|
||||
3. Compile and install:
|
||||
```
|
||||
meson compile -C build && meson install -C build
|
||||
```
|
||||
|
|
|
|||
110
Makefile.am
110
Makefile.am
|
|
@ -1,110 +0,0 @@
|
|||
# Top level Automake for libx52
|
||||
#
|
||||
# Copyright (C) 2012-2018 Nirenjan Krishnan (nirenjan@nirenjan.org)
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
# Build any support libraries first
|
||||
SUBDIRS = subprojects
|
||||
|
||||
if USE_NLS
|
||||
SUBDIRS += po
|
||||
endif
|
||||
|
||||
#######################################################################
|
||||
# Defaults
|
||||
#######################################################################
|
||||
bin_PROGRAMS =
|
||||
check_PROGRAMS =
|
||||
lib_LTLIBRARIES =
|
||||
check_LTLIBRARIES =
|
||||
pkgconfig_DATA =
|
||||
TESTS =
|
||||
EXTRA_DIST =
|
||||
CLEANFILES =
|
||||
BUILT_SOURCES =
|
||||
|
||||
x52includedir = $(includedir)/libx52
|
||||
x52include_HEADERS =
|
||||
|
||||
LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/tap-driver.sh
|
||||
|
||||
########################################################################
|
||||
# Get build version
|
||||
########################################################################
|
||||
BUILT_SOURCES += version-info.h
|
||||
CLEANFILES += version-info.h
|
||||
|
||||
version-info.h: ${top_srcdir}/version-info
|
||||
CC=${CC} ${top_srcdir}/version-info ${top_srcdir} >$@
|
||||
|
||||
########################################################################
|
||||
# Include automake stubs
|
||||
########################################################################
|
||||
include libx52/Makefile.am
|
||||
include libx52util/Makefile.am
|
||||
include libx52io/Makefile.am
|
||||
include libusbx52/Makefile.am
|
||||
|
||||
include cli/Makefile.am
|
||||
include joytest/Makefile.am
|
||||
include evtest/Makefile.am
|
||||
include daemon/Makefile.am
|
||||
include udev/Makefile.am
|
||||
|
||||
include bugreport/Makefile.am
|
||||
include docs/Makefile.am
|
||||
|
||||
#######################################################################
|
||||
# Doxygen support
|
||||
#######################################################################
|
||||
if HAVE_DOXYGEN
|
||||
DXGEN = $(DXGEN_@AM_V@)
|
||||
DXGEN_ = $(DXGEN_@AM_DEFAULT_V@)
|
||||
DXGEN_0 = @printf " DXGEN $<\n";
|
||||
|
||||
SYSCONFDIR=@sysconfdir@
|
||||
LOCALSTATEDIR=@localstatedir@
|
||||
export SYSCONFDIR
|
||||
export LOCALSTATEDIR
|
||||
docs/.stamp: Doxyfile
|
||||
$(DXGEN)$(DOXYGEN) $<
|
||||
$(AM_V_at)touch $@
|
||||
|
||||
all-local: docs/.stamp
|
||||
clean-local:
|
||||
rm -rf $(top_builddir)/docs
|
||||
|
||||
man1_MANS = docs/man/man1/x52cli.1 docs/man/man1/x52bugreport.1
|
||||
$(man1_MANS): docs/.stamp
|
||||
|
||||
# Install Doxygen generated HTML documentation and manpages
|
||||
install-data-local:
|
||||
$(INSTALL) -d $(DESTDIR)$(docdir)
|
||||
cp -R -P $(top_builddir)/docs/html $(DESTDIR)$(docdir)
|
||||
|
||||
uninstall-local:
|
||||
rm -rf $(DESTDIR)$(docdir)
|
||||
|
||||
endif
|
||||
|
||||
# Extra files that need to be in the distribution
|
||||
EXTRA_DIST += \
|
||||
ABOUT-NLS \
|
||||
AUTHORS \
|
||||
ChangeLog.md \
|
||||
CONTRIBUTING.md \
|
||||
Doxyfile.in \
|
||||
DoxygenLayout.xml \
|
||||
INSTALL.md \
|
||||
LICENSE \
|
||||
README.md \
|
||||
config.rpath \
|
||||
version-info \
|
||||
Version \
|
||||
gettext.h \
|
||||
usb-ids.h \
|
||||
po/README.md
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh -x
|
||||
|
||||
autoreconf --install
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
# Automake for libx52-bugreport
|
||||
#
|
||||
# Copyright (C) 2021 Nirenjan Krishnan (nirenjan@nirenjan.org)
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
|
||||
bin_PROGRAMS += x52bugreport
|
||||
|
||||
# Bug report program that reports the build and linked library versions
|
||||
x52bugreport_SOURCES = bugreport/bugreport.c
|
||||
x52bugreport_CFLAGS = \
|
||||
-I$(top_srcdir)/libx52io \
|
||||
@LIBUSB_CFLAGS@ \
|
||||
@HIDAPI_CFLAGS@ \
|
||||
$(WARN_CFLAGS)
|
||||
|
||||
x52bugreport_LDFLAGS = \
|
||||
@LIBUSB_LIBS@ \
|
||||
@HIDAPI_LIBS@ \
|
||||
$(WARN_LDFLAGS)
|
||||
|
||||
x52bugreport_LDADD = libx52io.la
|
||||
|
||||
$(x52bugreport_OBJECTS): version-info.h
|
||||
|
||||
EXTRA_DIST += bugreport/bugreport.dox
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
#include "libusb.h"
|
||||
#include "hidapi.h"
|
||||
#include "libx52io.h"
|
||||
#include <libx52/libx52io.h>
|
||||
#include "version-info.h"
|
||||
|
||||
static void print_sysinfo(void)
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
# Automake for x52cli
|
||||
#
|
||||
# Copyright (C) 2012-2018 Nirenjan Krishnan (nirenjan@nirenjan.org)
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
|
||||
bin_PROGRAMS += x52cli
|
||||
|
||||
# Command line utility that front ends the core library
|
||||
x52cli_SOURCES = cli/x52_cli.c
|
||||
x52cli_CFLAGS = -I $(top_srcdir)/libx52 $(WARN_CFLAGS)
|
||||
x52cli_LDFLAGS = $(WARN_LDFLAGS)
|
||||
x52cli_LDADD = libx52.la
|
||||
|
||||
if HAVE_CMOCKA
|
||||
TESTS += test-cli
|
||||
check_PROGRAMS += test-cli
|
||||
|
||||
test_cli_SOURCES = cli/x52_cli.c cli/test_x52_cli.c
|
||||
test_cli_CFLAGS = @CMOCKA_CFLAGS@ -DX52_CLI_TESTING -I $(top_srcdir)/libx52
|
||||
test_cli_LDFLAGS = @CMOCKA_LIBS@ $(WARN_LDFLAGS)
|
||||
|
||||
# Add a dependency on test_x52_cli_tests.c
|
||||
cli/test_x52_cli.c: cli/test_x52_cli_tests.c
|
||||
endif
|
||||
|
||||
EXTRA_DIST += cli/test_x52_cli_tests.c
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
#include <setjmp.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
#include "libx52.h"
|
||||
#include <libx52/libx52.h>
|
||||
|
||||
extern int run_main(int argc, char **argv);
|
||||
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ possibly through \b sudo(8)
|
|||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
|
@ -158,7 +158,7 @@ possibly through \b sudo(8)
|
|||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "libx52.h"
|
||||
#include <libx52/libx52.h>
|
||||
|
||||
struct string_map {
|
||||
const char *key;
|
||||
|
|
|
|||
153
configure.ac
153
configure.ac
|
|
@ -1,153 +0,0 @@
|
|||
# Autoconf settings for libx52
|
||||
#
|
||||
# Copyright (C) 2012-2021 Nirenjan Krishnan (nirenjan@nirenjan.org)
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
|
||||
AC_INIT([libx52], [m4_esyscmd_s([cat ./Version])], [nirenjan@gmail.com])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
|
||||
AC_REQUIRE_AUX_FILE([tap-driver.sh])
|
||||
AC_PROG_CC
|
||||
AC_PROG_CC_STDC
|
||||
AC_PROG_AWK
|
||||
AC_PROG_SED
|
||||
AC_PROG_MKDIR_P
|
||||
AM_PROG_AR
|
||||
AM_PATH_PYTHON([3.5])
|
||||
LT_INIT
|
||||
PKG_PROG_PKG_CONFIG
|
||||
PKG_INSTALLDIR
|
||||
AX_COMPILER_FLAGS
|
||||
VISIBILITY_CFLAGS=
|
||||
if test "x$GCC" = xyes; then
|
||||
VISIBILITY_CFLAGS="-fvisibility=hidden"
|
||||
fi
|
||||
AC_SUBST([VISIBILITY_CFLAGS])
|
||||
AC_CANONICAL_HOST
|
||||
AX_GCC_FUNC_ATTRIBUTE([constructor])
|
||||
AX_GCC_FUNC_ATTRIBUTE([destructor])
|
||||
AX_GCC_FUNC_ATTRIBUTE([format])
|
||||
AX_GCC_FUNC_ATTRIBUTE([noreturn])
|
||||
AC_C_TYPEOF
|
||||
|
||||
AC_MSG_NOTICE([Detected host OS is ${host_os}])
|
||||
build_linux=no
|
||||
# Detect target system
|
||||
case "${host_os}" in
|
||||
linux*)
|
||||
build_linux=yes
|
||||
;;
|
||||
esac
|
||||
AM_CONDITIONAL([LINUX], [test "x${build_linux}" = "xyes"])
|
||||
|
||||
# Internationalization
|
||||
AM_GNU_GETTEXT([external])
|
||||
AM_GNU_GETTEXT_VERSION(0.19)
|
||||
AM_CONDITIONAL([USE_NLS], [test "x${USE_NLS}" == "xyes"])
|
||||
|
||||
# Check for libusb-1.0
|
||||
PKG_CHECK_MODULES([LIBUSB], [libusb-1.0])
|
||||
AC_SUBST([LIBUSB_PC], [libusb-1.0])
|
||||
|
||||
# systemd support
|
||||
PKG_CHECK_MODULES([SYSTEMD], [systemd], [have_systemd=yes], [have_systemd=no])
|
||||
AC_ARG_ENABLE([systemd],
|
||||
[AS_HELP_STRING([--disable-systemd], [Disable systemd support])]
|
||||
)
|
||||
AC_ARG_WITH([systemdsystemunitdir],
|
||||
[AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd unit files])],
|
||||
[systemdsystemunitdir=$withval],
|
||||
[systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]
|
||||
)
|
||||
AC_SUBST([systemdsystemunitdir], [$systemdsystemunitdir])
|
||||
AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$have_systemd" = "xyes" -a "x$enable_systemd" != "xno"])
|
||||
AM_COND_IF([HAVE_SYSTEMD],,
|
||||
[
|
||||
AC_MSG_NOTICE([systemd not found or disabled. Enabling timestamps in logs])
|
||||
AX_APPEND_FLAG([-DPINELOG_SHOW_DATE=1], [PINELOG_CFLAGS])
|
||||
]
|
||||
)
|
||||
|
||||
# evdev support
|
||||
# This is only on Linux machines, so we need to set an automake conditional
|
||||
PKG_CHECK_MODULES([EVDEV], [libevdev], [have_evdev=yes], [have_evdev=no])
|
||||
AM_CONDITIONAL([HAVE_EVDEV], [test "x$have_evdev" = "xyes"])
|
||||
|
||||
# Pinelog configuration
|
||||
AX_APPEND_FLAG([-DPINELOG_SHOW_LEVEL=1], [PINELOG_CFLAGS])
|
||||
AX_APPEND_FLAG([-DPINELOG_SHOW_BACKTRACE=1], [PINELOG_CFLAGS])
|
||||
AX_APPEND_FLAG([-DPINELOG_BUFFER_SZ=1024], [PINELOG_CFLAGS])
|
||||
AC_SUBST([PINELOG_CFLAGS])
|
||||
|
||||
# Check for hidapi. This uses a different pkg-config file on Linux vs other
|
||||
# hosts, so check accordingly
|
||||
AM_COND_IF([LINUX], [hidapi_backend=hidapi-hidraw], [hidapi_backend=hidapi])
|
||||
PKG_CHECK_MODULES([HIDAPI], [${hidapi_backend}])
|
||||
AC_SUBST([HIDAPI_PC], [${hidapi_backend}])
|
||||
|
||||
# Check for inih library, this is now packaged with recent distros
|
||||
PKG_CHECK_MODULES([INIH], [inih])
|
||||
|
||||
# Check for pthreads
|
||||
ACX_PTHREAD
|
||||
|
||||
# make distcheck doesn't work if some files are installed outside $prefix.
|
||||
# Check for a prefix ending in /_inst, if this is found, we can assume this
|
||||
# to be a make distcheck, and disable some of the installcheck stuff.
|
||||
AS_CASE([$prefix], [*/_inst],
|
||||
[AC_MSG_NOTICE([[Prefix ends in /_inst; this looks like a 'make distcheck']])
|
||||
is_make_distcheck=yes])
|
||||
AM_CONDITIONAL([IS_MAKE_DISTCHECK], [test "x$is_make_distcheck" = xyes])
|
||||
AC_MSG_CHECKING([final decision IS_MAKE_DISTCHECK (running "make distcheck"?)])
|
||||
AM_COND_IF([IS_MAKE_DISTCHECK], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
|
||||
|
||||
# udev support
|
||||
PKG_CHECK_MODULES([UDEV], [udev], [have_udev=yes], [have_udev=no])
|
||||
AM_CONDITIONAL([HAVE_UDEV], [test "x$have_udev" = xyes])
|
||||
AC_ARG_WITH([udevrulesdir],
|
||||
AS_HELP_STRING([--with-udevrulesdir=DIR], [Directory for udev rules]),
|
||||
[udevrulesdir=$withval],
|
||||
[udevrulesdir=$($PKG_CONFIG --variable=udevdir udev)"/rules.d"])
|
||||
AC_SUBST([udevrulesdir], [$udevrulesdir])
|
||||
|
||||
AC_ARG_WITH([input-group],
|
||||
AS_HELP_STRING([--with-input-group=GROUP], [Group allowed to access input devices]),
|
||||
[input_group=$withval],
|
||||
[input_group=plugdev])
|
||||
AC_SUBST([input_group], [$input_group])
|
||||
|
||||
# Doxygen Support
|
||||
AC_CHECK_PROGS([DOXYGEN], [doxygen])
|
||||
AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
|
||||
AM_COND_IF([HAVE_DOXYGEN],
|
||||
[AC_CONFIG_FILES([Doxyfile])],
|
||||
[AC_MSG_WARN(["Doxygen not found; continuing without doxygen support"])])
|
||||
|
||||
# cmocka unit tests
|
||||
PKG_CHECK_MODULES([CMOCKA], [cmocka >= 1.1], [have_cmocka=yes], [have_cmocka=no])
|
||||
AM_CONDITIONAL([HAVE_CMOCKA], [test "x$have_cmocka" = xyes])
|
||||
AM_COND_IF([HAVE_CMOCKA], [],
|
||||
[AC_MSG_WARN(["cmocka not found; disabling unit test build"])])
|
||||
|
||||
# Check for the presence of tm_gmtoff in struct tm. If we have this, then we
|
||||
# can use it to determine the true GMT offset
|
||||
AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,
|
||||
[AC_MSG_WARN(["Cannot find tm_gmtoff in struct tm, using slower method"])],
|
||||
[#define _GNU_SOURCE
|
||||
#include <time.h>
|
||||
])
|
||||
|
||||
# Configuration headers
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
||||
AC_CONFIG_FILES([ po/Makefile.in
|
||||
Makefile
|
||||
subprojects/Makefile
|
||||
libx52/libx52.pc
|
||||
libx52io/libx52io.pc
|
||||
libx52util/libx52util.pc
|
||||
subprojects/pinelog/Makefile
|
||||
udev/60-saitek-x52-x52pro.rules
|
||||
])
|
||||
AC_OUTPUT
|
||||
|
|
@ -1,146 +0,0 @@
|
|||
# Automake for x52d
|
||||
#
|
||||
# Copyright (C) 2021 Nirenjan Krishnan (nirenjan@nirenjan.org)
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
bin_PROGRAMS += x52d x52ctl
|
||||
|
||||
# Service daemon that manages the X52 device
|
||||
x52d_SOURCES = \
|
||||
daemon/x52d_main.c \
|
||||
daemon/x52d_config_parser.c \
|
||||
daemon/x52d_config_dump.c \
|
||||
daemon/x52d_config.c \
|
||||
daemon/x52d_device.c \
|
||||
daemon/x52d_client.c \
|
||||
daemon/x52d_clock.c \
|
||||
daemon/x52d_mouse.c \
|
||||
daemon/x52d_notify.c \
|
||||
daemon/x52d_led.c \
|
||||
daemon/x52d_command.c \
|
||||
daemon/x52d_comm_internal.c \
|
||||
daemon/x52d_comm_client.c
|
||||
|
||||
x52d_CFLAGS = \
|
||||
-I $(top_srcdir) \
|
||||
-I $(top_srcdir)/libx52io \
|
||||
-I $(top_srcdir)/libx52 \
|
||||
-I $(top_srcdir)/libx52util \
|
||||
-I $(top_srcdir)/subprojects/pinelog \
|
||||
-DSYSCONFDIR=\"$(sysconfdir)\" \
|
||||
-DLOCALEDIR=\"$(localedir)\" \
|
||||
-DLOGDIR=\"$(localstatedir)/log\" \
|
||||
-DRUNDIR=\"$(localstatedir)/run\" \
|
||||
@INIH_CFLAGS@ @PTHREAD_CFLAGS@ $(WARN_CFLAGS)
|
||||
|
||||
x52d_LDFLAGS = @INIH_LIBS@ @PTHREAD_LIBS@ $(WARN_LDFLAGS)
|
||||
x52d_LDADD = \
|
||||
subprojects/pinelog/libpinelog.la \
|
||||
libx52.la \
|
||||
@LTLIBINTL@
|
||||
|
||||
if HAVE_EVDEV
|
||||
x52d_SOURCES += \
|
||||
daemon/x52d_io.c \
|
||||
daemon/x52d_mouse_evdev.c
|
||||
|
||||
x52d_CFLAGS += -DHAVE_EVDEV @EVDEV_CFLAGS@
|
||||
x52d_LDFLAGS += @EVDEV_LIBS@
|
||||
x52d_LDADD += libx52io.la
|
||||
endif
|
||||
|
||||
lib_LTLIBRARIES += libx52dcomm.la
|
||||
|
||||
# Client library to communicate with X52 daemon
|
||||
libx52dcomm_la_SOURCES = \
|
||||
daemon/x52d_comm_client.c \
|
||||
daemon/x52d_comm_internal.c
|
||||
libx52dcomm_la_CFLAGS = \
|
||||
-I $(top_srcdir) \
|
||||
-DSYSCONFDIR=\"$(sysconfdir)\" \
|
||||
-DLOCALEDIR=\"$(localedir)\" \
|
||||
-DLOGDIR=\"$(localstatedir)/log\" \
|
||||
-DRUNDIR=\"$(localstatedir)/run\" \
|
||||
$(VISIBILITY_CFLAGS) \
|
||||
$(WARN_CFLAGS)
|
||||
libx52dcomm_la_LDFLAGS = \
|
||||
-export-symbols-regex '^x52d_(dial_command|dial_notify|format_command|send_command|recv_notification)$' \
|
||||
$(WARN_LDFLAGS)
|
||||
|
||||
x52include_HEADERS += daemon/x52dcomm.h
|
||||
|
||||
x52ctl_SOURCES = daemon/x52ctl.c
|
||||
x52ctl_CFLAGS = \
|
||||
-I $(top_srcdir) \
|
||||
$(WARN_CFLAGS)
|
||||
x52ctl_LDFLAGS = $(WARN_LDFLAGS)
|
||||
x52ctl_LDADD = libx52dcomm.la @LTLIBINTL@
|
||||
|
||||
x52dconfdir = @sysconfdir@/x52d
|
||||
x52dconf_DATA = daemon/x52d.conf
|
||||
|
||||
install-exec-hook:
|
||||
$(MKDIR_P) $(DESTDIR)$(localstatedir)/log
|
||||
$(MKDIR_P) $(DESTDIR)$(localstatedir)/run
|
||||
|
||||
EXTRA_DIST += \
|
||||
daemon/daemon.dox \
|
||||
daemon/protocol.dox \
|
||||
daemon/x52d.service.in \
|
||||
daemon/x52d_client.h \
|
||||
daemon/x52d_clock.h \
|
||||
daemon/x52d_config.def \
|
||||
daemon/x52d_config.h \
|
||||
daemon/x52d_const.h \
|
||||
daemon/x52d_device.h \
|
||||
daemon/x52d_io.h \
|
||||
daemon/x52d_mouse.h \
|
||||
daemon/x52d_notify.h \
|
||||
daemon/x52d_command.h \
|
||||
daemon/x52dcomm.h \
|
||||
daemon/x52dcomm-internal.h \
|
||||
daemon/x52d.conf
|
||||
|
||||
# Test cases
|
||||
EXTRA_DIST += \
|
||||
daemon/test_daemon_comm.py \
|
||||
daemon/tests/config/args.tc \
|
||||
daemon/tests/config/clock.tc \
|
||||
daemon/tests/config/led.tc \
|
||||
daemon/tests/config/mouse.tc \
|
||||
daemon/tests/logging/error.tc \
|
||||
daemon/tests/logging/global.tc \
|
||||
daemon/tests/logging/module.tc \
|
||||
daemon/tests/cli.tc
|
||||
|
||||
TESTS += daemon/test_daemon_comm.py
|
||||
|
||||
if HAVE_CMOCKA
|
||||
check_PROGRAMS += x52d-mouse-test
|
||||
|
||||
x52d_mouse_test_SOURCES = \
|
||||
daemon/x52d_mouse_test.c \
|
||||
daemon/x52d_mouse.c
|
||||
x52d_mouse_test_CFLAGS = \
|
||||
-DLOCALEDIR='"$(localedir)"' \
|
||||
-I $(top_srcdir) \
|
||||
-I $(top_srcdir)/libx52 \
|
||||
-I $(top_srcdir)/libx52io \
|
||||
-I $(top_srcdir)/subprojects/pinelog \
|
||||
$(WARN_CFLAGS) @CMOCKA_CFLAGS@
|
||||
x52d_mouse_test_LDFLAGS = @CMOCKA_LIBS@ $(WARN_LDFLAGS)
|
||||
x52d_mouse_test_LDADD = \
|
||||
subprojects/pinelog/libpinelog.la \
|
||||
@LTLIBINTL@
|
||||
|
||||
TESTS += x52d-mouse-test
|
||||
endif
|
||||
|
||||
if HAVE_SYSTEMD
|
||||
if !IS_MAKE_DISTCHECK
|
||||
SED_ARGS = s,%bindir%,$(bindir),g
|
||||
x52d.service: daemon/x52d.service.in
|
||||
$(AM_V_GEN) $(SED) -e '$(SED_ARGS)' $< > $@
|
||||
systemdsystemunit_DATA = x52d.service
|
||||
endif
|
||||
endif
|
||||
|
|
@ -12,8 +12,8 @@
|
|||
#include <unistd.h>
|
||||
|
||||
#include "pinelog.h"
|
||||
#include "x52d_client.h"
|
||||
#include "x52dcomm-internal.h"
|
||||
#include <daemon/client.h>
|
||||
#include <daemon/x52dcomm-internal.h>
|
||||
|
||||
void x52d_client_init(int client_fd[X52D_MAX_CLIENTS])
|
||||
{
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
#include <stdbool.h>
|
||||
#include <poll.h>
|
||||
|
||||
#include "x52d_const.h"
|
||||
#include <daemon/constants.h>
|
||||
|
||||
#define MAX_CONN (X52D_MAX_CLIENTS + 1)
|
||||
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
|
|
@ -15,10 +15,10 @@
|
|||
|
||||
#define PINELOG_MODULE X52D_MOD_CLOCK
|
||||
#include "pinelog.h"
|
||||
#include "x52d_config.h"
|
||||
#include "x52d_clock.h"
|
||||
#include "x52d_const.h"
|
||||
#include "x52d_device.h"
|
||||
#include <daemon/config.h>
|
||||
#include <daemon/clock.h>
|
||||
#include <daemon/constants.h>
|
||||
#include <daemon/device.h>
|
||||
|
||||
static bool clock_enabled = false;
|
||||
static int clock_primary_is_local = false;
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
|
@ -15,8 +15,8 @@
|
|||
#include <sys/un.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "x52dcomm.h"
|
||||
#include "x52dcomm-internal.h"
|
||||
#include <libx52/x52dcomm.h>
|
||||
#include <daemon/x52dcomm-internal.h>
|
||||
|
||||
static int _setup_socket(struct sockaddr_un *remote, int len)
|
||||
{
|
||||
|
|
@ -6,15 +6,15 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "x52dcomm-internal.h"
|
||||
#include "x52d_const.h"
|
||||
#include <daemon/x52dcomm-internal.h>
|
||||
#include <daemon/constants.h>
|
||||
|
||||
const char * x52d_command_sock_path(const char *sock_path)
|
||||
{
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
|
@ -21,11 +21,11 @@
|
|||
|
||||
#define PINELOG_MODULE X52D_MOD_COMMAND
|
||||
#include "pinelog.h"
|
||||
#include "x52d_const.h"
|
||||
#include "x52d_command.h"
|
||||
#include "x52d_config.h"
|
||||
#include "x52d_client.h"
|
||||
#include "x52dcomm-internal.h"
|
||||
#include <daemon/constants.h>
|
||||
#include <daemon/command.h>
|
||||
#include <daemon/config.h>
|
||||
#include <daemon/client.h>
|
||||
#include <daemon/x52dcomm-internal.h>
|
||||
|
||||
static int client_fd[X52D_MAX_CLIENTS];
|
||||
|
||||
|
|
@ -6,13 +6,13 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <errno.h>
|
||||
|
||||
#define PINELOG_MODULE X52D_MOD_CONFIG
|
||||
#include "pinelog.h"
|
||||
#include "x52d_config.h"
|
||||
#include "x52d_const.h"
|
||||
#include <daemon/config.h>
|
||||
#include <daemon/constants.h>
|
||||
|
||||
static struct x52d_config x52d_config;
|
||||
|
||||
|
|
@ -97,7 +97,7 @@ void x52d_config_apply_immediate(const char *section, const char *key)
|
|||
x52d_cfg_set_ ## c_sec ## _ ## c_key(x52d_config . name); \
|
||||
} else
|
||||
|
||||
#include "x52d_config.def"
|
||||
#include <daemon/config.def>
|
||||
// Dummy to capture the trailing else
|
||||
// Wrap it in braces in case tracing has been disabled
|
||||
{ PINELOG_TRACE("Ignoring apply_immediate(%s.%s)", section, key); }
|
||||
|
|
@ -108,5 +108,5 @@ void x52d_config_apply(void)
|
|||
#define CFG(section, key, name, parser, def) \
|
||||
PINELOG_TRACE("Calling configuration callback for " #section "." #key); \
|
||||
x52d_cfg_set_ ## section ## _ ## key(x52d_config . name);
|
||||
#include "x52d_config.def"
|
||||
#include <daemon/config.def>
|
||||
}
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <limits.h>
|
||||
#include "libx52.h"
|
||||
#include <libx52/libx52.h>
|
||||
|
||||
/**
|
||||
* @brief Configuration structure
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stddef.h>
|
||||
|
|
@ -16,9 +16,9 @@
|
|||
|
||||
#define PINELOG_MODULE X52D_MOD_CONFIG
|
||||
#include "pinelog.h"
|
||||
#include "libx52.h"
|
||||
#include "x52d_config.h"
|
||||
#include "x52d_const.h"
|
||||
#include <libx52/libx52.h>
|
||||
#include <daemon/config.h>
|
||||
#include <daemon/constants.h>
|
||||
|
||||
// Create a pointer "name" of type "type", which stores the value of the
|
||||
// corresponding element within the config struct.
|
||||
|
|
@ -130,7 +130,7 @@ int x52d_config_save_file(struct x52d_config *cfg, const char *cfg_file)
|
|||
fprintf(cfg_fp, "%s = %s\n", #key, value); \
|
||||
} \
|
||||
} while (0);
|
||||
#include "x52d_config.def"
|
||||
#include <daemon/config.def>
|
||||
|
||||
exit_dump:
|
||||
free(current_section);
|
||||
|
|
@ -145,7 +145,7 @@ const char *x52d_config_get_param(struct x52d_config *cfg, const char *section,
|
|||
return type ## _dumper(section, key, cfg, offsetof(struct x52d_config, name)); \
|
||||
} \
|
||||
} while (0);
|
||||
#include "x52d_config.def"
|
||||
#include <daemon/config.def>
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stddef.h>
|
||||
|
|
@ -17,8 +17,8 @@
|
|||
#define PINELOG_MODULE X52D_MOD_CONFIG
|
||||
#include "ini.h"
|
||||
#include "pinelog.h"
|
||||
#include "x52d_config.h"
|
||||
#include "x52d_const.h"
|
||||
#include <daemon/config.h>
|
||||
#include <daemon/constants.h>
|
||||
|
||||
/* Parser function typedef */
|
||||
typedef int (*parser_fn)(struct x52d_config *, size_t, const char *);
|
||||
|
|
@ -142,7 +142,7 @@ static const struct config_map {
|
|||
parser_fn parser;
|
||||
size_t offset;
|
||||
} config_map[] = {
|
||||
#include "x52d_config.def"
|
||||
#include <daemon/config.def>
|
||||
|
||||
// Terminating entry
|
||||
{NULL, NULL, NULL, 0}
|
||||
|
|
@ -195,7 +195,7 @@ int x52d_config_set_defaults(struct x52d_config *cfg) {
|
|||
if (rc != 0) { \
|
||||
return rc; \
|
||||
}
|
||||
#include "x52d_config.def"
|
||||
#include <daemon/config.def>
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -40,7 +40,7 @@ string "quit", or terminates input by using Ctrl+D.
|
|||
default socket.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
|
|
@ -48,8 +48,8 @@ string "quit", or terminates input by using Ctrl+D.
|
|||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "x52d_const.h"
|
||||
#include "x52dcomm.h"
|
||||
#include <daemon/constants.h>
|
||||
#include <libx52/x52dcomm.h>
|
||||
|
||||
#define APP_NAME "x52ctl"
|
||||
#if HAVE_FUNC_ATTRIBUTE_NORETURN
|
||||
|
|
@ -6,17 +6,17 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#define PINELOG_MODULE X52D_MOD_DEVICE
|
||||
#include "x52d_const.h"
|
||||
#include "x52d_config.h"
|
||||
#include "x52d_device.h"
|
||||
#include "x52d_notify.h"
|
||||
#include "libx52.h"
|
||||
#include <daemon/constants.h>
|
||||
#include <daemon/config.h>
|
||||
#include <daemon/device.h>
|
||||
#include <daemon/notify.h>
|
||||
#include <libx52/libx52.h>
|
||||
#include "pinelog.h"
|
||||
|
||||
static libx52_device *x52_dev;
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
#ifndef X52D_DEVICE_H
|
||||
#define X52D_DEVICE_H
|
||||
|
||||
#include "libx52.h"
|
||||
#include <libx52/libx52.h>
|
||||
|
||||
void x52d_dev_init(void);
|
||||
void x52d_dev_exit(void);
|
||||
|
|
@ -6,16 +6,16 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdbool.h>
|
||||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include "x52d_const.h"
|
||||
#include "x52d_config.h"
|
||||
#include "x52d_io.h"
|
||||
#include "x52d_mouse.h"
|
||||
#include "libx52io.h"
|
||||
#include <daemon/constants.h>
|
||||
#include <daemon/config.h>
|
||||
#include <daemon/io.h>
|
||||
#include <daemon/mouse.h>
|
||||
#include <libx52/libx52io.h>
|
||||
|
||||
#define PINELOG_MODULE X52D_MOD_IO
|
||||
#include "pinelog.h"
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
|
|
@ -15,9 +15,9 @@
|
|||
|
||||
#define PINELOG_MODULE X52D_MOD_LED
|
||||
#include "pinelog.h"
|
||||
#include "x52d_config.h"
|
||||
#include "x52d_const.h"
|
||||
#include "x52d_device.h"
|
||||
#include <daemon/config.h>
|
||||
#include <daemon/constants.h>
|
||||
#include <daemon/device.h>
|
||||
|
||||
#define SET_LED_STATE(led, state) \
|
||||
PINELOG_TRACE("Setting LED %s state to %s (%d)", \
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
|
|
@ -17,16 +17,16 @@
|
|||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "x52d_clock.h"
|
||||
#include "x52d_const.h"
|
||||
#include "x52d_config.h"
|
||||
#include "x52d_device.h"
|
||||
#include "x52d_io.h"
|
||||
#include "x52d_mouse.h"
|
||||
#include "x52d_command.h"
|
||||
#include "x52d_notify.h"
|
||||
#include "x52dcomm-internal.h"
|
||||
#include "x52dcomm.h"
|
||||
#include <daemon/clock.h>
|
||||
#include <daemon/constants.h>
|
||||
#include <daemon/config.h>
|
||||
#include <daemon/device.h>
|
||||
#include <daemon/io.h>
|
||||
#include <daemon/mouse.h>
|
||||
#include <daemon/command.h>
|
||||
#include <daemon/notify.h>
|
||||
#include <daemon/x52dcomm-internal.h>
|
||||
#include <libx52/x52dcomm.h>
|
||||
#include "pinelog.h"
|
||||
|
||||
static volatile int flag_quit;
|
||||
|
|
@ -1,41 +1,47 @@
|
|||
# x52d
|
||||
# x52d (dep_config_h: Meson build-config.h; private API is daemon/config.h)
|
||||
libx52dcomm_version = '1.0.0'
|
||||
|
||||
libx52dcomm_sources = [
|
||||
'x52d_comm_client.c',
|
||||
'x52d_comm_internal.c'
|
||||
'comm_client.c',
|
||||
'comm_internal.c'
|
||||
]
|
||||
|
||||
install_headers('x52dcomm.h', subdir: meson.project_name())
|
||||
|
||||
lib_libx52dcomm = library('x52dcomm', libx52dcomm_sources,
|
||||
dependencies: [dep_intl],
|
||||
dependencies: [dep_intl, dep_config_h],
|
||||
version: libx52dcomm_version,
|
||||
c_args: sym_hidden_cargs,
|
||||
install: true,
|
||||
include_directories: includes)
|
||||
|
||||
pkgconfig.generate(lib_libx52dcomm,
|
||||
name: 'x52dcomm',
|
||||
description: 'Client library for communicating with the x52d X52 daemon.',
|
||||
version: libx52dcomm_version,
|
||||
)
|
||||
|
||||
x52d_sources = [
|
||||
'x52d_main.c',
|
||||
'x52d_config_parser.c',
|
||||
'x52d_config_dump.c',
|
||||
'x52d_config.c',
|
||||
'x52d_device.c',
|
||||
'x52d_client.c',
|
||||
'x52d_clock.c',
|
||||
'x52d_mouse.c',
|
||||
'x52d_notify.c',
|
||||
'x52d_led.c',
|
||||
'x52d_command.c',
|
||||
'x52d_io.c',
|
||||
'x52d_mouse_handler.c',
|
||||
'main.c',
|
||||
'config_parser.c',
|
||||
'config_dump.c',
|
||||
'config.c',
|
||||
'device.c',
|
||||
'client.c',
|
||||
'clock.c',
|
||||
'mouse.c',
|
||||
'notify.c',
|
||||
'led.c',
|
||||
'command.c',
|
||||
'io.c',
|
||||
'mouse_handler.c',
|
||||
]
|
||||
|
||||
dep_threads = dependency('threads')
|
||||
|
||||
# Comm sources are compiled into x52d (same as Autotools); libx52dcomm is only for x52ctl.
|
||||
x52d_linkwith = [lib_libx52, lib_vkm, lib_libx52io]
|
||||
x52d_deps = [dep_pinelog, dep_inih, dep_threads, dep_math, dep_intl]
|
||||
x52d_deps = [dep_pinelog, dep_inih, dep_threads, dep_math, dep_intl, dep_config_h]
|
||||
x52d_cflags = []
|
||||
|
||||
exe_x52d = executable('x52d', x52d_sources + libx52dcomm_sources,
|
||||
|
|
@ -45,9 +51,9 @@ exe_x52d = executable('x52d', x52d_sources + libx52dcomm_sources,
|
|||
dependencies: x52d_deps,
|
||||
link_with: x52d_linkwith)
|
||||
|
||||
exe_x52ctl = executable('x52ctl', 'x52ctl.c',
|
||||
exe_x52ctl = executable('x52ctl', 'daemon_control.c',
|
||||
install: true,
|
||||
dependencies: [dep_intl],
|
||||
dependencies: [dep_intl, dep_config_h],
|
||||
include_directories: includes,
|
||||
link_with: lib_libx52dcomm)
|
||||
|
||||
|
|
@ -57,10 +63,10 @@ install_data('x52d.conf',
|
|||
test('daemon-communication', files('test_daemon_comm.py')[0],
|
||||
depends: [exe_x52d, exe_x52ctl], protocol: 'tap')
|
||||
|
||||
x52d_mouse_test_sources = ['x52d_mouse_test.c', 'x52d_mouse.c']
|
||||
x52d_mouse_test_sources = ['mouse_test.c', 'mouse.c']
|
||||
x52d_mouse_test = executable('x52d-mouse-test', x52d_mouse_test_sources,
|
||||
include_directories: includes,
|
||||
dependencies: [dep_pinelog, dep_cmocka, dep_intl, dep_math])
|
||||
dependencies: [dep_pinelog, dep_cmocka, dep_intl, dep_math, dep_config_h])
|
||||
|
||||
test('x52d-mouse-test', x52d_mouse_test, protocol: 'tap')
|
||||
|
||||
|
|
|
|||
|
|
@ -6,16 +6,16 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
#include <math.h>
|
||||
|
||||
#define PINELOG_MODULE X52D_MOD_MOUSE
|
||||
#include "pinelog.h"
|
||||
#include "x52d_config.h"
|
||||
#include "x52d_const.h"
|
||||
#include "x52d_mouse.h"
|
||||
#include <daemon/config.h>
|
||||
#include <daemon/constants.h>
|
||||
#include <daemon/mouse.h>
|
||||
|
||||
// Mouse speed is the delay in microseconds between subsequent mouse reports
|
||||
#define DEFAULT_MOUSE_DELAY 70000
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
#define X52D_MOUSE_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "libx52io.h"
|
||||
#include <libx52/libx52io.h>
|
||||
|
||||
extern volatile bool mouse_isometric_mode;
|
||||
extern volatile int mouse_scroll_dir;
|
||||
|
|
@ -6,21 +6,21 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "libx52io.h"
|
||||
#include "vkm.h"
|
||||
#include <libx52/libx52io.h>
|
||||
#include <vkm/vkm.h>
|
||||
|
||||
#define PINELOG_MODULE X52D_MOD_MOUSE
|
||||
#include "pinelog.h"
|
||||
#include "x52d_config.h"
|
||||
#include "x52d_const.h"
|
||||
#include "x52d_mouse.h"
|
||||
#include <daemon/config.h>
|
||||
#include <daemon/constants.h>
|
||||
#include <daemon/mouse.h>
|
||||
|
||||
static pthread_t mouse_thr;
|
||||
static bool mouse_thr_enabled = false;
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
|
@ -15,9 +15,9 @@
|
|||
|
||||
#define PINELOG_MODULE X52D_MOD_MOUSE
|
||||
#include "pinelog.h"
|
||||
#include "x52d_config.h"
|
||||
#include "x52d_const.h"
|
||||
#include "x52d_mouse.h"
|
||||
#include <daemon/config.h>
|
||||
#include <daemon/constants.h>
|
||||
#include <daemon/mouse.h>
|
||||
|
||||
/* Stub for handler */
|
||||
void x52d_mouse_thread_control(bool enabled)
|
||||
|
|
@ -44,7 +44,7 @@ static void test_mouse_thread_disabled(void **state)
|
|||
x52d_cfg_set_Mouse_Enabled(false);
|
||||
}
|
||||
|
||||
/* The following tests are dependent on the values in x52d_mouse.c */
|
||||
/* The following tests are dependent on the values in mouse.c */
|
||||
static void test_mouse_speed_negative(void **state)
|
||||
{
|
||||
(void)state;
|
||||
|
|
@ -13,11 +13,11 @@
|
|||
|
||||
#define PINELOG_MODULE X52D_MOD_NOTIFY
|
||||
#include "pinelog.h"
|
||||
#include "x52d_const.h"
|
||||
#include "x52d_notify.h"
|
||||
#include "x52d_client.h"
|
||||
#include "x52dcomm.h"
|
||||
#include "x52dcomm-internal.h"
|
||||
#include <daemon/constants.h>
|
||||
#include <daemon/notify.h>
|
||||
#include <daemon/client.h>
|
||||
#include <libx52/x52dcomm.h>
|
||||
#include <daemon/x52dcomm-internal.h>
|
||||
|
||||
static pthread_t notify_thr;
|
||||
static pthread_t notify_listen;
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
# Automake for documentation
|
||||
#
|
||||
# Copyright (C) 2021 Nirenjan Krishnan (nirenjan@nirenjan.org)
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
|
||||
EXTRA_DIST += \
|
||||
docs/main.dox \
|
||||
docs/caveats.dox \
|
||||
docs/integration.dox
|
||||
|
|
@ -13,10 +13,9 @@ up the list of devices manually and simulate various scenarios.
|
|||
|
||||
# Design Overview
|
||||
|
||||
Unfortunately, the automake infrastructure does not support the use of
|
||||
LD_PRELOAD because it is deemed "non-portable" in the automake sense. As a
|
||||
result, this is now up to a test runner application to implement a method to
|
||||
control the data passed between two processes.
|
||||
The build system does not wire up `LD_PRELOAD` for this library: using it is
|
||||
left to the test runner, which must arrange for the stub to be preloaded and
|
||||
control the data passed between processes.
|
||||
|
||||
# Data Structures
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ to a supported joystick. This function must be called after \ref libx52_init
|
|||
<b>Example Initialization/Deinitialization Code</b>
|
||||
|
||||
@code{.c}
|
||||
#include <libx52.h>
|
||||
#include <libx52/libx52.h>
|
||||
|
||||
libx52_device* init_libx52(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -45,10 +45,10 @@ with your application.
|
|||
See the documentation for the following files for a complete list of all
|
||||
functions.
|
||||
|
||||
- libx52.h
|
||||
- libx52io.h
|
||||
- libx52util.h
|
||||
- vkm.h
|
||||
- x52dcomm.h
|
||||
- libx52/libx52.h
|
||||
- libx52/libx52io.h
|
||||
- libx52/libx52util.h
|
||||
- vkm/vkm.h
|
||||
- libx52/x52dcomm.h
|
||||
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
# Automake for x52evtest
|
||||
#
|
||||
# Copyright (C) 2012-2020 Nirenjan Krishnan (nirenjan@nirenjan.org)
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
|
||||
bin_PROGRAMS += x52evtest
|
||||
|
||||
# Event test utility that works similarly to the Linux evtest
|
||||
x52evtest_SOURCES = evtest/ev_test.c
|
||||
x52evtest_CFLAGS = -I $(top_srcdir)/libx52io -I $(top_srcdir) -DLOCALEDIR=\"$(localedir)\" $(WARN_CFLAGS)
|
||||
x52evtest_LDFLAGS = $(WARN_LDFLAGS)
|
||||
x52evtest_LDADD = libx52io.la
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include "libx52io.h"
|
||||
#include <libx52/libx52io.h>
|
||||
#include "gettext.h"
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
# Automake for x52test
|
||||
#
|
||||
# Copyright (C) 2012-2018 Nirenjan Krishnan (nirenjan@nirenjan.org)
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
|
||||
bin_PROGRAMS += x52test
|
||||
|
||||
# Test utility that exercises all the library functions
|
||||
x52test_SOURCES = \
|
||||
joytest/x52_test.c \
|
||||
joytest/x52_test_mfd.c \
|
||||
joytest/x52_test_led.c \
|
||||
joytest/x52_test_clock.c
|
||||
x52test_CFLAGS = -I $(top_srcdir)/libx52 -I $(top_srcdir) -DLOCALEDIR=\"$(localedir)\" $(WARN_CFLAGS)
|
||||
x52test_LDFLAGS = $(WARN_LDFLAGS)
|
||||
x52test_LDADD = libx52.la
|
||||
|
||||
# Extra files that need to be in the distribution
|
||||
EXTRA_DIST += joytest/x52_test_common.h
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
#include <locale.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "libx52.h"
|
||||
#include <libx52/libx52.h>
|
||||
#include "x52_test_common.h"
|
||||
libx52_device *dev;
|
||||
int test_exit;
|
||||
|
|
|
|||
|
|
@ -7,13 +7,13 @@
|
|||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "libx52.h"
|
||||
#include <libx52/libx52.h>
|
||||
#include "x52_test_common.h"
|
||||
|
||||
int test_clock(void)
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@
|
|||
#ifndef X52_TEST_COMMON_H
|
||||
#define X52_TEST_COMMON_H
|
||||
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
#include "libx52.h"
|
||||
#include <libx52/libx52.h>
|
||||
#include "gettext.h"
|
||||
|
||||
extern libx52_device *dev;
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@
|
|||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "libx52.h"
|
||||
#include <libx52/libx52.h>
|
||||
#include "x52_test_common.h"
|
||||
|
||||
#define TEST_LED(name, state) do { \
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@
|
|||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "libx52.h"
|
||||
#include <libx52/libx52.h>
|
||||
#include "x52_test_common.h"
|
||||
|
||||
#define TEST_BRIGHTNESS(mfd, value) TEST(brightness, mfd, value)
|
||||
|
|
|
|||
|
|
@ -18,8 +18,7 @@ and therefore, do not require this driver.
|
|||
|
||||
# Building
|
||||
|
||||
This directory is deliberately not integrated with the top level Autotools
|
||||
based build framework.
|
||||
This directory is deliberately not integrated with the top-level Meson build.
|
||||
|
||||
Install the Linux headers for the currently running kernel. On Ubuntu, this
|
||||
can be done by running `sudo apt-get install -y linux-headers-$(uname -r)`.
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
# Automake for libusbx52 and associated utilities
|
||||
#
|
||||
# Copyright (C) 2012-2018 Nirenjan Krishnan (nirenjan@nirenjan.org)
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
|
||||
# libusb stub library for use by test programs
|
||||
check_LTLIBRARIES += libusbx52.la
|
||||
|
||||
libusbx52_la_SOURCES = libusbx52/usb_x52_stub.c libusbx52/fopen_env.c
|
||||
libusbx52_la_CFLAGS = -I $(top_srcdir)/libusbx52 @LIBUSB_CFLAGS@ $(WARN_CFLAGS)
|
||||
libusbx52_la_LDFLAGS = -rpath /nowhere -module $(WARN_LDFLAGS)
|
||||
|
||||
# Utility programs for use by tests
|
||||
check_PROGRAMS += x52test_create_device_list x52test_log_actions
|
||||
|
||||
x52test_create_device_list_SOURCES = libusbx52/util/create_device_list.c $(libusbx52_la_SOURCES)
|
||||
x52test_create_device_list_CFLAGS = $(libusbx52_la_CFLAGS)
|
||||
x52test_create_device_list_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
x52test_log_actions_SOURCES = libusbx52/util/log_actions.c $(libusbx52_la_SOURCES)
|
||||
x52test_log_actions_CFLAGS = -I $(top_srcdir)/libx52 $(libusbx52_la_CFLAGS)
|
||||
x52test_log_actions_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
EXTRA_DIST += libusbx52/README.md libusbx52/libusbx52.h
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include "libusbx52.h"
|
||||
#include "x52_commands.h"
|
||||
#include "commands.h"
|
||||
|
||||
libusb_context *global_context;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,74 +0,0 @@
|
|||
# Automake for libx52
|
||||
#
|
||||
# Copyright (C) 2012-2018 Nirenjan Krishnan (nirenjan@nirenjan.org)
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
|
||||
lib_LTLIBRARIES += libx52.la
|
||||
|
||||
# Core libx52 library
|
||||
# This library handles the USB communication between the host and the X52
|
||||
# Libtool Version Info
|
||||
# See: https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
|
||||
libx52_v_CUR=6
|
||||
libx52_v_AGE=4
|
||||
libx52_v_REV=2
|
||||
libx52_la_SOURCES = \
|
||||
libx52/x52_control.c \
|
||||
libx52/x52_core.c \
|
||||
libx52/x52_date_time.c \
|
||||
libx52/x52_mfd_led.c \
|
||||
libx52/x52_strerror.c \
|
||||
libx52/x52_stringify.c
|
||||
libx52_la_CFLAGS = \
|
||||
@LIBUSB_CFLAGS@ \
|
||||
-DLOCALEDIR=\"$(localedir)\" \
|
||||
-I $(top_srcdir) \
|
||||
$(VISIBILITY_CFLAGS) \
|
||||
$(WARN_CFLAGS)
|
||||
libx52_la_LDFLAGS = \
|
||||
-export-symbols-regex '^libx52_' \
|
||||
-version-info $(libx52_v_CUR):$(libx52_v_REV):$(libx52_v_AGE) @LIBUSB_LIBS@ \
|
||||
$(WARN_LDFLAGS)
|
||||
libx52_la_LIBADD = @LTLIBINTL@
|
||||
|
||||
# Header files that need to be copied
|
||||
x52include_HEADERS += libx52/libx52.h
|
||||
|
||||
# pkg-config files
|
||||
pkgconfig_DATA += libx52/libx52.pc
|
||||
|
||||
if HAVE_CMOCKA
|
||||
TESTS += libx52test libx52-string-test
|
||||
check_PROGRAMS += libx52test libx52-string-test
|
||||
|
||||
nodist_libx52test_SOURCES = libx52/test_libx52.c
|
||||
libx52test_SOURCES = $(libx52_la_SOURCES)
|
||||
libx52test_CFLAGS = @CMOCKA_CFLAGS@ @LIBUSB_CFLAGS@ -DLOCALEDIR='"$(localedir)"' -I $(top_srcdir) -I $(top_srcdir)/libx52
|
||||
libx52test_CFLAGS += -Dlibusb_control_transfer=__wrap_libusb_control_transfer
|
||||
libx52test_LDFLAGS = @CMOCKA_LIBS@ @LIBUSB_LIBS@
|
||||
libx52test_LDADD = libx52.la
|
||||
|
||||
CLEANFILES += libx52/test_libx52.c
|
||||
test_libx52_c_DEPENDS = \
|
||||
$(srcdir)/libx52/x52_test_gen.py \
|
||||
$(srcdir)/libx52/x52_tests.json
|
||||
|
||||
libx52/test_libx52.c: $(test_libx52_c_DEPENDS)
|
||||
$(AM_V_GEN) $(PYTHON) $(test_libx52_c_DEPENDS) > $@
|
||||
|
||||
libx52_string_test_SOURCES = \
|
||||
libx52/test_strings.c \
|
||||
libx52/x52_stringify.c \
|
||||
libx52/x52_strerror.c
|
||||
libx52_string_test_CFLAGS = @CMOCKA_CFLAGS@ -I $(top_srcdir) -I $(top_srcdir)/libx52
|
||||
libx52_string_test_LDFLAGS = @CMOCKA_LIBS@
|
||||
libx52_string_test_LDADD = libx52.la
|
||||
endif
|
||||
|
||||
# Extra files that need to be in the distribution
|
||||
EXTRA_DIST += \
|
||||
libx52/libx52.h libx52/x52_commands.h libx52/x52_common.h libx52/README.md
|
||||
|
||||
# Add test files to the distribution
|
||||
EXTRA_DIST += libx52/x52_test_gen.py libx52/x52_tests.json
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <libusb.h>
|
||||
#include "libx52.h"
|
||||
#include <libx52/libx52.h>
|
||||
|
||||
/*
|
||||
* The X52 MFD supports the following:
|
||||
|
|
@ -6,16 +6,16 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "libx52.h"
|
||||
#include "x52_commands.h"
|
||||
#include "x52_common.h"
|
||||
#include <libx52/libx52.h>
|
||||
#include "commands.h"
|
||||
#include "common.h"
|
||||
|
||||
/* Translate a libusb error to a libx52 error */
|
||||
int _x52_translate_libusb_error(enum libusb_error errcode)
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
|
@ -14,9 +14,9 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "usb-ids.h"
|
||||
#include "libx52.h"
|
||||
#include "x52_commands.h"
|
||||
#include "x52_common.h"
|
||||
#include <libx52/libx52.h>
|
||||
#include "commands.h"
|
||||
#include "common.h"
|
||||
#include "gettext.h"
|
||||
|
||||
/* Check if the USB device is supported by this library */
|
||||
|
|
@ -7,16 +7,16 @@
|
|||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "libx52.h"
|
||||
#include "x52_commands.h"
|
||||
#include "x52_common.h"
|
||||
#include <libx52/libx52.h>
|
||||
#include "commands.h"
|
||||
#include "common.h"
|
||||
|
||||
#if !HAVE_STRUCT_TM_TM_GMTOFF
|
||||
/* Slow method to compute GMT offset */
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: libx52
|
||||
Description: Linux/Unix library to control Saitek X52/X52Pro joystick extended functionality.
|
||||
Version: 2.4.0
|
||||
Libs: -L${libdir} -lx52
|
||||
Cflags: -I${includedir}/libx52
|
||||
Requires.private: @LIBUSB_PC@
|
||||
|
|
@ -0,0 +1 @@
|
|||
../libx52io/libx52io.h
|
||||
|
|
@ -0,0 +1 @@
|
|||
../libx52util/libx52util.h
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
libx52_version = '2.4.2'
|
||||
|
||||
libx52_files = files(
|
||||
'x52_control.c',
|
||||
'x52_core.c',
|
||||
'x52_date_time.c',
|
||||
'x52_mfd_led.c',
|
||||
'x52_strerror.c',
|
||||
'x52_stringify.c',
|
||||
'control.c',
|
||||
'core.c',
|
||||
'date_time.c',
|
||||
'mfd_led.c',
|
||||
'strerror.c',
|
||||
'stringify.c',
|
||||
)
|
||||
|
||||
lib_libx52 = library('x52', libx52_files,
|
||||
|
|
@ -20,14 +20,13 @@ install_headers('libx52.h', subdir: meson.project_name())
|
|||
pkgconfig.generate(lib_libx52,
|
||||
name: 'libx52',
|
||||
description: 'Linux/Unix library to control Saitek X52/X52Pro joystick extended functionality.',
|
||||
subdirs: meson.project_name(),
|
||||
version: libx52_version)
|
||||
|
||||
# Unit tests for libx52
|
||||
libx52_string_test = executable('libx52-string-test',
|
||||
'test_strings.c',
|
||||
'x52_stringify.c',
|
||||
'x52_strerror.c',
|
||||
'stringify.c',
|
||||
'strerror.c',
|
||||
build_by_default: false,
|
||||
dependencies: [dep_cmocka, dep_intl],
|
||||
link_with: [lib_libx52],
|
||||
|
|
|
|||
|
|
@ -6,14 +6,14 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "x52_common.h"
|
||||
#include "common.h"
|
||||
|
||||
int libx52_set_text(libx52_device *x52, uint8_t line, const char *text, uint8_t length)
|
||||
{
|
||||
|
|
@ -6,10 +6,10 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include "libx52.h"
|
||||
#include <libx52/libx52.h>
|
||||
#include "gettext.h"
|
||||
|
||||
#define N_(str) gettext_noop(str)
|
||||
|
|
@ -6,10 +6,10 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include "libx52.h"
|
||||
#include <libx52/libx52.h>
|
||||
#include "gettext.h"
|
||||
|
||||
#define N_(str) gettext_noop(str)
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "libx52.h"
|
||||
#include <libx52/libx52.h>
|
||||
|
||||
#define TEST_STRINGIFY(name) do { \
|
||||
char expected[256]; \
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ _TEST_FILE_HEADER = """/*
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "x52_common.h"
|
||||
#include "common.h"
|
||||
|
||||
static int group_setup(void **state)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
../daemon/x52dcomm.h
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
# Automake for libx52io
|
||||
#
|
||||
# Copyright (C) 2012-2020 Nirenjan Krishnan (nirenjan@nirenjan.org)
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
|
||||
lib_LTLIBRARIES += libx52io.la
|
||||
|
||||
# X52 IO library
|
||||
# This library handles the HID parsing of the X52 USB reports
|
||||
# Libtool Version Info
|
||||
# See: https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
|
||||
libx52io_v_CUR=1
|
||||
libx52io_v_AGE=0
|
||||
libx52io_v_REV=0
|
||||
libx52io_la_SOURCES = \
|
||||
libx52io/io_core.c \
|
||||
libx52io/io_axis.c \
|
||||
libx52io/io_parser.c \
|
||||
libx52io/io_strings.c \
|
||||
libx52io/io_device.c
|
||||
libx52io_la_CFLAGS = @HIDAPI_CFLAGS@ -DLOCALEDIR=\"$(localedir)\" -I $(top_srcdir) $(VISIBILITY_CFLAGS) $(WARN_CFLAGS)
|
||||
libx52io_la_LDFLAGS = \
|
||||
-export-symbols-regex '^libx52io_' \
|
||||
-version-info $(libx52io_v_CUR):$(libx52io_v_REV):$(libx52io_v_AGE) @HIDAPI_LIBS@ \
|
||||
$(WARN_LDFLAGS)
|
||||
libx52io_la_LIBADD = @LTLIBINTL@
|
||||
|
||||
# Header files that need to be copied
|
||||
x52include_HEADERS += libx52io/libx52io.h
|
||||
|
||||
# pkg-config files
|
||||
pkgconfig_DATA += libx52io/libx52io.pc
|
||||
|
||||
if HAVE_CMOCKA
|
||||
TESTS += test-axis test-parser
|
||||
check_PROGRAMS += test-axis test-parser
|
||||
|
||||
test_axis_SOURCES = libx52io/test_axis.c $(libx52io_la_SOURCES)
|
||||
test_axis_CFLAGS = @CMOCKA_CFLAGS@ $(libx52io_la_CFLAGS)
|
||||
test_axis_LDFLAGS = @CMOCKA_LIBS@ @HIDAPI_LIBS@ $(WARN_LDFLAGS)
|
||||
test_axis_LDADD = @LTLIBINTL@
|
||||
|
||||
test_parser_SOURCES = libx52io/test_parser.c $(libx52io_la_SOURCES)
|
||||
test_parser_CFLAGS = @CMOCKA_CFLAGS@ $(libx52io_la_CFLAGS)
|
||||
test_parser_LDFLAGS = @CMOCKA_LIBS@ @HIDAPI_LIBS@ $(WARN_LDFLAGS)
|
||||
test_parser_LDADD = @LTLIBINTL@
|
||||
|
||||
# Add a dependency on test_parser_tests.c
|
||||
libx52io/test_parser.c: libx52io/test_parser_tests.c
|
||||
endif
|
||||
|
||||
# Extra files that need to be in the distribution
|
||||
EXTRA_DIST += \
|
||||
libx52io/libx52io.h \
|
||||
libx52io/io_common.h \
|
||||
libx52io/test_parser_tests.c
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include "io_common.h"
|
||||
#include "common.h"
|
||||
#include "usb-ids.h"
|
||||
|
||||
static const int32_t axis_min[] = {
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
#define IO_COMMON_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "libx52io.h"
|
||||
#include <libx52/libx52io.h>
|
||||
#include "hidapi.h"
|
||||
|
||||
// Function handler for parsing reports
|
||||
|
|
@ -6,10 +6,10 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "io_common.h"
|
||||
#include "common.h"
|
||||
#include "usb-ids.h"
|
||||
#include "gettext.h"
|
||||
|
||||
|
|
@ -6,11 +6,11 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "io_common.h"
|
||||
#include "common.h"
|
||||
|
||||
static char * _save_string(wchar_t *wcs)
|
||||
{
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: libx52io
|
||||
Description: Linux/Unix library to read and parse X52 input
|
||||
Version: 1.0.0
|
||||
Libs: -L${libdir} -lx52io
|
||||
Cflags: -I${includedir}/libx52
|
||||
Requires.private: @HIDAPI_PC@
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
libx52io_version = '1.1.0'
|
||||
|
||||
libx52io_files = files(
|
||||
'io_core.c',
|
||||
'io_axis.c',
|
||||
'io_parser.c',
|
||||
'io_strings.c',
|
||||
'io_device.c',
|
||||
'core.c',
|
||||
'axis.c',
|
||||
'parser.c',
|
||||
'strings.c',
|
||||
'device.c',
|
||||
)
|
||||
|
||||
lib_libx52io = library('x52io', libx52io_files,
|
||||
|
|
@ -19,7 +19,6 @@ install_headers('libx52io.h', subdir: meson.project_name())
|
|||
pkgconfig.generate(lib_libx52io,
|
||||
name: 'libx52io',
|
||||
description: 'Linux/Unix library to read and parse X52 input',
|
||||
subdirs: meson.project_name(),
|
||||
version: libx52io_version,
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include "io_common.h"
|
||||
#include "common.h"
|
||||
#include "usb-ids.h"
|
||||
|
||||
static void map_hat(uint8_t hat, libx52io_report *report)
|
||||
|
|
@ -6,10 +6,10 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "libx52io.h"
|
||||
#include <libx52/libx52io.h>
|
||||
#include "gettext.h"
|
||||
|
||||
/* The strings corresponding to the axis and button enumerations are
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
#include <setjmp.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
#include "io_common.h"
|
||||
#include "common.h"
|
||||
#include "usb-ids.h"
|
||||
|
||||
static int group_setup(void **state)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include <setjmp.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
#include "libx52io.h"
|
||||
#include <libx52/libx52io.h>
|
||||
|
||||
static void lower_ascii_only(char *dst, const char *src)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
#include <cmocka.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "io_common.h"
|
||||
#include "common.h"
|
||||
#include "usb-ids.h"
|
||||
|
||||
static int group_setup(void **state)
|
||||
|
|
|
|||
|
|
@ -1,50 +0,0 @@
|
|||
# Automake for libx52util
|
||||
#
|
||||
# Copyright (C) 2012-2018 Nirenjan Krishnan (nirenjan@nirenjan.org)
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
|
||||
lib_LTLIBRARIES += libx52util.la
|
||||
|
||||
# libx52 utility library
|
||||
# This library provides extra utilities for ease of use
|
||||
nodist_libx52util_la_SOURCES = libx52util/util_char_map.c
|
||||
libx52util_la_SOURCES = libx52util/x52_char_map_lookup.c
|
||||
libx52util_la_CFLAGS = -I $(top_srcdir)/libx52util $(VISIBILITY_CFLAGS) $(WARN_CFLAGS)
|
||||
libx52util_la_LDFLAGS = \
|
||||
-export-symbols-regex '^libx52util_' \
|
||||
-version-info 1:1:0 \
|
||||
$(WARN_LDFLAGS)
|
||||
|
||||
# Header files that need to be copied
|
||||
x52include_HEADERS += libx52util/libx52util.h
|
||||
|
||||
# pkg-config files
|
||||
pkgconfig_DATA += libx52util/libx52util.pc
|
||||
|
||||
# Autogenerated file that needs to be cleaned up
|
||||
char_map_TARGETS = \
|
||||
libx52util/util_char_map.c \
|
||||
libx52util/x52_char_map.bin
|
||||
|
||||
CLEANFILES += $(char_map_TARGETS)
|
||||
|
||||
char_map_DEPENDS = \
|
||||
$(srcdir)/libx52util/x52_char_map_gen.py \
|
||||
$(srcdir)/libx52util/x52_char_map.cfg
|
||||
|
||||
$(char_map_TARGETS): $(char_map_DEPENDS)
|
||||
$(AM_V_GEN) $(PYTHON) $(char_map_DEPENDS) $(char_map_TARGETS)
|
||||
|
||||
TESTS += libx52util/test-runner.sh
|
||||
|
||||
check_PROGRAMS += libx52util-bmp-test
|
||||
libx52util_bmp_test_SOURCES = libx52util/x52_char_map_test.c
|
||||
libx52util_bmp_test_CFLAGS = -I $(top_srcdir)/libx52util
|
||||
libx52util_bmp_test_LDADD = libx52util.la
|
||||
|
||||
# Extra files that need to be in the distribution
|
||||
EXTRA_DIST += libx52util/x52_char_map.cfg \
|
||||
libx52util/x52_char_map.h \
|
||||
libx52util/x52_char_map_gen.py
|
||||
|
||||
|
|
@ -6,8 +6,8 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
*/
|
||||
|
||||
#ifndef X52_CHAR_MAP_H
|
||||
#define X52_CHAR_MAP_H
|
||||
#ifndef CHAR_MAP_H
|
||||
#define CHAR_MAP_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
|
@ -15,4 +15,4 @@
|
|||
extern const uint16_t *root_table[256];
|
||||
extern const uint8_t *sequence_table[];
|
||||
|
||||
#endif /* !defined X52_CHAR_MAP_H */
|
||||
#endif /* !defined CHAR_MAP_H */
|
||||
|
|
@ -9,13 +9,13 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "build-config.h"
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "libx52util.h"
|
||||
#include "x52_char_map.h"
|
||||
#include <libx52/libx52util.h>
|
||||
#include "char_map.h"
|
||||
|
||||
/**
|
||||
* @brief Converts a UTF8 stream to a uint32_t
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "libx52util.h"
|
||||
#include <libx52/libx52util.h>
|
||||
|
||||
// Fix this if we ever hit longer sequences
|
||||
#define RECORD_SIZE 8
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: libx52util
|
||||
Description: Extra utility functions to manage X52 extended functionality
|
||||
Version: 1.0.0
|
||||
Libs: -L${libdir} -lx52util
|
||||
Cflags: -I${includedir}/libx52
|
||||
|
|
@ -7,9 +7,9 @@ util_char_map = custom_target('util-char-map',
|
|||
depend_files: ['x52_char_map_gen.py', 'x52_char_map.cfg'],
|
||||
command: [python, gen_script, '@INPUT@', '@OUTPUT0@', '@OUTPUT1@'],
|
||||
input: 'x52_char_map.cfg',
|
||||
output: ['util_char_map.c', 'x52_char_map.bin'])
|
||||
output: ['char_map.c', 'char_map.bin'])
|
||||
|
||||
lib_libx52util = library('x52util', util_char_map, 'x52_char_map_lookup.c',
|
||||
lib_libx52util = library('x52util', util_char_map, 'char_map_lookup.c',
|
||||
install: true,
|
||||
version: libx52util_version,
|
||||
c_args: sym_hidden_cargs,
|
||||
|
|
@ -20,13 +20,12 @@ install_headers('libx52util.h', subdir: meson.project_name())
|
|||
pkgconfig.generate(lib_libx52util,
|
||||
name: 'libx52util',
|
||||
description: 'Extra utility functions to manage X52 extended functionality',
|
||||
subdirs: meson.project_name(),
|
||||
version: libx52util_version,
|
||||
)
|
||||
|
||||
libx52util_bmp_test = executable(
|
||||
'libx52util-bmp-test',
|
||||
'x52_char_map_test.c',
|
||||
'char_map_test.c',
|
||||
build_by_default: false,
|
||||
include_directories: [includes, lib_libx52util.private_dir_include()],
|
||||
link_with: [lib_libx52util]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
TEST_RUNNER="./libx52util-bmp-test"
|
||||
TEST_BIN="./libx52util/x52_char_map.bin"
|
||||
TEST_BIN="./libx52util/char_map.bin"
|
||||
|
||||
if [ -e "${TEST_RUNNER}" ] && [ -e "${TEST_BIN}" ];
|
||||
then
|
||||
|
|
|
|||
15
meson.build
15
meson.build
|
|
@ -36,7 +36,7 @@ pyversion = python.language_version().split('.')
|
|||
assert(pyversion[1].to_int() >= 5, 'Require Python >= 3.5')
|
||||
|
||||
#######################################################################
|
||||
# config.h
|
||||
# build-config.h (Meson configuration; template is config.h.meson)
|
||||
#######################################################################
|
||||
compiler = meson.get_compiler('c')
|
||||
sym_hidden_cargs = []
|
||||
|
|
@ -59,10 +59,12 @@ cdata.set10('HAVE_STRUCT_TM_TM_GMTOFF',
|
|||
|
||||
config_h = configure_file(
|
||||
input: 'config.h.meson',
|
||||
output: 'config.h',
|
||||
output: 'build-config.h',
|
||||
configuration: cdata
|
||||
)
|
||||
|
||||
dep_config_h = declare_dependency(sources: config_h)
|
||||
|
||||
#######################################################################
|
||||
# Internationalization
|
||||
#######################################################################
|
||||
|
|
@ -101,11 +103,14 @@ dep_math = compiler.find_library('m', required: false)
|
|||
#######################################################################
|
||||
|
||||
# pinelog
|
||||
pinelog_options = []
|
||||
pinelog_options = [
|
||||
# Keep directory prefix in __FILE__ for logs (e.g. libx52/core.c vs libx52io/core.c).
|
||||
'strip-file-path=false',
|
||||
]
|
||||
if dep_systemd.found() and not get_option('systemd-logs').disabled()
|
||||
# If systemd logs is enabled or auto, and systemd is found, then hide
|
||||
# the timestamps in log messages
|
||||
pinelog_options = ['show-date=false']
|
||||
pinelog_options += ['show-date=false']
|
||||
endif
|
||||
|
||||
sub_pinelog = subproject('pinelog', required: true,
|
||||
|
|
@ -120,7 +125,7 @@ dep_inih = dependency('inih')
|
|||
# Shared libraries and programs
|
||||
#######################################################################
|
||||
# Includes
|
||||
includes = include_directories('.', 'libx52', 'libx52io', 'libx52util', 'vkm')
|
||||
includes = include_directories('.')
|
||||
|
||||
subdir('libx52')
|
||||
subdir('libx52io')
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
# List of source files which contain translatable strings.
|
||||
libx52/x52_strerror.c
|
||||
libx52/x52_stringify.c
|
||||
libx52/strerror.c
|
||||
libx52/stringify.c
|
||||
|
||||
libx52io/io_strings.c
|
||||
libx52io/strings.c
|
||||
|
||||
vkm/vkm_common.c
|
||||
vkm/common.c
|
||||
|
||||
evtest/ev_test.c
|
||||
|
||||
|
|
@ -14,16 +14,16 @@ joytest/x52_test_common.h
|
|||
joytest/x52_test_led.c
|
||||
joytest/x52_test_mfd.c
|
||||
|
||||
daemon/x52d_main.c
|
||||
daemon/x52d_client.c
|
||||
daemon/x52d_clock.c
|
||||
daemon/x52d_command.c
|
||||
daemon/x52d_config.c
|
||||
daemon/x52d_config_dump.c
|
||||
daemon/x52d_config_parser.c
|
||||
daemon/x52d_device.c
|
||||
daemon/x52d_io.c
|
||||
daemon/x52d_mouse.c
|
||||
daemon/x52d_mouse_handler.c
|
||||
daemon/x52d_notify.c
|
||||
daemon/x52ctl.c
|
||||
daemon/client.c
|
||||
daemon/clock.c
|
||||
daemon/command.c
|
||||
daemon/config.c
|
||||
daemon/config_dump.c
|
||||
daemon/config_parser.c
|
||||
daemon/daemon_control.c
|
||||
daemon/device.c
|
||||
daemon/io.c
|
||||
daemon/main.c
|
||||
daemon/mouse.c
|
||||
daemon/mouse_handler.c
|
||||
daemon/notify.c
|
||||
|
|
|
|||
|
|
@ -22,10 +22,11 @@ Once you add new strings to be translated, update `po/POTFILES.in` to include
|
|||
any new files that have to be translated. The file path is relative to the root
|
||||
of the project.
|
||||
|
||||
The next step is to rebuild the translation template `libx52.pot`. To do
|
||||
this, run `make -C po update-po` from your build directory (where you ran
|
||||
`configure`). This also updates any translation files (with `.po` extension) to
|
||||
include the new source strings.
|
||||
The next step is to rebuild the translation template `libx52.pot`. From the
|
||||
repository root, run `meson compile -C build libx52-update-po` (adjust `build`
|
||||
to your build directory), or `ninja -C build libx52-update-po`. This also
|
||||
updates any translation files (with `.po` extension) to include the new source
|
||||
strings.
|
||||
|
||||
# Adding new languages (translators)
|
||||
|
||||
|
|
|
|||
734
po/libx52.pot
734
po/libx52.pot
File diff suppressed because it is too large
Load Diff
742
po/xx_PL.po
742
po/xx_PL.po
File diff suppressed because it is too large
Load Diff
|
|
@ -1,8 +0,0 @@
|
|||
# Top-level automake for libx52 and associated libraries
|
||||
#
|
||||
# Copyright (C) 2012-2018 Nirenjan Krishnan (nirenjan@nirenjan.org)
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
|
||||
|
||||
SUBDIRS = pinelog
|
||||
|
||||
|
|
@ -1,231 +0,0 @@
|
|||
# Top level Automake for pinelog
|
||||
#
|
||||
# Copyright (C) 2012-2018 Nirenjan Krishnan (nirenjan@nirenjan.org)
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
# Extra files that need to be in the distribution
|
||||
EXTRA_DIST = \
|
||||
LICENSE \
|
||||
README.md \
|
||||
pinelog.h
|
||||
|
||||
noinst_LTLIBRARIES = libpinelog.la
|
||||
|
||||
# pinelog logging library
|
||||
libpinelog_la_SOURCES = pinelog.c
|
||||
libpinelog_la_CFLAGS = @PINELOG_CFLAGS@ $(WARN_CFLAGS) -I $(top_builddir)
|
||||
libpinelog_la_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
test_SRCFILES = test_pinelog.c $(libpinelog_la_SOURCES)
|
||||
bench_SRCFILES = bench_pinelog.c $(libpinelog_la_SOURCES)
|
||||
test_CFLAGS = \
|
||||
-DPINELOG_FATAL_STR='"F"' \
|
||||
-DPINELOG_ERROR_STR='"E"' \
|
||||
-DPINELOG_WARNING_STR='"W"' \
|
||||
-DPINELOG_INFO_STR='"I"' \
|
||||
-DPINELOG_DEBUG_STR='"D"' \
|
||||
-DPINELOG_TRACE_STR='"T"' \
|
||||
-DPINELOG_DEFAULT_LEVEL=PINELOG_LVL_TRACE \
|
||||
-DPINELOG_DEFAULT_STREAM=stderr \
|
||||
-DPINELOG_TEST -I $(top_builddir)
|
||||
|
||||
LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/tap-driver.sh --comments
|
||||
TESTS = \
|
||||
fp_test_ts_lvl_tr \
|
||||
fp_test_ts_lvl_notr \
|
||||
fp_test_ts_nolvl_tr \
|
||||
fp_test_ts_nolvl_notr \
|
||||
fp_test_nots_lvl_tr \
|
||||
fp_test_nots_lvl_notr \
|
||||
fp_test_nots_nolvl_tr \
|
||||
fp_test_nots_nolvl_notr \
|
||||
fp_bench_ts_lvl_tr \
|
||||
fp_bench_ts_lvl_notr \
|
||||
fp_bench_ts_nolvl_tr \
|
||||
fp_bench_ts_nolvl_notr \
|
||||
fp_bench_nots_lvl_tr \
|
||||
fp_bench_nots_lvl_notr \
|
||||
fp_bench_nots_nolvl_tr \
|
||||
fp_bench_nots_nolvl_notr \
|
||||
str_test_ts_lvl_tr \
|
||||
str_test_ts_lvl_notr \
|
||||
str_test_ts_nolvl_tr \
|
||||
str_test_ts_nolvl_notr \
|
||||
str_test_nots_lvl_tr \
|
||||
str_test_nots_lvl_notr \
|
||||
str_test_nots_nolvl_tr \
|
||||
str_test_nots_nolvl_notr \
|
||||
str_bench_ts_lvl_tr \
|
||||
str_bench_ts_lvl_notr \
|
||||
str_bench_ts_nolvl_tr \
|
||||
str_bench_ts_nolvl_notr \
|
||||
str_bench_nots_lvl_tr \
|
||||
str_bench_nots_lvl_notr \
|
||||
str_bench_nots_nolvl_tr \
|
||||
str_bench_nots_nolvl_notr
|
||||
|
||||
check_PROGRAMS = $(TESTS)
|
||||
fp_test_ts_lvl_tr_SOURCES = $(test_SRCFILES)
|
||||
fp_test_ts_lvl_tr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=1 -DPINELOG_SHOW_LEVEL=1 -DPINELOG_SHOW_BACKTRACE=1
|
||||
fp_test_ts_lvl_tr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
fp_test_ts_lvl_notr_SOURCES = $(test_SRCFILES)
|
||||
fp_test_ts_lvl_notr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=1 -DPINELOG_SHOW_LEVEL=1 -DPINELOG_SHOW_BACKTRACE=0
|
||||
fp_test_ts_lvl_notr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
fp_test_ts_nolvl_tr_SOURCES = $(test_SRCFILES)
|
||||
fp_test_ts_nolvl_tr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=1 -DPINELOG_SHOW_LEVEL=0 -DPINELOG_SHOW_BACKTRACE=1
|
||||
fp_test_ts_nolvl_tr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
fp_test_ts_nolvl_notr_SOURCES = $(test_SRCFILES)
|
||||
fp_test_ts_nolvl_notr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=1 -DPINELOG_SHOW_LEVEL=0 -DPINELOG_SHOW_BACKTRACE=0
|
||||
fp_test_ts_nolvl_notr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
fp_test_nots_lvl_tr_SOURCES = $(test_SRCFILES)
|
||||
fp_test_nots_lvl_tr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=0 -DPINELOG_SHOW_LEVEL=1 -DPINELOG_SHOW_BACKTRACE=1
|
||||
fp_test_nots_lvl_tr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
fp_test_nots_lvl_notr_SOURCES = $(test_SRCFILES)
|
||||
fp_test_nots_lvl_notr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=0 -DPINELOG_SHOW_LEVEL=1 -DPINELOG_SHOW_BACKTRACE=0
|
||||
fp_test_nots_lvl_notr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
fp_test_nots_nolvl_tr_SOURCES = $(test_SRCFILES)
|
||||
fp_test_nots_nolvl_tr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=0 -DPINELOG_SHOW_LEVEL=0 -DPINELOG_SHOW_BACKTRACE=1
|
||||
fp_test_nots_nolvl_tr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
fp_test_nots_nolvl_notr_SOURCES = $(test_SRCFILES)
|
||||
fp_test_nots_nolvl_notr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=0 -DPINELOG_SHOW_LEVEL=0 -DPINELOG_SHOW_BACKTRACE=0
|
||||
fp_test_nots_nolvl_notr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
fp_bench_ts_lvl_tr_SOURCES = $(bench_SRCFILES)
|
||||
fp_bench_ts_lvl_tr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=1 -DPINELOG_SHOW_LEVEL=1 -DPINELOG_SHOW_BACKTRACE=1
|
||||
fp_bench_ts_lvl_tr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
fp_bench_ts_lvl_notr_SOURCES = $(bench_SRCFILES)
|
||||
fp_bench_ts_lvl_notr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=1 -DPINELOG_SHOW_LEVEL=1 -DPINELOG_SHOW_BACKTRACE=0
|
||||
fp_bench_ts_lvl_notr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
fp_bench_ts_nolvl_tr_SOURCES = $(bench_SRCFILES)
|
||||
fp_bench_ts_nolvl_tr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=1 -DPINELOG_SHOW_LEVEL=0 -DPINELOG_SHOW_BACKTRACE=1
|
||||
fp_bench_ts_nolvl_tr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
fp_bench_ts_nolvl_notr_SOURCES = $(bench_SRCFILES)
|
||||
fp_bench_ts_nolvl_notr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=1 -DPINELOG_SHOW_LEVEL=0 -DPINELOG_SHOW_BACKTRACE=0
|
||||
fp_bench_ts_nolvl_notr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
fp_bench_nots_lvl_tr_SOURCES = $(bench_SRCFILES)
|
||||
fp_bench_nots_lvl_tr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=0 -DPINELOG_SHOW_LEVEL=1 -DPINELOG_SHOW_BACKTRACE=1
|
||||
fp_bench_nots_lvl_tr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
fp_bench_nots_lvl_notr_SOURCES = $(bench_SRCFILES)
|
||||
fp_bench_nots_lvl_notr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=0 -DPINELOG_SHOW_LEVEL=1 -DPINELOG_SHOW_BACKTRACE=0
|
||||
fp_bench_nots_lvl_notr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
fp_bench_nots_nolvl_tr_SOURCES = $(bench_SRCFILES)
|
||||
fp_bench_nots_nolvl_tr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=0 -DPINELOG_SHOW_LEVEL=0 -DPINELOG_SHOW_BACKTRACE=1
|
||||
fp_bench_nots_nolvl_tr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
fp_bench_nots_nolvl_notr_SOURCES = $(bench_SRCFILES)
|
||||
fp_bench_nots_nolvl_notr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=0 -DPINELOG_SHOW_LEVEL=0 -DPINELOG_SHOW_BACKTRACE=0
|
||||
fp_bench_nots_nolvl_notr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
test_CFLAGS += -DPINELOG_BUFFER_SZ=4096
|
||||
str_test_ts_lvl_tr_SOURCES = $(test_SRCFILES)
|
||||
str_test_ts_lvl_tr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=1 -DPINELOG_SHOW_LEVEL=1 -DPINELOG_SHOW_BACKTRACE=1
|
||||
str_test_ts_lvl_tr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
str_test_ts_lvl_notr_SOURCES = $(test_SRCFILES)
|
||||
str_test_ts_lvl_notr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=1 -DPINELOG_SHOW_LEVEL=1 -DPINELOG_SHOW_BACKTRACE=0
|
||||
str_test_ts_lvl_notr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
str_test_ts_nolvl_tr_SOURCES = $(test_SRCFILES)
|
||||
str_test_ts_nolvl_tr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=1 -DPINELOG_SHOW_LEVEL=0 -DPINELOG_SHOW_BACKTRACE=1
|
||||
str_test_ts_nolvl_tr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
str_test_ts_nolvl_notr_SOURCES = $(test_SRCFILES)
|
||||
str_test_ts_nolvl_notr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=1 -DPINELOG_SHOW_LEVEL=0 -DPINELOG_SHOW_BACKTRACE=0
|
||||
str_test_ts_nolvl_notr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
str_test_nots_lvl_tr_SOURCES = $(test_SRCFILES)
|
||||
str_test_nots_lvl_tr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=0 -DPINELOG_SHOW_LEVEL=1 -DPINELOG_SHOW_BACKTRACE=1
|
||||
str_test_nots_lvl_tr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
str_test_nots_lvl_notr_SOURCES = $(test_SRCFILES)
|
||||
str_test_nots_lvl_notr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=0 -DPINELOG_SHOW_LEVEL=1 -DPINELOG_SHOW_BACKTRACE=0
|
||||
str_test_nots_lvl_notr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
str_test_nots_nolvl_tr_SOURCES = $(test_SRCFILES)
|
||||
str_test_nots_nolvl_tr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=0 -DPINELOG_SHOW_LEVEL=0 -DPINELOG_SHOW_BACKTRACE=1
|
||||
str_test_nots_nolvl_tr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
str_test_nots_nolvl_notr_SOURCES = $(test_SRCFILES)
|
||||
str_test_nots_nolvl_notr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=0 -DPINELOG_SHOW_LEVEL=0 -DPINELOG_SHOW_BACKTRACE=0
|
||||
str_test_nots_nolvl_notr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
str_bench_ts_lvl_tr_SOURCES = $(bench_SRCFILES)
|
||||
str_bench_ts_lvl_tr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=1 -DPINELOG_SHOW_LEVEL=1 -DPINELOG_SHOW_BACKTRACE=1
|
||||
str_bench_ts_lvl_tr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
str_bench_ts_lvl_notr_SOURCES = $(bench_SRCFILES)
|
||||
str_bench_ts_lvl_notr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=1 -DPINELOG_SHOW_LEVEL=1 -DPINELOG_SHOW_BACKTRACE=0
|
||||
str_bench_ts_lvl_notr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
str_bench_ts_nolvl_tr_SOURCES = $(bench_SRCFILES)
|
||||
str_bench_ts_nolvl_tr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=1 -DPINELOG_SHOW_LEVEL=0 -DPINELOG_SHOW_BACKTRACE=1
|
||||
str_bench_ts_nolvl_tr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
str_bench_ts_nolvl_notr_SOURCES = $(bench_SRCFILES)
|
||||
str_bench_ts_nolvl_notr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=1 -DPINELOG_SHOW_LEVEL=0 -DPINELOG_SHOW_BACKTRACE=0
|
||||
str_bench_ts_nolvl_notr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
str_bench_nots_lvl_tr_SOURCES = $(bench_SRCFILES)
|
||||
str_bench_nots_lvl_tr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=0 -DPINELOG_SHOW_LEVEL=1 -DPINELOG_SHOW_BACKTRACE=1
|
||||
str_bench_nots_lvl_tr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
str_bench_nots_lvl_notr_SOURCES = $(bench_SRCFILES)
|
||||
str_bench_nots_lvl_notr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=0 -DPINELOG_SHOW_LEVEL=1 -DPINELOG_SHOW_BACKTRACE=0
|
||||
str_bench_nots_lvl_notr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
str_bench_nots_nolvl_tr_SOURCES = $(bench_SRCFILES)
|
||||
str_bench_nots_nolvl_tr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=0 -DPINELOG_SHOW_LEVEL=0 -DPINELOG_SHOW_BACKTRACE=1
|
||||
str_bench_nots_nolvl_tr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
str_bench_nots_nolvl_notr_SOURCES = $(bench_SRCFILES)
|
||||
str_bench_nots_nolvl_notr_CFLAGS = $(WARN_CFLAGS) $(test_CFLAGS) \
|
||||
-DPINELOG_SHOW_DATE=0 -DPINELOG_SHOW_LEVEL=0 -DPINELOG_SHOW_BACKTRACE=0
|
||||
str_bench_nots_nolvl_notr_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue