summaryrefslogtreecommitdiff
path: root/third_party/build/speex/Makefile
diff options
context:
space:
mode:
authorJason Parker <jparker@digium.com>2013-03-11 15:49:45 -0500
committerJason Parker <jparker@digium.com>2013-03-11 15:49:45 -0500
commit09114052f74fe74bbf652189cedefe41b7141b86 (patch)
tree6814977399b53176a53efc7ef5dffda1643b9d27 /third_party/build/speex/Makefile
parent1873b7a03a08b00140610d531bb6c0bb71e0e91a (diff)
parent1ab0bfe2d710db21587a9bf6c01b2392d5bd8ac7 (diff)
Merge branch 'patch/shared-libraries' of github.com:asterisk/pjproject
Conflicts: aconfigure build/rules.mak
Diffstat (limited to 'third_party/build/speex/Makefile')
-rw-r--r--third_party/build/speex/Makefile20
1 files changed, 15 insertions, 5 deletions
diff --git a/third_party/build/speex/Makefile b/third_party/build/speex/Makefile
index d31166e..7e5e6fd 100644
--- a/third_party/build/speex/Makefile
+++ b/third_party/build/speex/Makefile
@@ -5,7 +5,13 @@ export LIBDIR := ../../lib
RULES_MAK := $(PJDIR)/build/rules.mak
-export SPEEX_LIB := ../../lib/libspeex-$(TARGET_NAME)$(LIBEXT)
+export SPEEX_LIB := libspeex-$(TARGET_NAME)$(LIBEXT)
+
+ifeq ($(PJ_SHARED_LIBRARIES),)
+else
+export SPEEX_SONAME := libspeex.$(SHLIB_SUFFIX)
+export SPEEX_SHLIB := $(SPEEX_SONAME).$(PJ_VERSION_MAJOR)
+endif
###############################################################################
# Gather all flags.
@@ -44,7 +50,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 := libspeex
+TARGETS := $(SPEEX_LIB) $(SPEEX_SONAME)
all: $(TARGETS)
@@ -54,10 +60,14 @@ doc:
dep: depend
distclean: realclean
-.PHONY: dep depend libspeex clean realclean distclean
+.PHONY: all dep depend clean realclean distclean
+.PHONY: $(TARGETS)
+.PHONY: $(SPEEX_LIB) $(SPEEX_SONAME)
-libspeex:
- $(MAKE) -f $(RULES_MAK) APP=SPEEX app=libspeex $(SPEEX_LIB)
+libspeex: $(SPEEX_LIB)
+$(SPEEX_SONAME): $(SPEEX_LIB)
+$(SPEEX_LIB) $(SPEEX_SONAME):
+ $(MAKE) -f $(RULES_MAK) APP=SPEEX app=libspeex $(subst /,$(HOST_PSEP),$(LIBDIR)/$@)
clean print_lib:
$(MAKE) -f $(RULES_MAK) APP=SPEEX app=libspeex $@