1 Description: Hack build routines to compile shared library
2 Author: loki_val and solar
3 Origin: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-libs/libsrtp/files/libsrtp-1.4.4-shared.patch
4 Last-Update: 2010-03-19
9 .PHONY: all test build_table_apps
14 runtest: build_table_apps test
15 @echo "running libsrtp test applications..."
16 @@ -67,7 +67,7 @@ libdir = @libdir@
17 # implicit rules for object files and test apps
20 - $(COMPILE) -c $< -o $@
21 + $(COMPILE) -fPIC -c $< -o $@
24 $(COMPILE) $(LDFLAGS) $< -o $@ $(SRTPLIB) $(LIBS)
25 @@ -105,6 +105,9 @@ libsrtp.a: $(srtpobj) $(cryptobj) $(gdoi
29 +libsrtp.so: $(srtpobj) $(cryptobj) $(gdoi)
30 + $(CC) $(LDFLAGS) -shared -Wl,-soname,libsrtp.so.0 -o libsrtp.so.0.0 $^
32 # libcryptomath.a contains general-purpose routines that are used to
33 # generate tables and verify cryptoalgorithm implementations - this
34 # library is not meant to be included in production code
35 @@ -197,6 +200,11 @@ install:
36 cp include/*.h $(DESTDIR)$(includedir)/srtp
37 cp crypto/include/*.h $(DESTDIR)$(includedir)/srtp
38 if [ -f libsrtp.a ]; then cp libsrtp.a $(DESTDIR)$(libdir)/; fi
39 + if [ -f libsrtp.so.0.0 ]; then \
40 + cp libsrtp.so.0.0 $(DESTDIR)$(libdir)/; \
41 + ln -s libsrtp.so.0.0 $(DESTDIR)$(libdir)/libsrtp.so.0; \
42 + ln -s libsrtp.so.0.0 $(DESTDIR)$(libdir)/libsrtp.so; \
46 rm -rf $(DESTDIR)$(includedir)/srtp
47 @@ -204,7 +212,7 @@ uninstall:
50 rm -rf $(cryptobj) $(srtpobj) $(cryptomath) TAGS \
51 - libcryptomath.a libsrtp.a core *.core test/core
52 + libcryptomath.a libsrtp.a libsrtp.so.0.0 core *.core test/core
53 for a in * */* */*/*; do \
54 if [ -f "$$a~" ] ; then rm -f $$a~; fi; \