From 1c55f8424e12406b5b4b975fb25ad03436cf33c4 Mon Sep 17 00:00:00 2001
From: Luigi Rizzo <rizzo@icir.org>
Date: Mon, 5 Nov 2007 21:36:11 +0000
Subject: [PATCH] Move AUDIO_LIBS outside the top level Makefile. This too is
 used only in one place.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 Makefile       | 3 +--
 utils/Makefile | 4 ++++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index c0364984f7..e617a3bbf6 100644
--- a/Makefile
+++ b/Makefile
@@ -270,7 +270,6 @@ MOD_SUBDIRS_EMBED_LIBS:=$(MOD_SUBDIRS:%=%-embed-libs)
 
 ifneq ($(findstring darwin,$(OSARCH)),)
   ASTCFLAGS+=-D__Darwin__
-  AUDIO_LIBS=-framework CoreAudio
   SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace
 else
 # These are used for all but Darwin
@@ -351,7 +350,7 @@ $(MOD_SUBDIRS):
 
 $(OTHER_SUBDIRS):
 	@echo "   [enter SUBDIR $@/]"
-	@ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" AUDIO_LIBS="$(AUDIO_LIBS)" $(MAKE) --no-print-directory --no-builtin-rules -C $@ SUBDIR=$@ all
+	@ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(MAKE) --no-print-directory --no-builtin-rules -C $@ SUBDIR=$@ all
 	@echo "   [exit SUBDIR $@/]"
 
 defaults.h: makeopts
diff --git a/utils/Makefile b/utils/Makefile
index 6ea4fc581b..a1e89b8c94 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -30,6 +30,10 @@ ifeq ($(OSARCH),OpenBSD)
   UTILS:=$(filter-out muted,$(UTILS))
 endif
 
+ifneq ($(findstring darwin,$(OSARCH)),)
+  AUDIO_LIBS=-framework CoreAudio
+endif
+
 ifeq ($(POPT_LIB),)
   UTILS:=$(filter-out smsq,$(UTILS))
 endif
-- 
GitLab