Merged revisions 90696 via svnmerge from
[asterisk/asterisk.git] / apps / Makefile
1 #
2 # Asterisk -- A telephony toolkit for Linux.
3
4 # Makefile for PBX applications
5 #
6 # Copyright (C) 1999-2006, Digium, Inc.
7 #
8 # This program is free software, distributed under the terms of
9 # the GNU General Public License
10 #
11
12 -include ../menuselect.makeopts ../menuselect.makedeps
13
14 C_MODS:=$(filter-out $(MENUSELECT_APPS),$(patsubst %.c,%,$(wildcard app_*.c)))
15 CC_MODS:=$(filter-out $(MENUSELECT_APPS),$(patsubst %.cc,%,$(wildcard app_*.cc)))
16
17 LOADABLE_MODS:=$(C_MODS) $(CC_MODS)
18
19 ifneq ($(findstring apps,$(MENUSELECT_EMBED)),)
20   EMBEDDED_MODS:=$(LOADABLE_MODS)
21   LOADABLE_MODS:=
22 endif
23
24 MENUSELECT_OPTS_app_directory:=$(MENUSELECT_OPTS_app_voicemail)
25 ifneq ($(findstring ODBC_STORAGE,$(MENUSELECT_OPTS_app_voicemail)),)
26 MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_ODBC_STORAGE)
27 MENUSELECT_DEPENDS_app_directory+=$(MENUSELECT_DEPENDS_ODBC_STORAGE)
28 endif
29 ifneq ($(findstring IMAP_STORAGE,$(MENUSELECT_OPTS_app_voicemail)),)
30 MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_IMAP_STORAGE)
31 MENUSELECT_DEPENDS_app_directory+=$(MENUSELECT_DEPENDS_IMAP_STORAGE)
32 endif
33
34 ifeq (SunOS,$(shell uname))
35 MENUSELECT_DEPENDS_app_chanspy+=RT
36 RT_LIB=-lrt
37 endif
38
39 all: _all
40
41 include $(ASTTOPDIR)/Makefile.moddir_rules
42
43 ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
44   LIBS+= -lres_features.so -lres_ael_share.so -lres_monitor.so -lres_speech.so
45   LIBS+= -lres_smdi.so
46 endif
47