more Makefile cleanup and consistency stuff
[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 ifneq ($(wildcard ../menuselect.makeopts),)
13   include ../menuselect.makeopts
14   include ../menuselect.makedeps
15 endif
16
17 C_MODS:=$(filter-out $(MENUSELECT_APPS),$(patsubst %.c,%,$(wildcard app_*.c)))
18 CC_MODS:=$(filter-out $(MENUSELECT_APPS),$(patsubst %.cc,%,$(wildcard app_*.cc)))
19
20 SELECTED_MODS:=$(C_MODS) $(CC_MODS)
21
22 ifneq ($(findstring ODBC_STORAGE,$(MENUSELECT_OPTS_app_voicemail)),)
23 MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_ODBC_STORAGE)
24 endif
25 ifneq ($(findstring EXTENDED_ODBC_STORAGE,$(MENUSELECT_OPTS_app_voicemail)),)
26 MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_EXTENDED_ODBC_STORAGE)
27 endif
28 ifneq ($(findstring IMAP_STORAGE,$(MENUSELECT_OPTS_app_voicemail)),)
29 MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_IMAP_STORAGE)
30 endif
31
32 all: _all
33
34 include $(ASTTOPDIR)/Makefile.moddir_rules
35
36 ifeq (SunOS,$(shell uname))
37 app_chanspy.so: LIBS+=-lrt
38 endif