uinput-mapper/Makefile

11 lines
450 B
Makefile
Raw Normal View History

2013-05-23 17:11:27 -04:00
.PHONY: default clean
default: uinputmapper/uinput_gen.py
2013-05-23 17:11:27 -04:00
clean:
rm uinput_gen.py -f
uinputmapper/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 > uinputmapper/uinput_gen.py