From 831823773e16aff2a237335145effd426d5ebf87 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Sat, 23 Nov 2013 07:13:40 +0000 Subject: Fixed #1713: Enable building the libraries as shared libraries/DLLs for GNU targets git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4656 74dad513-b988-da41-8d7b-12977e46ad98 --- third_party/build/srtp/Makefile | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'third_party/build/srtp/Makefile') diff --git a/third_party/build/srtp/Makefile b/third_party/build/srtp/Makefile index 17cb4217..9538f0bb 100644 --- a/third_party/build/srtp/Makefile +++ b/third_party/build/srtp/Makefile @@ -5,7 +5,13 @@ export LIBDIR := ../../lib RULES_MAK := $(PJDIR)/build/rules.mak -export SRTP_LIB := ../../lib/libsrtp-$(TARGET_NAME)$(LIBEXT) +export SRTP_LIB := libsrtp-$(TARGET_NAME)$(LIBEXT) + +ifeq ($(PJ_SHARED_LIBRARIES),) +else +export SRTP_SONAME := libsrtp.$(SHLIB_SUFFIX) +export SRTP_SHLIB := $(SRTP_SONAME).$(PJ_VERSION_MAJOR) +endif ############################################################################### # Gather all flags. @@ -57,7 +63,7 @@ export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT # # $(TARGET) is defined in os-$(OS_NAME).mak file in current directory. # -TARGETS := libsrtp +TARGETS := $(SRTP_LIB) $(SRTP_SONAME) all: $(TARGETS) @@ -67,10 +73,14 @@ doc: dep: depend distclean: realclean -.PHONY: dep depend libsrtp clean realclean distclean +.PHONY: all dep depend clean realclean distclean +.PHONY: $(TARGETS) +.PHONY: $(SRTP_LIB) $(SRTP_SONAME) -libsrtp: - $(MAKE) -f $(RULES_MAK) APP=SRTP app=libsrtp $(SRTP_LIB) +libsrtp: $(SRTP_LIB) +$(SRTP_SONAME): $(SRTP_LIB) +$(SRTP_LIB) $(SRTP_SONAME): + $(MAKE) -f $(RULES_MAK) APP=SRTP app=libsrtp $(subst /,$(HOST_PSEP),$(LIBDIR)/$@) clean print_lib: $(MAKE) -f $(RULES_MAK) APP=SRTP app=libsrtp $@ -- cgit v1.2.3