Merge "res_pjsip_mwi: potential double unref, and potential unwanted double link"
[asterisk/asterisk.git] / addons / Makefile
1 #
2 # Asterisk -- An open source telephony toolkit.
3 #
4 # Makefile for Add-on Modules
5 #
6 # Copyright (C) 2009, Digium, Inc.
7 #
8 # This program is free software, distributed under the terms of
9 # the GNU General Public License
10 #
11
12 -include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
13
14 MENUSELECT_CATEGORY=ADDONS
15 MENUSELECT_DESCRIPTION=Add-ons (See README-addons.txt)
16
17 OOH323C:=ooCmdChannel.c ooLogChan.c ooUtils.c ooGkClient.c context.c \
18         ooDateTime.c decode.c dlist.c encode.c errmgmt.c \
19         memheap.c ootrace.c oochannels.c ooh245.c ooports.c \
20         ooq931.c ooCapability.c ooSocket.c perutil.c eventHandler.c \
21         ooCalls.c ooStackCmds.c ooh323.c ooh323ep.c printHandler.c \
22         rtctype.c ooTimer.c h323/H235-SECURITY-MESSAGESDec.c \
23         h323/H235-SECURITY-MESSAGESEnc.c h323/H323-MESSAGES.c h323/H323-MESSAGESDec.c \
24         h323/H323-MESSAGESEnc.c h323/MULTIMEDIA-SYSTEM-CONTROL.c \
25         h323/MULTIMEDIA-SYSTEM-CONTROLDec.c h323/MULTIMEDIA-SYSTEM-CONTROLEnc.c
26
27 H323SOURCE:=$(addprefix ooh323c/src/,$(OOH323C)) ooh323cDriver.c
28
29 H323CFLAGS:=-Iooh323c/src -Iooh323c/src/h323
30
31 ALL_C_MODS:=app_mysql \
32             cdr_mysql \
33             chan_mobile \
34             chan_ooh323 \
35             format_mp3 \
36             res_config_mysql
37
38 all: check_mp3 _all
39
40 check_mp3:
41 ifeq ($(filter format_mp3,$(MENUSELECT_ADDONS)),)
42         @if [ ! -f mp3/Makefile ] ; then \
43                 echo ; \
44                 echo "**************************************************************" ; \
45                 echo "***                                                        ***" ; \
46                 echo "***    ---> IMPORTANT INFORMATION ABOUT format_mp3 <---    ***" ; \
47                 echo "***                                                        ***" ; \
48                 echo "*** format_mp3 has been selected to be installed, but the  ***" ; \
49                 echo "*** MP3 decoder library has not yet been downloaded into   ***" ; \
50                 echo "*** the source tree.  To do so, please run the following   ***" ; \
51                 echo "*** command:                                               ***" ; \
52                 echo "***                                                        ***" ; \
53                 echo "***          $$ contrib/scripts/get_mp3_source.sh           ***" ; \
54                 echo "***                                                        ***" ; \
55                 echo "**************************************************************" ; \
56                 echo ; \
57         fi
58 endif
59
60 include $(ASTTOPDIR)/Makefile.moddir_rules
61
62 chan_mobile.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
63 chan_ooh323.so: _ASTCFLAGS+=$(H323CFLAGS)
64 $(call MOD_ADD_C,chan_ooh323,$(H323SOURCE))
65
66 ifneq ($(wildcard mp3/Makefile),)
67 $(call MOD_ADD_C,format_mp3,mp3/common.c mp3/dct64_i386.c mp3/decode_ntom.c mp3/layer3.c mp3/tabinit.c mp3/interface.c)
68
69 .PHONY: check_mp3
70 else
71 .PHONY: check_mp3 format_mp3.o format_mp3.so
72 endif