chiark / gitweb /
55cce54ea28786b4e84728b3794450e9c6c1fca3
[elogind.git] / extras / keymap / Makefile.am
1 # keymap is free software; you can redistribute it and/or modify it
2 # under the terms of the GNU General Public License as published by
3 # the Free Software Foundation; either version 2 of the License, or
4 # (at your option) any later version.
5 #
6 # keymap is distributed in the hope that it will be useful, but
7 # WITHOUT ANY WARRANTY; without even the implied warranty of
8 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9 # General Public License for more details.
10 #
11 # You should have received a copy of the GNU General Public License
12 # along with keymap; if not, write to the Free Software Foundation,
13 # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
14
15 include $(top_srcdir)/Makefile.am.inc
16
17 # rules and keymaps
18 dist_udevrules_DATA = 95-keymap.rules
19
20 udevkeymapdir = $(libexecdir)/keymaps
21 udevkeymap_DATA = \
22  keymaps/acer \
23  keymaps/acer-aspire_5920g \
24  keymaps/acer-extensa_5xxx \
25  keymaps/acer-travelmate_6292 \
26  keymaps/acer-travelmate_c300 \
27  keymaps/asus \
28  keymaps/benq-joybook_r22 \
29  keymaps/compaq-e_evo \
30  keymaps/dell \
31  keymaps/fujitsu-amilo_pa_2548 \
32  keymaps/fujitsu-amilo_pro_edition_v3505 \
33  keymaps/fujitsu-amilo_pro_v3205 \
34  keymaps/fujitsu-amilo_si_1520 \
35  keymaps/fujitsu-esprimo_mobile_v5 \
36  keymaps/fujitsu-esprimo_mobile_v6 \
37  keymaps/hewlett-packard \
38  keymaps/hewlett-packard-2510p_2530p \
39  keymaps/hewlett-packard-compaq_elitebook \
40  keymaps/hewlett-packard-pavilion \
41  keymaps/hewlett-packard-tablet \
42  keymaps/hewlett-packard-tx2 \
43  keymaps/inventec-symphony_6.0_7.0 \
44  keymaps/lenovo-3000 \
45  keymaps/lenovo-thinkpad_x6_tablet \
46  keymaps/lenovo-thinkpad_x200_tablet \
47  keymaps/maxdata-pro_7000 \
48  keymaps/medion-fid2060 \
49  keymaps/medionnb-a555 \
50  keymaps/micro-star \
51  keymaps/module-asus-w3j \
52  keymaps/module-ibm \
53  keymaps/module-lenovo \
54  keymaps/module-sony \
55  keymaps/module-sony-old \
56  keymaps/oqo-model2 \
57  keymaps/samsung-other \
58  keymaps/samsung-sq1us \
59  keymaps/samsung-sx20s \
60  keymaps/toshiba-satellite_a100 \
61  keymaps/toshiba-satellite_a110
62
63 dist_pkgdata_SCRIPTS = findkeyboards
64
65 # keymap program
66
67 libexec_PROGRAMS = keymap
68
69 keymap_SOURCES = keymap.c
70 nodist_keymap_SOURCES = keys-from-name.h keys-to-name.h
71 keymap_CPPFLAGS = $(AM_CPPFLAGS)
72
73 dist_doc_DATA = README.keymap.txt
74
75 EXTRA_DIST=keymaps check-keymaps.sh
76 BUILT_SOURCES = keys-from-name.h keys-to-name.h
77 CLEANFILES = keys.txt keys-from-name.gperf keys-from-name.h keys-to-name.h
78 TESTS = check-keymaps.sh
79
80 #
81 # generation of keys-{from,to}-name.h from linux/input.h and gperf
82 #
83
84 keys.txt: /usr/include/linux/input.h
85         $(AWK) '/^#define.*KEY_/ { if ($$2 != "KEY_MAX" && $$2 != "KEY_CNT") { print $$2 } }' < $< > $@
86
87 keys-from-name.gperf: keys.txt
88         $(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print $$1 ", " $$1 }' < $< > $@
89
90 keys-from-name.h: keys-from-name.gperf Makefile
91         $(GPERF) -t --ignore-case -N lookup_key -H hash_key_name -p -C < $< > $@
92
93 keys-to-name.h: keys.txt Makefile
94         $(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@