uinput-mapper/Makefile
2013-05-23 23:11:27 +02:00

11 lines
411 B
Makefile

.PHONY: default clean
default: uinput_gen.py
clean:
rm uinput_gen.py -f
uinput_gen.py:
gcc -E -dM /usr/include/linux/input.h | egrep ' (EV|SYN|KEY|BTN|REL|ABS|MSC|LED|SND|REP|SW)_[A-Za-z0-9_]+' | ( echo "#include <linux/input.h>" ; echo "input_constants_dict = {" ; sed -r 's/[^ ]+ +([^ ]+).*/"\1" : \1,/' ; echo "}" ) | gcc -E -o /dev/stdout - | grep 'input_constants_dict = {' -A 100000 > uinput_gen.py