summaryrefslogtreecommitdiff
path: root/v4l2-apps/lib/libv4l/libv4l2
diff options
context:
space:
mode:
authorThierry MERLE <thierry.merle@free.fr>2008-07-04 19:28:49 +0200
committerThierry MERLE <thierry.merle@free.fr>2008-07-04 19:28:49 +0200
commit40536a32a310338da9cf2c697dd978780aeda18a (patch)
treea90ad5019b39ad8e1d87f0e60df1bd75c66b72ae /v4l2-apps/lib/libv4l/libv4l2
parenta2ba6df565553cab552748eed038e5ed50a83fe8 (diff)
downloadmediapointer-dvb-s2-40536a32a310338da9cf2c697dd978780aeda18a.tar.gz
mediapointer-dvb-s2-40536a32a310338da9cf2c697dd978780aeda18a.tar.bz2
v4l2-library: libv4l-makefile-improvements.patch
From: Hans de Goede <j.w.r.degoede@hhs.nl> Makefile improvements: * Split DESTDIR into DESTDIR and PREFIX as used in most makefiles out there * Add LIBDIR variable to allow installation in <prefix>/lib64 for example * Install the wrappers in <libdir>/libv4l instead of directly under libdir, as they are not libraries meant for linking * preserve timestamps of header files when installing them Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Diffstat (limited to 'v4l2-apps/lib/libv4l/libv4l2')
-rw-r--r--v4l2-apps/lib/libv4l/libv4l2/Makefile23
1 files changed, 13 insertions, 10 deletions
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 *~