1999-11-13 17:59:36 +00:00
|
|
|
#
|
|
|
|
# Asterisk -- A telephony toolkit for Linux.
|
|
|
|
#
|
2005-06-20 17:26:08 +00:00
|
|
|
# Makefile for PBX applications
|
1999-11-13 17:59:36 +00:00
|
|
|
#
|
2006-02-11 17:12:05 +00:00
|
|
|
# Copyright (C) 1999-2006, Digium, Inc.
|
1999-11-13 17:59:36 +00:00
|
|
|
#
|
2005-06-20 17:26:08 +00:00
|
|
|
# Mark Spencer <markster@digium.com>
|
1999-11-13 17:59:36 +00:00
|
|
|
#
|
|
|
|
# This program is free software, distributed under the terms of
|
|
|
|
# the GNU General Public License
|
|
|
|
#
|
|
|
|
|
2006-06-22 15:38:13 +00:00
|
|
|
.PHONY: clean clean-depend all depend uninstall
|
2006-06-22 11:27:03 +00:00
|
|
|
|
2006-06-19 00:14:16 +00:00
|
|
|
ifneq ($(wildcard ../menuselect.makeopts),)
|
|
|
|
include ../menuselect.makeopts
|
|
|
|
endif
|
2006-06-07 16:03:31 +00:00
|
|
|
|
2006-06-05 20:46:27 +00:00
|
|
|
SELECTED_MODS:=$(filter-out $(MENUSELECT_APPS),$(patsubst %.c,%,$(wildcard app_*.c)))
|
2005-08-29 19:07:24 +00:00
|
|
|
|
2006-06-05 20:46:27 +00:00
|
|
|
MODS:=$(patsubst %,%.so,$(SELECTED_MODS))
|
|
|
|
|
2006-06-16 16:17:43 +00:00
|
|
|
app_voicemail.o: CFLAGS+=$(patsubst %,-D%,$(MENUSELECT_app_voicemail))
|
|
|
|
|
2006-02-11 17:12:05 +00:00
|
|
|
all: $(MODS)
|
1999-11-13 17:59:36 +00:00
|
|
|
|
2006-02-12 16:52:42 +00:00
|
|
|
clean-depend:
|
|
|
|
rm -f .depend
|
|
|
|
|
|
|
|
clean: clean-depend
|
2006-04-08 19:13:37 +00:00
|
|
|
rm -f *.so *.o
|
1999-11-13 17:59:36 +00:00
|
|
|
|
2006-04-24 17:11:45 +00:00
|
|
|
%.so: %.o
|
|
|
|
$(CC) $(SOLINK) -o $@ $<
|
|
|
|
|
2006-04-29 19:26:53 +00:00
|
|
|
app_rpt.so: app_rpt.o
|
2006-06-24 08:45:49 +00:00
|
|
|
$(CC) $(SOLINK) -o $@ $< $(TONEZONE_LIB)
|
2006-04-29 19:26:53 +00:00
|
|
|
|
|
|
|
app_rpt.o: app_rpt.c
|
2006-06-24 08:45:49 +00:00
|
|
|
$(CC) -c -o $@ $(CFLAGS) $(TONEZONE_INCLUDE) $(ZAPTEL_INCLUDE) $<
|
|
|
|
|
|
|
|
app_flash.o app_meetme.o app_page.o app_zapbarge.o app_zapras.o app_zapscan.o: %.o: %.c
|
2006-04-30 14:12:14 +00:00
|
|
|
$(CC) -c -o $@ $(CFLAGS) $(ZAPTEL_INCLUDE) $<
|
2006-04-29 19:26:53 +00:00
|
|
|
|
1999-11-13 17:59:36 +00:00
|
|
|
install: all
|
2006-02-11 17:12:05 +00:00
|
|
|
for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
|
2001-04-14 14:11:40 +00:00
|
|
|
|
2006-02-01 18:39:41 +00:00
|
|
|
uninstall:
|
|
|
|
|
2005-05-08 17:01:42 +00:00
|
|
|
ifeq (SunOS,$(shell uname))
|
|
|
|
app_chanspy.so: app_chanspy.o
|
|
|
|
$(CC) $(SOLINK) -o $@ $< -lrt
|
|
|
|
endif
|
|
|
|
|
2003-08-19 16:42:30 +00:00
|
|
|
ifneq ($(wildcard .depend),)
|
2005-08-30 02:54:02 +00:00
|
|
|
include .depend
|
2003-08-19 16:42:30 +00:00
|
|
|
endif
|
2003-05-06 02:34:45 +00:00
|
|
|
|
|
|
|
depend: .depend
|
|
|
|
|
|
|
|
.depend:
|
2005-06-20 17:26:08 +00:00
|
|
|
../build_tools/mkdep $(CFLAGS) `ls *.c`
|
2004-04-16 18:57:07 +00:00
|
|
|
|
|
|
|
env:
|
2004-04-27 21:30:32 +00:00
|
|
|
env
|