summaryrefslogtreecommitdiff
path: root/v4l2-mfc-example
diff options
context:
space:
mode:
authorMateusz Krawczuk <m.krawczuk@samsung.com>2015-03-27 13:27:36 +0100
committerKamil Debski <k.debski@samsung.com>2015-04-30 15:36:09 +0200
commitf0bb7d285f4349e0a1a048a6aa3db82ec80cccb4 (patch)
tree9516d4fb2c16f584bc152b9acf10591b5428853f /v4l2-mfc-example
parent3930b3eb7ade997d598a67ec7f670597f2d075d4 (diff)
v4l2-mfc-example: Update makefile
Add build instructions to README and replace custom include paths in makefile by more generic solution. Signed-off-by: Mateusz Krawczuk <m.krawczuk@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com>
Diffstat (limited to 'v4l2-mfc-example')
-rw-r--r--v4l2-mfc-example/Makefile25
-rw-r--r--v4l2-mfc-example/README.txt21
2 files changed, 38 insertions, 8 deletions
diff --git a/v4l2-mfc-example/Makefile b/v4l2-mfc-example/Makefile
index 2594f9b..7056683 100644
--- a/v4l2-mfc-example/Makefile
+++ b/v4l2-mfc-example/Makefile
@@ -1,7 +1,7 @@
# V4L2 Codec decoding example application
# Kamil Debski <k.debski@samsung.com>
#
-# Copyright 2012 Samsung Electronics Co., Ltd.
+# Copyright 2012 - 2015 Samsung Electronics Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -16,19 +16,30 @@
# limitations under the License.
#
+
+
+ifeq ($(LIBDRM_PREFIX),)
+$(warning LIBDRM_PREFIX is not set, the build may fail due to lack of libdrm headers )
+endif
+
+ifeq ($(KERNELHEADERS_PREFIX),)
+$(warning KERNELHEADERS_PREFIX is not set, the build may fail due to lack of kernel headers)
+endif
+
# Toolchain path
TCPATH = arm-linux-gnueabi-
#TCPATH =
-KERNELHEADERS = -I/home/kamil/praca/w1-party/kernel/headers/include
-DRMHEADERS = -I/home/kamil/praca/drm/dst/include/libdrm \
- -I/home/kamil/praca/drm/dst/include/exynos \
- -I/home/kamil/praca/drm/dst/include
-LIBRARIES = -L/home/kamil/praca/drm/dst/lib/
+KERNELHEADERS = -I$(KERNELHEADERS_PREFIX)
+DRMHEADERS = -I$(LIBDRM_PREFIX)/include/ \
+ -I$(LIBDRM_PREFIX)/include/libdrm/ \
+ -I$(LIBDRM_PREFIX)/include/exynos \
+ -I./
+LIBRARIES = -L$(LIBDRM_PREFIX)/lib/
LIBS = -ldrm
CC = ${TCPATH}gcc
AR = "${TCPATH}ar rc"
-AR2 = ${TCPATH}ranlib make -j4
+AR2 = ${TCPATH}ranlib make
INCLUDES = $(KERNELHEADERS) $(DRMHEADERS)
diff --git a/v4l2-mfc-example/README.txt b/v4l2-mfc-example/README.txt
index 3c52396..eb33aeb 100644
--- a/v4l2-mfc-example/README.txt
+++ b/v4l2-mfc-example/README.txt
@@ -4,7 +4,7 @@ by Kamil Debski <k.debski@samsung.com>
===========
* License *
===========
-Copyright 2012 Samsung Electronics Co., Ltd.
+Copyright 2012 - 2015 Samsung Electronics Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -88,6 +88,25 @@ OUTPUT after the end of stream has been detected and dequeue all remaining
CAPTURE buffers have been dequeued. The first empty buffer signalises MFC that
the end of stream has been reached and initializes decoding ending procedure.
+
+===========================
+* Building the application *
+===========================
+
+To build application you need to do few steps. You should download libdrm.
+If you use custom kernel you need to build headers for it.
+
+First you should define KERNELHEADERS_PREFIX and LIBDRM_PREFIX
+where will be kept the build output and headers needed by the application.
+Then you should export headers from your kernel using
+INSTALL_HDR_PATH=$KERNELHEADERS_PREFIX ARCH=arm make headers_install.
+When building libdrm you should enable --enable-exynos-experimental-api
+and define --prefix=$LIBDRM_PREFIX, and your custom kernel source
+--with-kernel-source=$KERNEL_DIR using configure.
+After this step enter v4l2-mfc-example directory and run make.
+If you have problems with toolchain and gcc check Makefile and TCPATH.
+You may need define own path to the toolchain.
+
===========================
* Running the application *
===========================