summaryrefslogtreecommitdiff
path: root/v4l2-apps/lib/libv4l/libv4l1
diff options
context:
space:
mode:
authorhans@localhost.localdomain <hans@localhost.localdomain>2008-07-29 23:02:59 +0200
committerhans@localhost.localdomain <hans@localhost.localdomain>2008-07-29 23:02:59 +0200
commit55b3e527968b0644e7eaf3aae2b873249400b614 (patch)
treede200173976ced6eb1ac9952e3fad9cfc8250eba /v4l2-apps/lib/libv4l/libv4l1
parent46da27966fefda91510002ea939d6e901c86f1d7 (diff)
downloadmediapointer-dvb-s2-55b3e527968b0644e7eaf3aae2b873249400b614.tar.gz
mediapointer-dvb-s2-55b3e527968b0644e7eaf3aae2b873249400b614.tar.bz2
libv4l: add pkg-config (.pc) files for easier detection if libv4l is available
From: Hans de Goede <j.w.r.degoede@hhs.nl> libv4l: add pkg-config (.pc) files for easier detection if libv4l is available Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Diffstat (limited to 'v4l2-apps/lib/libv4l/libv4l1')
-rw-r--r--v4l2-apps/lib/libv4l/libv4l1/Makefile17
1 files changed, 14 insertions, 3 deletions
diff --git a/v4l2-apps/lib/libv4l/libv4l1/Makefile b/v4l2-apps/lib/libv4l/libv4l1/Makefile
index 8cb064cd4..4e9206bf6 100644
--- a/v4l2-apps/lib/libv4l/libv4l1/Makefile
+++ b/v4l2-apps/lib/libv4l/libv4l1/Makefile
@@ -12,7 +12,7 @@ V4L1_OBJS = libv4l1.o log.o ../libv4l2/libv4l2.so
V4L1_LIB = libv4l1.so
V4L1COMPAT = v4l1compat.so
V4L1COMPAT_O = v4l1compat.o libv4l1.so
-TARGETS = $(V4L1_LIB) $(V4L1COMPAT)
+TARGETS = $(V4L1_LIB) $(V4L1COMPAT) libv4l1.pc
INCLUDES = ../include/libv4l1.h
ifeq ($(LIB_RELEASE),)
@@ -34,6 +34,16 @@ $(V4L1_LIB): $(V4L1_OBJS)
$(V4L1COMPAT): $(V4L1COMPAT_O) $(V4L1_LIB)
+libv4l1.pc:
+ echo prefix=$(PREFIX) > libv4l1.pc
+ echo libdir=$(LIBDIR) >> libv4l1.pc
+ echo >> libv4l1.pc
+ echo 'Name: libv4l1' >> libv4l1.pc
+ echo 'Description: v4l1 compatibility library' >> libv4l1.pc
+ echo 'Version: '$(V4L2_LIB_VERSION) >> libv4l1.pc
+ echo 'Libs: -L$${libdir} -lv4l1' >> libv4l1.pc
+ echo 'Cflags: -I$${prefix}/include' >> libv4l1.pc
+
install: all
mkdir -p $(DESTDIR)$(PREFIX)/include
install -p -m 644 $(INCLUDES) $(DESTDIR)$(PREFIX)/include
@@ -43,10 +53,11 @@ install: all
ln -f -s $(V4L1_LIB).$(LIB_RELEASE) $(V4L1_LIB)
install -m 755 $(V4L1COMPAT).$(LIB_RELEASE) \
$(DESTDIR)$(LIBDIR)/libv4l/$(V4L1COMPAT)
+ mkdir -p $(DESTDIR)$(LIBDIR)/pkgconfig
+ install -m 644 libv4l1.pc $(DESTDIR)$(LIBDIR)/pkgconfig
clean::
- rm -f *.so* *.o log *~
- rm -f *.d
+ rm -f *.so* *.o *.d libv4l1.pc log *~
%.o: %.c
$(CC) -c -MMD $(CPPFLAGS) $(CFLAGS) -o $@ $<