[rtmpdump] r383 - in trunk/librtmp: Makefile librtmp.pc.in

hyc subversion at mplayerhq.hu
Mon Mar 22 06:47:31 CET 2010


Author: hyc
Date: Mon Mar 22 06:47:30 2010
New Revision: 383

Log:
Add install target, create pkgconfig for install

Added:
   trunk/librtmp/librtmp.pc.in
Modified:
   trunk/librtmp/Makefile

Modified: trunk/librtmp/Makefile
==============================================================================
--- trunk/librtmp/Makefile	Mon Mar 22 04:38:13 2010	(r382)
+++ trunk/librtmp/Makefile	Mon Mar 22 06:47:30 2010	(r383)
@@ -1,10 +1,21 @@
+prefix=/usr/local
+
 CC=$(CROSS_COMPILE)gcc
 LD=$(CROSS_COMPILE)ld
 
-DEF=-DRTMPDUMP_VERSION=\"v2.2a\" # -DUSE_GNUTLS
+CRYPTO=OPENSSL
+#CRYPTO=GNUTLS
+LIB_GNUTLS=-lgnutls
+LIB_OPENSSL=-lssl -lcrypto
+CRYPTO_LIB=$(LIB_$(CRYPTO))
+VERSION=v2.2a
+
+DEF=-DRTMPDUMP_VERSION=\"$(VERSION)\" -DUSE_$(CRYPTO)
 OPT=-O2
 CFLAGS=-Wall $(XCFLAGS) $(INC) $(DEF) $(OPT)
 
+INCDIR=$(DESTDIR)$(prefix)/include/librtmp
+
 all:	librtmp.a
 
 clean:
@@ -18,3 +29,12 @@ rtmp.o: rtmp.c rtmp.h rtmp_sys.h handsha
 amf.o: amf.c amf.h bytes.h log.h Makefile
 hashswf.o: hashswf.c http.h rtmp.h rtmp_sys.h Makefile
 parseurl.o: parseurl.c rtmp_sys.h log.h Makefile
+
+librtmp.pc: librtmp.pc.in Makefile
+	sed -e "s;@prefix@;$(prefix);" -e "s;@VERSION@;$(VERSION);" \
+		-e "s;@CRYPTO_LIB@;$(CRYPTO_LIB);" librtmp.pc.in > $@
+
+install:	librtmp.a librtmp.pc
+	-mkdir $(INCDIR); cp amf.h http.h log.h rtmp.h $(INCDIR)
+	cp librtmp.a $(DESTDIR)$(prefix)/lib
+	cp librtmp.pc $(DESTDIR)$(prefix)/lib/pkgconfig

Added: trunk/librtmp/librtmp.pc.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/librtmp/librtmp.pc.in	Mon Mar 22 06:47:30 2010	(r383)
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+incdir=${prefix}/include
+
+Name: librtmp
+Description: RTMP implementation
+Version: @VERSION@
+URL: http://rtmpdump.mplayerhq.hu
+Libs: -L${libdir} -lrtmp
+Libs.private: @CRYPTO_LIB@ -lz
+Cflags: -I${incdir}


More information about the rtmpdump mailing list