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.
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.
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.
15 include $(top_srcdir)/Makefile.am.inc
18 dist_udevrules_DATA = 95-keymap.rules
20 udevkeymapdir = $(libexecdir)/keymaps
23 keymaps/acer-aspire_5920g \
24 keymaps/acer-extensa_5xxx \
25 keymaps/acer-travelmate_6292 \
26 keymaps/acer-travelmate_c300 \
28 keymaps/benq-joybook_r22 \
29 keymaps/compaq-e_evo \
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 \
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 \
51 keymaps/module-asus-w3j \
53 keymaps/module-lenovo \
55 keymaps/module-sony-old \
57 keymaps/samsung-other \
58 keymaps/samsung-sq1us \
59 keymaps/samsung-sx20s \
60 keymaps/toshiba-satellite_a100 \
61 keymaps/toshiba-satellite_a110
63 dist_pkgdata_SCRIPTS = findkeyboards
67 libexec_PROGRAMS = keymap
69 keymap_SOURCES = keymap.c
70 nodist_keymap_SOURCES = keys-from-name.h keys-to-name.h
71 keymap_CPPFLAGS = $(AM_CPPFLAGS)
73 dist_doc_DATA = README.keymap.txt
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
81 # generation of keys-{from,to}-name.h from linux/input.h and gperf
84 keys.txt: /usr/include/linux/input.h
85 $(AWK) '/^#define.*KEY_/ { if ($$2 != "KEY_MAX" && $$2 != "KEY_CNT") { print $$2 } }' < $< > $@
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 }' < $< > $@
90 keys-from-name.h: keys-from-name.gperf Makefile
91 $(GPERF) -t --ignore-case -N lookup_key -H hash_key_name -p -C < $< > $@
93 keys-to-name.h: keys.txt Makefile
94 $(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@