aboutsummaryrefslogtreecommitdiff
path: root/lib/libcec
diff options
context:
space:
mode:
authorLars Op den Kamp <lars@opdenkamp.eu>2011-10-11 00:39:21 +0200
committerLars Op den Kamp <lars@opdenkamp.eu>2011-10-11 00:59:58 +0200
commit4f2c2b68ba04c6cc041d13f47583940759e97693 (patch)
tree0f7271cc439be2c75b52691add41589edb1b0f37 /lib/libcec
parentc4927115ea390991ec91997b1a10f5cc2b240b8c (diff)
cec: use libcec as an internal lib and fetch it in "bootstrap". added --enable-external-libcec option to configure.
to keep a permanent copy, remove "make download" from bootstrap to change the location of the tarball to another mirror, change lib/libcec/Makefile.in
Diffstat (limited to 'lib/libcec')
-rw-r--r--lib/libcec/Makefile.in51
1 files changed, 51 insertions, 0 deletions
diff --git a/lib/libcec/Makefile.in b/lib/libcec/Makefile.in
new file mode 100644
index 0000000000..4343cfb4c0
--- /dev/null
+++ b/lib/libcec/Makefile.in
@@ -0,0 +1,51 @@
+# Download and build libCEC
+#
+# Usage:
+# make download
+# make bootstrap
+# make configure
+# make
+
+# lib name, version
+LIBNAME=libcec
+VERSION=0.6
+ARCHIVE=$(LIBNAME)-$(VERSION)
+
+# download location and format
+ARCHIVE_BASE_URL=http://github.com/Pulse-Eight/$(LIBNAME)/tarball/
+ARCHIVE_EXTRACTED_DIR=Pulse-Eight-libcec-d9ba5be
+ARCHIVE_URL=$(ARCHIVE_BASE_URL)$(ARCHIVE)
+ARCHIVE_TOOL=tar
+ARCHIVE_TOOL_FLAGS=xf
+ARCHIVE_ADD_EXTENSION=.tar.gz
+RETRIEVE_TOOL=/usr/bin/curl
+RETRIEVE_TOOL_FLAGS=-Ls --create-dirs --output $(ARCHIVE)$(ARCHIVE_ADD_EXTENSION)
+
+# configuration
+PREFIX ?= @abs_top_srcdir@/lib/libcec
+LIBCEC_CONFIGOPTS ?= --prefix=$(PREFIX)
+CONFIGURE=./configure CFLAGS=-D_FILE_OFFSET_BITS=64 $(LIBCEC_CONFIGOPTS)
+
+all: libcec.a
+
+download: distclean
+ $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(ARCHIVE_URL)
+ $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(ARCHIVE)$(ARCHIVE_ADD_EXTENSION)
+ rm -f $(ARCHIVE)$(ARCHIVE_ADD_EXTENSION)
+ mv $(ARCHIVE_EXTRACTED_DIR) $(LIBNAME)
+ mkdir -p include/libcec
+ cp $(LIBNAME)/include/* include/libcec
+
+libcec.a:
+ make -C $(LIBNAME)
+ cp $(LIBNAME)/src/lib/.libs/libcec.a libcec.a
+
+clean:
+ rm -f libcec.a
+ make -C $(LIBNAME) clean
+
+distclean:
+ rm -f $(ARCHIVE) libcec.a Makefile
+ rm -rf include
+ rm -rf $(LIBNAME)
+ rm -rf $(ARCHIVE_DIR)