- add a copyright header to the build_tools Makefile - remove 'depend' from the 'all' target in agi/ and utils/ since it is handled by the main Makefile already git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
108 lines
4.2 KiB
Makefile
108 lines
4.2 KiB
Makefile
#
|
|
# Asterisk -- A telephony toolkit for Linux.
|
|
#
|
|
# Makefile for sound files
|
|
#
|
|
# Copyright (C) 2006, Digium, Inc.
|
|
#
|
|
# Kevin P. Fleming <kpfleming@digium.com>
|
|
#
|
|
# This program is free software, distributed under the terms of
|
|
# the GNU General Public License
|
|
#
|
|
|
|
.PHONY: dist-clean all
|
|
|
|
ifneq ($(wildcard ../menuselect.makeopts),)
|
|
include ../menuselect.makeopts
|
|
endif
|
|
|
|
PWD:=$(shell pwd)
|
|
SOUNDS_DIR:=$(DESTDIR)$(ASTDATADIR)/sounds
|
|
MOH_DIR:=$(DESTDIR)$(ASTDATADIR)/moh
|
|
CORE_SOUNDS_VERSION:=1.4.0
|
|
SOUNDS_URL:=http://ftp.digium.com/pub/telephony/sounds/releases
|
|
MOH_URL:=http://ftp.digium.com/pub/telephony/sounds
|
|
MENUSELECT_CORE_SOUNDS:=$(subst -EN-,-en-,$(MENUSELECT_CORE_SOUNDS))
|
|
MENUSELECT_CORE_SOUNDS:=$(subst -FR-,-fr-,$(MENUSELECT_CORE_SOUNDS))
|
|
MENUSELECT_CORE_SOUNDS:=$(subst -ES-,-es-,$(MENUSELECT_CORE_SOUNDS))
|
|
MENUSELECT_CORE_SOUNDS:=$(subst -WAV,-wav,$(MENUSELECT_CORE_SOUNDS))
|
|
MENUSELECT_CORE_SOUNDS:=$(subst -ULAW,-ulaw,$(MENUSELECT_CORE_SOUNDS))
|
|
MENUSELECT_CORE_SOUNDS:=$(subst -ALAW,-alaw,$(MENUSELECT_CORE_SOUNDS))
|
|
MENUSELECT_CORE_SOUNDS:=$(subst -GSM,-gsm,$(MENUSELECT_CORE_SOUNDS))
|
|
MENUSELECT_CORE_SOUNDS:=$(subst -G729,-g729,$(MENUSELECT_CORE_SOUNDS))
|
|
CORE_SOUNDS:=$(MENUSELECT_CORE_SOUNDS:CORE-SOUNDS-%=asterisk-core-sounds-%-$(CORE_SOUNDS_VERSION).tar.gz)
|
|
CORE_SOUND_TAGS:=$(MENUSELECT_CORE_SOUNDS:CORE-SOUNDS-%=$(SOUNDS_DIR)/.asterisk-core-sounds-%-$(CORE_SOUNDS_VERSION))
|
|
MENUSELECT_EXTRA_SOUNDS:=$(subst -EN-,-en-,$(MENUSELECT_EXTRA_SOUNDS))
|
|
MENUSELECT_EXTRA_SOUNDS:=$(subst -FR-,-fr-,$(MENUSELECT_EXTRA_SOUNDS))
|
|
MENUSELECT_EXTRA_SOUNDS:=$(subst -ES-,-es-,$(MENUSELECT_EXTRA_SOUNDS))
|
|
MENUSELECT_EXTRA_SOUNDS:=$(subst -WAV,-wav,$(MENUSELECT_EXTRA_SOUNDS))
|
|
MENUSELECT_EXTRA_SOUNDS:=$(subst -ULAW,-ulaw,$(MENUSELECT_EXTRA_SOUNDS))
|
|
MENUSELECT_EXTRA_SOUNDS:=$(subst -ALAW,-alaw,$(MENUSELECT_EXTRA_SOUNDS))
|
|
MENUSELECT_EXTRA_SOUNDS:=$(subst -GSM,-gsm,$(MENUSELECT_EXTRA_SOUNDS))
|
|
MENUSELECT_EXTRA_SOUNDS:=$(subst -G729,-g729,$(MENUSELECT_EXTRA_SOUNDS))
|
|
EXTRA_SOUNDS:=$(MENUSELECT_EXTRA_SOUNDS:EXTRA-SOUNDS-%=asterisk-extra-sounds-%.tar.gz)
|
|
MENUSELECT_MOH:=$(subst -FREEPLAY-,-freeplay-,$(MENUSELECT_MOH))
|
|
MENUSELECT_MOH:=$(subst -WAV,-wav,$(MENUSELECT_MOH))
|
|
MENUSELECT_MOH:=$(subst -ULAW,-ulaw,$(MENUSELECT_MOH))
|
|
MENUSELECT_MOH:=$(subst -ALAW,-alaw,$(MENUSELECT_MOH))
|
|
MENUSELECT_MOH:=$(subst -GSM,-gsm,$(MENUSELECT_MOH))
|
|
MENUSELECT_MOH:=$(subst -G729,-g729,$(MENUSELECT_MOH))
|
|
MOH:=$(MENUSELECT_MOH:MOH-%=asterisk-moh-%.tar.gz)
|
|
MOH_TAGS:=$(MENUSELECT_MOH:MOH-%=$(MOH_DIR)/.asterisk-moh-%)
|
|
WGET_ARGS:=--continue
|
|
|
|
$(SOUNDS_DIR)/.asterisk-core-sounds-en-%:
|
|
@PACKAGE=$(subst $(SOUNDS_DIR)/.asterisk,asterisk,$@).tar.gz; \
|
|
if ! test -f $${PACKAGE}; then wget $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
|
|
if ! test -f $${PACKAGE}; then exit 1; fi; \
|
|
rm -f $(subst -$(CORE_SOUNDS_VERSION),,$@)-* && \
|
|
(cd $(SOUNDS_DIR); tar xzf $(PWD)/$${PACKAGE}) && \
|
|
touch $@
|
|
|
|
$(SOUNDS_DIR)/.asterisk-core-sounds-fr-%: $(SOUNDS_DIR)/fr
|
|
@PACKAGE=$(subst $(SOUNDS_DIR)/.asterisk,asterisk,$@).tar.gz; \
|
|
if ! test -f $${PACKAGE}; then wget $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
|
|
if ! test -f $${PACKAGE}; then exit 1; fi; \
|
|
rm -f $(subst -$(CORE_SOUNDS_VERSION),,$@)-* && \
|
|
(cd $(SOUNDS_DIR)/fr; tar xzf $(PWD)/$${PACKAGE}) && \
|
|
touch $@
|
|
|
|
$(SOUNDS_DIR)/.asterisk-core-sounds-fr-%: $(SOUNDS_DIR)/es
|
|
@PACKAGE=$(subst $(SOUNDS_DIR)/.asterisk,asterisk,$@).tar.gz; \
|
|
if ! test -f $${PACKAGE}; then wget $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
|
|
if ! test -f $${PACKAGE}; then exit 1; fi; \
|
|
rm -f $(subst -$(CORE_SOUNDS_VERSION),,$@)-* && \
|
|
(cd $(SOUNDS_DIR)/es; tar xzf $(PWD)/$${PACKAGE}) && \
|
|
touch $@
|
|
|
|
$(MOH_DIR)/.asterisk-moh-%:
|
|
@PACKAGE=$(subst $(MOH_DIR)/.asterisk,asterisk,$@).tar.gz; \
|
|
if ! test -f $${PACKAGE}; then wget $(WGET_ARGS) $(MOH_URL)/$${PACKAGE}; fi; \
|
|
if ! test -f $${PACKAGE}; then exit 1; fi; \
|
|
(cd $(MOH_DIR); tar xzf $(PWD)/$${PACKAGE}) && \
|
|
touch $@
|
|
|
|
asterisk-core-%.tar.gz:
|
|
@wget $(WGET_ARGS) $(SOUNDS_URL)/$@
|
|
|
|
asterisk-extra-%.tar.gz:
|
|
@wget $(WGET_ARGS) $(MOH_URL)/$@
|
|
|
|
asterisk-moh-%.tar.gz:
|
|
@wget $(WGET_ARGS) $(MOH_URL)/$@
|
|
|
|
all: $(CORE_SOUNDS) $(EXTRA_SOUNDS) $(MOH)
|
|
|
|
dist-clean:
|
|
rm -f *.tar.gz
|
|
|
|
$(SOUNDS_DIR) $(MOH_DIR) $(SOUNDS_DIR)/%:
|
|
mkdir -p $@
|
|
|
|
install: $(SOUNDS_DIR) $(MOH_DIR) $(CORE_SOUND_TAGS) $(MOH_TAGS)
|
|
|
|
uninstall:
|
|
rm -rf $(SOUNDS_DIR)
|
|
rm -rf $(MOH_DIR)
|