Annotation of /trunk/libsrtp/patches/libsrtp-1.4.4-shared-2.patch
Parent Directory | Revision Log
Revision 1996 -
(hide annotations)
(download)
Fri Dec 21 10:14:58 2012 UTC (11 years, 9 months ago) by niro
File size: 2153 byte(s)
Fri Dec 21 10:14:58 2012 UTC (11 years, 9 months ago) by niro
File size: 2153 byte(s)
-reworked shared patch
1 | niro | 1996 | diff -Naur srtp/Makefile.in srtp-shared/Makefile.in |
2 | --- srtp/Makefile.in 2006-07-18 19:42:42.000000000 +0200 | ||
3 | +++ srtp-shared/Makefile.in 2012-12-21 13:24:29.413654557 +0100 | ||
4 | @@ -67,7 +67,7 @@ | ||
5 | # implicit rules for object files and test apps | ||
6 | |||
7 | %.o: %.c | ||
8 | - $(COMPILE) -c $< -o $@ | ||
9 | + $(COMPILE) -fPIC -c $< -o $@ | ||
10 | |||
11 | %$(EXE): %.c | ||
12 | $(COMPILE) $(LDFLAGS) $< -o $@ $(SRTPLIB) $(LIBS) | ||
13 | @@ -97,7 +97,7 @@ | ||
14 | |||
15 | cryptobj = $(ciphers) $(hashes) $(math) $(stat) $(kernel) $(replay) | ||
16 | |||
17 | -# libsrtp.a (implements srtp processing) | ||
18 | +# libsrtp (implements srtp processing) | ||
19 | |||
20 | srtpobj = srtp/srtp.o | ||
21 | |||
22 | @@ -105,6 +105,11 @@ | ||
23 | ar cr libsrtp.a $^ | ||
24 | $(RANLIB) libsrtp.a | ||
25 | |||
26 | +libsrtp.so: $(srtpobj) $(cryptobj) $(gdoi) | ||
27 | + $(CC) $(LDFLAGS) -shared -Wl,-soname,$@.1 -o $@.1.0 $^ | ||
28 | + ln -s $@.1.0 $@.1 | ||
29 | + ln -s $@.1.0 $@ | ||
30 | + | ||
31 | # libcryptomath.a contains general-purpose routines that are used to | ||
32 | # generate tables and verify cryptoalgorithm implementations - this | ||
33 | # library is not meant to be included in production code | ||
34 | @@ -127,7 +132,7 @@ | ||
35 | test/roc_driver$(EXE) test/rdbx_driver$(EXE) test/rtpw$(EXE) \ | ||
36 | test/dtls_srtp_driver$(EXE) | ||
37 | |||
38 | -$(testapp): libsrtp.a | ||
39 | +$(testapp): libsrtp.so | ||
40 | |||
41 | test/rtpw$(EXE): test/rtpw.c test/rtp.c test/getopt_s.c | ||
42 | $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB) | ||
43 | @@ -197,14 +202,22 @@ | ||
44 | cp include/*.h $(DESTDIR)$(includedir)/srtp | ||
45 | cp crypto/include/*.h $(DESTDIR)$(includedir)/srtp | ||
46 | if [ -f libsrtp.a ]; then cp libsrtp.a $(DESTDIR)$(libdir)/; fi | ||
47 | + if [ -f libsrtp.so.1.0 ]; then \ | ||
48 | + cp libsrtp.so.1.0 $(DESTDIR)$(libdir)/; \ | ||
49 | + ln -s libsrtp.so.1.0 $(DESTDIR)$(libdir)/libsrtp.so.1; \ | ||
50 | + ln -s libsrtp.so.1.0 $(DESTDIR)$(libdir)/libsrtp.so; \ | ||
51 | + fi | ||
52 | |||
53 | uninstall: | ||
54 | rm -rf $(DESTDIR)$(includedir)/srtp | ||
55 | rm -rf $(DESTDIR)$(libdir)/libsrtp.a | ||
56 | + rm -rf $(DESTDIR)$(libdir)/libsrtp.so.1.0 | ||
57 | + rm -rf $(DESTDIR)$(libdir)/libsrtp.so.1 | ||
58 | + rm -rf $(DESTDIR)$(libdir)/libsrtp.so | ||
59 | |||
60 | clean: | ||
61 | rm -rf $(cryptobj) $(srtpobj) $(cryptomath) TAGS \ | ||
62 | - libcryptomath.a libsrtp.a core *.core test/core | ||
63 | + libcryptomath.a libsrtp.* core *.core test/core \ | ||
64 | for a in * */* */*/*; do \ | ||
65 | if [ -f "$$a~" ] ; then rm -f $$a~; fi; \ | ||
66 | done; |