Blame SOURCES/libsrtp-1.4.4-shared.patch

0faf0c
diff -up srtp/Makefile.in.shared srtp/Makefile.in
0faf0c
--- srtp/Makefile.in.shared	2010-05-21 13:45:35.000000000 -0400
0faf0c
+++ srtp/Makefile.in	2010-10-04 15:53:29.132116130 -0400
0faf0c
@@ -8,7 +8,7 @@
0faf0c
 # runtest       runs test applications 
0faf0c
 # test		builds test applications
0faf0c
 # libcrypt.a	static library implementing crypto engine
0faf0c
-# libsrtp.a	static library implementing srtp
0faf0c
+# libsrtp.so	shared library implementing srtp
0faf0c
 # clean		removes objects, libs, and executables
0faf0c
 # distribution  cleans and builds a .tgz
0faf0c
 # tags          builds etags file from all .c and .h files
0faf0c
@@ -97,13 +97,13 @@ kernel  = crypto/kernel/crypto_kernel.o 
0faf0c
 
0faf0c
 cryptobj =  $(ciphers) $(hashes) $(math) $(stat) $(kernel) $(replay)
0faf0c
 
0faf0c
-# libsrtp.a (implements srtp processing)
0faf0c
+# libsrtp (implements srtp processing)
0faf0c
 
0faf0c
 srtpobj = srtp/srtp.o srtp/ekt.o
0faf0c
 
0faf0c
-libsrtp.a: $(srtpobj) $(cryptobj) $(gdoi)
0faf0c
-	ar cr libsrtp.a $^
0faf0c
-	$(RANLIB) libsrtp.a
0faf0c
+libsrtp.so: $(srtpobj) $(cryptobj) $(gdoi)
0faf0c
+	$(COMPILE) -shared -pthread -lm -Wl,--no-undefined -Wl,-soname,$@.0 -z noexecstack -o $@.0.0.0 $^
0faf0c
+	ln -s $@.0.0.0 $@	
0faf0c
 
0faf0c
 # libcryptomath.a contains general-purpose routines that are used to
0faf0c
 # generate tables and verify cryptoalgorithm implementations - this
0faf0c
@@ -127,19 +127,19 @@ testapp = $(crypto_testapp) test/srtp_dr
0faf0c
 	  test/roc_driver$(EXE) test/rdbx_driver$(EXE) test/rtpw$(EXE) \
0faf0c
 	  test/dtls_srtp_driver$(EXE)
0faf0c
 
0faf0c
-$(testapp): libsrtp.a
0faf0c
+$(testapp): libsrtp.so
0faf0c
 
0faf0c
 test/rtpw$(EXE): test/rtpw.c test/rtp.c test/getopt_s.c
0faf0c
-	$(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB)
0faf0c
+	$(COMPILE) $(LDFLAGS) -o $@ test/rtpw.c test/rtp.c test/getopt_s.c $(LIBS) $(SRTPLIB)
0faf0c
 
0faf0c
 test/srtp_driver$(EXE): test/srtp_driver.c test/getopt_s.c
0faf0c
-	$(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB)
0faf0c
+	$(COMPILE) $(LDFLAGS) -o $@ test/srtp_driver.c test/getopt_s.c $(LIBS) $(SRTPLIB)
0faf0c
 
0faf0c
 test/rdbx_driver$(EXE): test/rdbx_driver.c test/getopt_s.c
0faf0c
-	$(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB)
0faf0c
+	$(COMPILE) $(LDFLAGS) -o $@ test/rdbx_driver.c test/getopt_s.c $(LIBS) $(SRTPLIB)
0faf0c
 
0faf0c
 test/dtls_srtp_driver$(EXE): test/dtls_srtp_driver.c test/getopt_s.c
0faf0c
-	$(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB)
0faf0c
+	$(COMPILE) $(LDFLAGS) -o $@ test/dtls_srtp_driver.c test/getopt_s.c $(LIBS) $(SRTPLIB)
0faf0c
 
0faf0c
 test: $(testapp)
0faf0c
 	@echo "Build done. Please run '$(MAKE) runtest' to run self tests."
0faf0c
@@ -197,16 +197,16 @@ install:
0faf0c
 	cp $(srcdir)/include/*.h $(DESTDIR)$(includedir)/srtp  
0faf0c
 	cp $(srcdir)/crypto/include/*.h $(DESTDIR)$(includedir)/srtp
0faf0c
 	if [ "$(srcdir)" != "." ]; then cp crypto/include/*.h $(DESTDIR)$(includedir)/srtp; fi
0faf0c
-	if [ -f libsrtp.a ]; then cp libsrtp.a $(DESTDIR)$(libdir)/; fi
0faf0c
+	if [ -f libsrtp.so.0.0.0 ]; then cp libsrtp.so.0.0.0 $(DESTDIR)$(libdir)/; fi
0faf0c
 
0faf0c
 uninstall:
0faf0c
 	rm -f $(DESTDIR)$(includedir)/srtp/*.h
0faf0c
-	rm -f $(DESTDIR)$(libdir)/libsrtp.a
0faf0c
+	rm -f $(DESTDIR)$(libdir)/libsrtp.so*
0faf0c
 	-rmdir $(DESTDIR)$(includedir)/srtp
0faf0c
 
0faf0c
 clean:
0faf0c
 	rm -rf $(cryptobj) $(srtpobj) $(cryptomath) TAGS \
0faf0c
-        libcryptomath.a libsrtp.a core *.core test/core
0faf0c
+        libcryptomath.a libsrtp.so* core *.core test/core
0faf0c
 	for a in * */* */*/*; do			\
0faf0c
               if [ -f "$$a~" ] ; then rm -f $$a~; fi;	\
0faf0c
         done;