summaryrefslogtreecommitdiff
path: root/v4l2-apps/util/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'v4l2-apps/util/Makefile')
-rw-r--r--v4l2-apps/util/Makefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/v4l2-apps/util/Makefile b/v4l2-apps/util/Makefile
index cc0547c32..873553a95 100644
--- a/v4l2-apps/util/Makefile
+++ b/v4l2-apps/util/Makefile
@@ -1,9 +1,13 @@
# Makefile for linuxtv.org v4l2-apps/util
+ifeq ($(KERNEL_DIR),)
+ KERNEL_DIR = /usr
+endif
+
CPPFLAGS += -I../../linux/include -D_GNU_SOURCE
LDFLAGS += -lm
-binaries = v4l2-ctl v4l2-dbg ivtv-ctl cx18-ctl
+binaries = v4l2-ctl v4l2-dbg ivtv-ctl cx18-ctl v4l-board-dbg
ifeq ($(prefix),)
prefix = /usr
@@ -32,12 +36,12 @@ install:
include ../Make.rules
-parse.h: /usr/include/linux/input.h
+parse.h: $(KERNEL_DIR)/include/linux/input.h
@echo generating parse.h
@echo -en "struct parse_key {\n\tchar *name;\n\tunsigned int value;\n} " >parse.h
@echo -en "keynames[] = {\n" >>parse.h
- @more /usr/include/linux/input.h |perl -n \
+ @more $(KERNEL_DIR)/linux/input.h |perl -n \
-e 'if (m/^\#define\s+(KEY_[^\s]+)\s+(0x[\d\w]+|[\d]+)/) ' \
-e '{ printf "\t{\"%s\", %s},\n",$$1,$$2; }' \
-e 'if (m/^\#define\s+(BTN_[^\s]+)\s+(0x[\d\w]+|[\d]+)/) ' \
@@ -51,6 +55,8 @@ keytables:
keytable: keytable.c parse.h keytables
+v4l-board-dbg: v4l-board-dbg.c bttv-dbg.h saa7134-dbg.h em28xx-dbg.h
+
v4l2-driverids.cpp: ../../linux/include/linux/i2c-id.h
@echo "struct driverid { const char *name; unsigned id; } driverids[] = {" >$@
@grep I2C_DRIVERID_ $^ | sed -e 's/.*I2C_DRIVERID_\([0-9A-Z_]*\)[^0-9]*\([0-9]*\).*/{ "\1", \2 },/' | tr A-Z a-z >>$@
@@ -60,3 +66,5 @@ v4l2-chipids.cpp: ../../linux/include/media/v4l2-chip-ident.h
@echo "struct chipid { const char *name; unsigned id; } chipids[] = {" >$@
@grep V4L2_IDENT_ $^ | sed -e 's/.*V4L2_IDENT_\([0-9A-Z_]*\)[^=]*=[^0-9]*\([0-9]*\).*/{ "\1", \2 },/' | tr A-Z a-z >>$@
@echo "{ 0, 0 }};" >>$@
+
+