979ab4aaf4
- move srtp to libsrtp, rename package from srtp to libsrtp - use CONIGURE_ARGS instead of overriding Build/Configure - use PKG_INSTALL instead of overriding Build/Compile - refresh patches git-svn-id: svn://svn.openwrt.org/openwrt/packages@29808 3c298f89-4303-0410-b956-a3cf2f4a3e73
56 lines
1.8 KiB
Diff
56 lines
1.8 KiB
Diff
Description: Hack build routines to compile shared library
|
|
Author: loki_val and solar
|
|
Origin: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-libs/libsrtp/files/libsrtp-1.4.4-shared.patch
|
|
Last-Update: 2010-03-19
|
|
--- a/Makefile.in
|
|
+++ b/Makefile.in
|
|
@@ -15,7 +15,7 @@
|
|
|
|
.PHONY: all test build_table_apps
|
|
|
|
-all: test
|
|
+all: libsrtp.so test
|
|
|
|
runtest: build_table_apps test
|
|
@echo "running libsrtp test applications..."
|
|
@@ -67,7 +67,7 @@ libdir = @libdir@
|
|
# implicit rules for object files and test apps
|
|
|
|
%.o: %.c
|
|
- $(COMPILE) -c $< -o $@
|
|
+ $(COMPILE) -fPIC -c $< -o $@
|
|
|
|
%$(EXE): %.c
|
|
$(COMPILE) $(LDFLAGS) $< -o $@ $(SRTPLIB) $(LIBS)
|
|
@@ -105,6 +105,9 @@ libsrtp.a: $(srtpobj) $(cryptobj) $(gdoi
|
|
ar cr libsrtp.a $^
|
|
$(RANLIB) libsrtp.a
|
|
|
|
+libsrtp.so: $(srtpobj) $(cryptobj) $(gdoi)
|
|
+ $(CC) $(LDFLAGS) -shared -Wl,-soname,libsrtp.so.0 -o libsrtp.so.0.0 $^
|
|
+
|
|
# libcryptomath.a contains general-purpose routines that are used to
|
|
# generate tables and verify cryptoalgorithm implementations - this
|
|
# library is not meant to be included in production code
|
|
@@ -197,6 +200,11 @@ install:
|
|
cp include/*.h $(DESTDIR)$(includedir)/srtp
|
|
cp crypto/include/*.h $(DESTDIR)$(includedir)/srtp
|
|
if [ -f libsrtp.a ]; then cp libsrtp.a $(DESTDIR)$(libdir)/; fi
|
|
+ if [ -f libsrtp.so.0.0 ]; then \
|
|
+ cp libsrtp.so.0.0 $(DESTDIR)$(libdir)/; \
|
|
+ ln -s libsrtp.so.0.0 $(DESTDIR)$(libdir)/libsrtp.so.0; \
|
|
+ ln -s libsrtp.so.0.0 $(DESTDIR)$(libdir)/libsrtp.so; \
|
|
+ fi
|
|
|
|
uninstall:
|
|
rm -rf $(DESTDIR)$(includedir)/srtp
|
|
@@ -204,7 +212,7 @@ uninstall:
|
|
|
|
clean:
|
|
rm -rf $(cryptobj) $(srtpobj) $(cryptomath) TAGS \
|
|
- libcryptomath.a libsrtp.a core *.core test/core
|
|
+ libcryptomath.a libsrtp.a libsrtp.so.0.0 core *.core test/core
|
|
for a in * */* */*/*; do \
|
|
if [ -f "$$a~" ] ; then rm -f $$a~; fi; \
|
|
done;
|