aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2014-06-03 12:10:52 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2014-06-19 09:43:15 +0200
commit4647dfb9e4284b95a1eab07b2a70ba00d166c3bc (patch)
tree5cc4aa3854554d7b55db28ff1cc09fe3dafb1943 /Makefile.am
parentfdad1d0c894bbf16adeaeb4b70c08580542087da (diff)
Update sync-with-kernel to use installed kernel headers
Kernel headers exported to userspace can contain kernel-specific statements (such as __user annotations) that are removed when installing the headers with 'make headers_install' in the kernel sources. Only those headers must be used by userspace, raw headers are private to the kernel. Update the sync-with-kernel make target to use the installed headers. The user must install the kernel headers by running make headers_install in KERNEL_DIR prior to run sync-with-kernel. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am45
1 files changed, 23 insertions, 22 deletions
diff --git a/Makefile.am b/Makefile.am
index 11baed19..35d00301 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -12,31 +12,32 @@ EXTRA_DIST = include COPYING.libv4l README.libv4l README.lib-multi-threading
# custom targets
sync-with-kernel:
- @if [ ! -f $(KERNEL_DIR)/include/uapi/linux/videodev2.h -o \
- ! -f $(KERNEL_DIR)/include/uapi/linux/fb.h -o \
- ! -f $(KERNEL_DIR)/include/uapi/linux/v4l2-controls.h -o \
- ! -f $(KERNEL_DIR)/include/uapi/linux/v4l2-common.h -o \
- ! -f $(KERNEL_DIR)/include/uapi/linux/v4l2-subdev.h -o \
- ! -f $(KERNEL_DIR)/include/uapi/linux/v4l2-mediabus.h -o \
- ! -f $(KERNEL_DIR)/include/uapi/linux/ivtv.h -o \
- ! -f $(KERNEL_DIR)/include/uapi/linux/dvb/frontend.h -o \
- ! -f $(KERNEL_DIR)/include/uapi/linux/dvb/dmx.h -o \
- ! -f $(KERNEL_DIR)/include/uapi/linux/dvb/audio.h -o \
- ! -f $(KERNEL_DIR)/include/uapi/linux/dvb/video.h ]; then \
+ @if [ ! -f $(KERNEL_DIR)/usr/include/linux/videodev2.h -o \
+ ! -f $(KERNEL_DIR)/usr/include/linux/fb.h -o \
+ ! -f $(KERNEL_DIR)/usr/include/linux/v4l2-controls.h -o \
+ ! -f $(KERNEL_DIR)/usr/include/linux/v4l2-common.h -o \
+ ! -f $(KERNEL_DIR)/usr/include/linux/v4l2-subdev.h -o \
+ ! -f $(KERNEL_DIR)/usr/include/linux/v4l2-mediabus.h -o \
+ ! -f $(KERNEL_DIR)/usr/include/linux/ivtv.h -o \
+ ! -f $(KERNEL_DIR)/usr/include/linux/dvb/frontend.h -o \
+ ! -f $(KERNEL_DIR)/usr/include/linux/dvb/dmx.h -o \
+ ! -f $(KERNEL_DIR)/usr/include/linux/dvb/audio.h -o \
+ ! -f $(KERNEL_DIR)/usr/include/linux/dvb/video.h ]; then \
echo "Error you must set KERNEL_DIR to point to an extracted kernel source dir"; \
+ echo "and run 'make headers_install' in \$$KERNEL_DIR."; \
exit 1; \
fi
- cp -a $(KERNEL_DIR)/include/uapi/linux/videodev2.h $(top_srcdir)/include/linux
- cp -a $(KERNEL_DIR)/include/uapi/linux/fb.h $(top_srcdir)/include/linux
- cp -a $(KERNEL_DIR)/include/uapi/linux/v4l2-controls.h $(top_srcdir)/include/linux
- cp -a $(KERNEL_DIR)/include/uapi/linux/v4l2-common.h $(top_srcdir)/include/linux
- cp -a $(KERNEL_DIR)/include/uapi/linux/v4l2-subdev.h $(top_srcdir)/include/linux
- cp -a $(KERNEL_DIR)/include/uapi/linux/v4l2-mediabus.h $(top_srcdir)/include/linux
- cp -a $(KERNEL_DIR)/include/uapi/linux/ivtv.h $(top_srcdir)/include/linux
- cp -a $(KERNEL_DIR)/include/uapi/linux/dvb/frontend.h $(top_srcdir)/include/linux/dvb
- cp -a $(KERNEL_DIR)/include/uapi/linux/dvb/dmx.h $(top_srcdir)/include/linux/dvb
- cp -a $(KERNEL_DIR)/include/uapi/linux/dvb/audio.h $(top_srcdir)/include/linux/dvb
- cp -a $(KERNEL_DIR)/include/uapi/linux/dvb/video.h $(top_srcdir)/include/linux/dvb
+ cp -a $(KERNEL_DIR)/usr/include/linux/videodev2.h $(top_srcdir)/include/linux
+ cp -a $(KERNEL_DIR)/usr/include/linux/fb.h $(top_srcdir)/include/linux
+ cp -a $(KERNEL_DIR)/usr/include/linux/v4l2-controls.h $(top_srcdir)/include/linux
+ cp -a $(KERNEL_DIR)/usr/include/linux/v4l2-common.h $(top_srcdir)/include/linux
+ cp -a $(KERNEL_DIR)/usr/include/linux/v4l2-subdev.h $(top_srcdir)/include/linux
+ cp -a $(KERNEL_DIR)/usr/include/linux/v4l2-mediabus.h $(top_srcdir)/include/linux
+ cp -a $(KERNEL_DIR)/usr/include/linux/ivtv.h $(top_srcdir)/include/linux
+ cp -a $(KERNEL_DIR)/usr/include/linux/dvb/frontend.h $(top_srcdir)/include/linux/dvb
+ cp -a $(KERNEL_DIR)/usr/include/linux/dvb/dmx.h $(top_srcdir)/include/linux/dvb
+ cp -a $(KERNEL_DIR)/usr/include/linux/dvb/audio.h $(top_srcdir)/include/linux/dvb
+ cp -a $(KERNEL_DIR)/usr/include/linux/dvb/video.h $(top_srcdir)/include/linux/dvb
$(MAKE) -C utils/keytable $@
$(MAKE) -C utils/xc3028-firmware $@

Privacy Policy