# Makefile for linuxtv.org v4l2-apps/util
+IR_FILES = "linux/drivers/media/common/ir-keymaps.c \
+linux/drivers/media/dvb/dvb-usb/a800.c \
+linux/drivers/media/dvb/dvb-usb/af9005-remote.c \
+linux/drivers/media/dvb/dvb-usb/af9015.c \
+linux/drivers/media/dvb/dvb-usb/af9015.h \
+linux/drivers/media/dvb/dvb-usb/anysee.c \
+linux/drivers/media/dvb/dvb-usb/cinergyT2-core.c \
+linux/drivers/media/dvb/dvb-usb/cxusb.c \
+linux/drivers/media/dvb/dvb-usb/dib0700_devices.c \
+linux/drivers/media/dvb/dvb-usb/dibusb-common.c \
+linux/drivers/media/dvb/dvb-usb/digitv.c \
+linux/drivers/media/dvb/dvb-usb/dtt200u.c \
+linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c \
+linux/drivers/media/dvb/dvb-usb/dvb-usb.h \
+linux/drivers/media/dvb/dvb-usb/dw2102.c \
+linux/drivers/media/dvb/dvb-usb/m920x.c \
+linux/drivers/media/dvb/dvb-usb/nova-t-usb2.c \
+linux/drivers/media/dvb/dvb-usb/opera1.c \
+linux/drivers/media/dvb/dvb-usb/vp702x.c \
+linux/drivers/media/dvb/dvb-usb/vp7045.c "
+
ifeq ($(KERNEL_DIR),)
KERNEL_DIR = /usr
endif
@printf "\t{ NULL, 0}\n};\n" >>parse.h
keytables:
- -mkdir -p keycodes
- ./gen_keytables.pl ../../linux/drivers/media/common/ir-keymaps.c
+ @-mkdir -p keycodes
+ @echo storing existing keycodes at keycodes/
+ @for i in `echo $(IR_FILES)`; do ./gen_keytables.pl ../../$$i; done
keytable: keytable.c parse.h keytables
my $debug=0;
while (<>) {
- if (m/struct\s+ir_scancode\s+(\w[\w\d_]+)/) {
- $keyname = $1;
+ if (m/struct\s+(dvb_usb_rc_key|ir_scancode)\s+(\w[\w\d_]+)/) {
+ $keyname = $2;
$keyname =~ s/^ir_codes_//;
print "Generating keycodes/$keyname\n" if $debug;
next;
}
if ($keyname ne "") {
- if (m/(0x[\d\w]+).*(KEY_[^\s\,]+)/) {
+ if (m/(0x[\dA-Fa-f]+).*(KEY_[^\s\,]+)/) {
printf OUT "%s %s\n",$1, $2;
next;
}