summaryrefslogtreecommitdiff
path: root/libevdev/Makefile.am
Commit message (Collapse)AuthorAgeFilesLines
* include: add uinput.h header as wellPeter Hutterer2014-06-251-1/+2
| | | | | | | | | Older kernels don't have UI_GET_SYSNAME, and upstream is adding a few more ioctls to the uinput code. So ship the header we're using to avoid compilation errors. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
* Add ld version-scriptDavid Herrmann2014-01-291-2/+4
| | | | | | | | | | | | | | | | | | | | | Explicit symbol versioning allows us to provide multiple versions of incompatible API changes. It is a very common practice in GNU world and avoids the problems occuring if distributions try to ship multiple version of a single DSO. Background information available at: http://people.redhat.com/drepper/dsohowto.pdf To see the symbol-versions, use objdump: objdump -T libevdev/.libs/libevdev.so.1.0.0 This can also be used to verify that all symbols are correctly exported (typos in linker-scripts are silently ignored by ld). Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Updated for evdev 0.6's API. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Drop --output flag and python generation code from make-event-names.pyPeter Hutterer2014-01-151-1/+1
| | | | | | | | This is a leftover from when the file was in evemu and used to generate python headers too. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
* Drop gcov flags from main libevdev sourcesPeter Hutterer2013-11-181-5/+1
| | | | | | | | We recompile the sources anyway in the tests and we have our own CFLAGS there. Drop them from the main library code so we don't leave gcov files everywhere. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
* Add libevdev_event_type/code_from_name() resolversDavid Herrmann2013-10-311-0/+1
| | | | | | | | | | | | Three new helpers are added: (1) libevdev_event_type_from_name() takes a string describing an EV_* event type and returns the given event-type constant. (2) libevdev_event_code_from_name() takes a string describing an event code and returns the given event-code constant. Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Pass linux/input.h as argument to make-event-names.pyPeter Hutterer2013-10-231-1/+1
| | | | | | Rather than a hardcoded path inside the source. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Add a copy of linux/input.hPeter Hutterer2013-10-231-2/+3
| | | | | | | This avoids a number of otherwise required ifdefs when building on older kernels Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
* configure: test for python and python-argparsePeter Hutterer2013-10-211-1/+1
| | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
* Name-space the read flags betterPeter Hutterer2013-09-111-1/+1
| | | | | | | | Rename from LIBEVDEV_READ_foo to LIBEVDEV_READ_FLAG_foo to differentiate better from LIBEVDEV_READ_STATUS_foo. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
* Check for GNU ld and use the flags depending on the outcomePeter Hutterer2013-09-041-4/+1
| | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
* Add some gcc/ld optimizations and magicDavid Herrmann2013-09-031-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are several gcc/ld flags that optimize size and performance without requiring explicit code changes. In no particular order, this adds: - gcc -pipe to avoid temporary files and use pipes during compilation - gcc -fno-common avoids putting uninitialized global variables not marked as "extern" into a common section. This catches compilation errors if we didn't mark global variables explicitly as "extern". - gcc -fno-strict-aliasing allows us to use unions for some binary magic. Otherwise, -O2 might assume that two different types never point at the same memory. We currently don't rely on this but it's common practice so avoid any non-obvious runtime errors later. - gcc -ffunction-sections and -fdata-sections put each function and variable into a separate section. This enables ld's --gc-sections to drop any unused sections (sections which aren't referenced from an exported section). This is very useful to avoid putting dead code into DSOs. We can now link any helper function into libevdev and the linker removes all of them if they're unused. - gcc -fstack-protector adds small stack-corruption protectors in functions which have big buffers on the stack (>8bytes). If the stack-protectors are corrupted, the process is aborted. This is highly useful to debug stack-corruption issues which often are nearly impossible to catch without this. - ld --as-needed drops all linked libraries that are not actually required by libevdev. So we can link to whatever we want and the linker will drop everything which is not actually used. - ld -z now, resolve symbols during linking, not during runtime. - ld -z relro, add relocation-read-only section. This allows to put read-only global variables and alike into a read-only section. This is useful for variables that need a relocation and thus cannot be explicitly put into a read-only section. This option tells the linker to mark them read-only after relocations are done. (that's why -z now makes sense in combination with this) All of these options are common in other open-source projects, including systemd and weston. Don't ask me why they are not marked as default.. Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Add support for uinput device creationPeter Hutterer2013-08-291-2/+5
| | | | | | | | | | | | | | | | | | | | This lets libevdev provide a relatively generic interface for the creation of uinput devices so we don't need to duplicate this across multiple projects. Most of this is lifted from the current test implementation, with a couple of minor changes. EV_REP needs special handling: Kernel allows to set the EV_REP bit, it doesn't set REP_* bits (which we wrap anyway) but it will also set the default values (500, 33). Device node is guessed based on the sysfs path: The sysfs path contains a eventN file, that corresponds to our /dev/input/eventN number. Use it so clients can quickly get the device node, without a libudev dependency. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Actually use the gcc CFLAGS set in configurePeter Hutterer2013-08-291-1/+1
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Fix distcheckPeter Hutterer2013-06-271-0/+3
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Hook up gcovPeter Hutterer2013-06-271-1/+3
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Move utility functions to a separate headerPeter Hutterer2013-06-041-0/+1
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Expose API for retrieving event namesPeter Hutterer2013-06-041-0/+8
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* libevdev is a library to handle evdev devicesPeter Hutterer2013-05-291-0/+11
Two main goals of this library: - 'transparently' handle SYN_DROPPED events - avoid errors in ioctl handling by providing a simpler interface. Keeps a cached copy of the device for quick querying. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>