summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--v4l2-apps/lib/libv4l/README14
-rw-r--r--v4l2-apps/lib/libv4l/libv4l1/Makefile23
-rw-r--r--v4l2-apps/lib/libv4l/libv4l2/Makefile23
-rw-r--r--v4l2-apps/lib/libv4l/libv4lconvert/Makefile18
4 files changed, 46 insertions, 32 deletions
diff --git a/v4l2-apps/lib/libv4l/README b/v4l2-apps/lib/libv4l/README
index e795e7d81..b9b056f66 100644
--- a/v4l2-apps/lib/libv4l/README
+++ b/v4l2-apps/lib/libv4l/README
@@ -59,11 +59,12 @@ towards a video device the wrapper will redirect the call to the libv4lX
counterparts.
The preloadable libv4l1 wrapper which adds v4l2 device compatibility to v4l1
-applications is called v4l1compat.so. The preloadable libv4l1 wrapper which
-adds v4l2 device compatibility to v4l1 applications is called v4l2convert.so
+applications is called v4l1compat.so. The preloadable libv4l2 wrapper which
+adds support for various pixelformats to v4l2 applications is called
+v4l2convert.so.
Example usage (after install in default location):
-$ export LD_PRELOAD=/usr/local/lib/v4l1compat.so
+$ export LD_PRELOAD=/usr/local/lib/libv4l/v4l1compat.so
$ camorama
@@ -71,9 +72,12 @@ Installation Instructions
-------------------------
Simple type the following commands from the libv4l-x.y.z directory
-(adjusting DESTDIR as desired):
+(adjusting PREFIX as desired):
make
-make install DESTDIR=/usr/local
+make install PREFIX=/usr/local
+
+Note: make install also supports the DESTDIR=... paramter for installation
+into chroots.
FAQ
diff --git a/v4l2-apps/lib/libv4l/libv4l1/Makefile b/v4l2-apps/lib/libv4l/libv4l1/Makefile
index c679d35d8..8cb064cd4 100644
--- a/v4l2-apps/lib/libv4l/libv4l1/Makefile
+++ b/v4l2-apps/lib/libv4l/libv4l1/Makefile
@@ -19,8 +19,12 @@ ifeq ($(LIB_RELEASE),)
LIB_RELEASE = 0
endif
-ifeq ($(DESTDIR),)
-DESTDIR = /usr/local
+ifeq ($(PREFIX),)
+PREFIX = /usr/local
+endif
+
+ifeq ($(LIBDIR),)
+LIBDIR = $(PREFIX)/lib
endif
all: $(TARGETS)
@@ -31,15 +35,14 @@ $(V4L1_LIB): $(V4L1_OBJS)
$(V4L1COMPAT): $(V4L1COMPAT_O) $(V4L1_LIB)
install: all
- mkdir -p $(DESTDIR)/include
- cp $(INCLUDES) $(DESTDIR)/include
- mkdir -p $(DESTDIR)/lib
- cp $(V4L1_LIB).$(LIB_RELEASE) $(DESTDIR)/lib
- cd $(DESTDIR)/lib && \
+ mkdir -p $(DESTDIR)$(PREFIX)/include
+ install -p -m 644 $(INCLUDES) $(DESTDIR)$(PREFIX)/include
+ mkdir -p $(DESTDIR)$(LIBDIR)/libv4l
+ install -m 755 $(V4L1_LIB).$(LIB_RELEASE) $(DESTDIR)$(LIBDIR)
+ cd $(DESTDIR)$(LIBDIR) && \
ln -f -s $(V4L1_LIB).$(LIB_RELEASE) $(V4L1_LIB)
- cp $(V4L1COMPAT).$(LIB_RELEASE) $(DESTDIR)/lib
- cd $(DESTDIR)/lib && \
- ln -f -s $(V4L1COMPAT).$(LIB_RELEASE) $(V4L1COMPAT)
+ install -m 755 $(V4L1COMPAT).$(LIB_RELEASE) \
+ $(DESTDIR)$(LIBDIR)/libv4l/$(V4L1COMPAT)
clean::
rm -f *.so* *.o log *~
diff --git a/v4l2-apps/lib/libv4l/libv4l2/Makefile b/v4l2-apps/lib/libv4l/libv4l2/Makefile
index c5463800b..1258e379b 100644
--- a/v4l2-apps/lib/libv4l/libv4l2/Makefile
+++ b/v4l2-apps/lib/libv4l/libv4l2/Makefile
@@ -19,8 +19,12 @@ ifeq ($(LIB_RELEASE),)
LIB_RELEASE = 0
endif
-ifeq ($(DESTDIR),)
-DESTDIR = /usr/local
+ifeq ($(PREFIX),)
+PREFIX = /usr/local
+endif
+
+ifeq ($(LIBDIR),)
+LIBDIR = $(PREFIX)/lib
endif
all: $(TARGETS)
@@ -30,15 +34,14 @@ $(V4L2_LIB): $(V4L2_OBJS)
$(V4L2CONVERT): $(V4L2CONVERT_O) $(V4L2_LIB)
install: all
- mkdir -p $(DESTDIR)/include
- cp $(INCLUDES) $(DESTDIR)/include
- mkdir -p $(DESTDIR)/lib
- cp $(V4L2_LIB).$(LIB_RELEASE) $(DESTDIR)/lib
- cd $(DESTDIR)/lib && \
+ mkdir -p $(DESTDIR)$(PREFIX)/include
+ install -p -m 644 $(INCLUDES) $(DESTDIR)$(PREFIX)/include
+ mkdir -p $(DESTDIR)$(LIBDIR)/libv4l
+ install -m 755 $(V4L2_LIB).$(LIB_RELEASE) $(DESTDIR)$(LIBDIR)
+ cd $(DESTDIR)$(LIBDIR) && \
ln -f -s $(V4L2_LIB).$(LIB_RELEASE) $(V4L2_LIB)
- cp $(V4L2CONVERT).$(LIB_RELEASE) $(DESTDIR)/lib
- cd $(DESTDIR)/lib && \
- ln -f -s $(V4L2CONVERT).$(LIB_RELEASE) $(V4L2CONVERT)
+ install -m 755 $(V4L2CONVERT).$(LIB_RELEASE) \
+ $(DESTDIR)$(LIBDIR)/libv4l/$(V4L2CONVERT)
clean::
rm -f *.so* *.o log *~
diff --git a/v4l2-apps/lib/libv4l/libv4lconvert/Makefile b/v4l2-apps/lib/libv4l/libv4lconvert/Makefile
index decec4817..38071de94 100644
--- a/v4l2-apps/lib/libv4l/libv4lconvert/Makefile
+++ b/v4l2-apps/lib/libv4l/libv4lconvert/Makefile
@@ -18,8 +18,12 @@ ifeq ($(LIB_RELEASE),)
LIB_RELEASE = 0
endif
-ifeq ($(DESTDIR),)
-DESTDIR = /usr/local
+ifeq ($(PREFIX),)
+PREFIX = /usr/local
+endif
+
+ifeq ($(LIBDIR),)
+LIBDIR = $(PREFIX)/lib
endif
all: $(TARGETS)
@@ -27,11 +31,11 @@ all: $(TARGETS)
$(CONVERT_LIB): $(CONVERT_OBJS)
install: all
- mkdir -p $(DESTDIR)/include
- cp $(INCLUDES) $(DESTDIR)/include
- mkdir -p $(DESTDIR)/lib
- cp $(CONVERT_LIB).$(LIB_RELEASE) $(DESTDIR)/lib
- cd $(DESTDIR)/lib && \
+ mkdir -p $(DESTDIR)$(PREFIX)/include
+ install -p -m 644 $(INCLUDES) $(DESTDIR)$(PREFIX)/include
+ mkdir -p $(DESTDIR)$(LIBDIR)
+ install -m 755 $(CONVERT_LIB).$(LIB_RELEASE) $(DESTDIR)$(LIBDIR)
+ cd $(DESTDIR)$(LIBDIR) && \
ln -f -s $(CONVERT_LIB).$(LIB_RELEASE) $(CONVERT_LIB)
clean::