1999-12-01 05:25:44 +00:00
|
|
|
#
|
|
|
|
# Asterisk -- A telephony toolkit for Linux.
|
|
|
|
#
|
2005-06-20 17:26:08 +00:00
|
|
|
# Makefile for channel drivers
|
1999-12-01 05:25:44 +00:00
|
|
|
#
|
2006-02-11 17:58:21 +00:00
|
|
|
# Copyright (C) 1999-2006, Digium, Inc.
|
1999-12-01 05:25:44 +00:00
|
|
|
#
|
|
|
|
# This program is free software, distributed under the terms of
|
|
|
|
# the GNU General Public License
|
|
|
|
#
|
2005-06-20 17:26:08 +00:00
|
|
|
|
2006-08-26 23:58:47 +00:00
|
|
|
-include ../menuselect.makeopts ../menuselect.makedeps
|
2006-06-07 16:03:31 +00:00
|
|
|
|
2006-07-15 19:59:35 +00:00
|
|
|
C_MODS:=$(filter-out $(MENUSELECT_CHANNELS),$(patsubst %.c,%,$(wildcard chan_*.c)))
|
|
|
|
CC_MODS:=$(filter-out $(MENUSELECT_CHANNELS),$(patsubst %.cc,%,$(wildcard chan_*.cc)))
|
2005-11-01 21:53:30 +00:00
|
|
|
|
2006-04-24 17:11:45 +00:00
|
|
|
ifeq ($(OSARCH),OpenBSD)
|
2005-08-30 02:54:02 +00:00
|
|
|
PTLIB=-lpt_OpenBSD_x86_r
|
|
|
|
H323LIB=-lh323_OpenBSD_x86_r
|
2004-07-30 18:57:37 +00:00
|
|
|
endif
|
2005-08-30 02:54:02 +00:00
|
|
|
|
2006-08-21 02:11:39 +00:00
|
|
|
ifeq ($(OSARCH),linux-gnu)
|
2005-08-30 02:54:02 +00:00
|
|
|
PTLIB=-lpt_linux_x86_r
|
|
|
|
H323LIB=-lh323_linux_x86_r
|
|
|
|
CHANH323LIB=-ldl
|
|
|
|
endif
|
2004-08-31 16:33:00 +00:00
|
|
|
|
2006-04-24 17:11:45 +00:00
|
|
|
ifeq ($(OSARCH),FreeBSD)
|
2005-08-30 02:54:02 +00:00
|
|
|
PTLIB=-lpt_FreeBSD_x86_r
|
|
|
|
H323LIB=-lh323_FreeBSD_x86_r
|
|
|
|
CHANH323LIB=-pthread
|
2004-08-31 13:32:11 +00:00
|
|
|
endif
|
2005-08-30 02:54:02 +00:00
|
|
|
|
2006-04-24 17:11:45 +00:00
|
|
|
ifeq ($(OSARCH),NetBSD)
|
2005-08-30 02:54:02 +00:00
|
|
|
PTLIB=-lpt_NetBSD_x86_r
|
|
|
|
H323LIB=-lh323_NetBSD_x86_r
|
2004-08-31 13:32:11 +00:00
|
|
|
endif
|
2005-08-30 02:54:02 +00:00
|
|
|
|
2006-02-11 17:58:21 +00:00
|
|
|
ifeq ($(wildcard h323/libchanh323.a),)
|
2006-07-15 19:59:35 +00:00
|
|
|
CC_MODS:=$(filter-out chan_h323,$(CC_MODS))
|
2005-08-30 02:54:02 +00:00
|
|
|
endif
|
1999-12-01 05:25:44 +00:00
|
|
|
|
2003-08-19 01:23:39 +00:00
|
|
|
ifndef OPENH323DIR
|
2005-08-30 02:54:02 +00:00
|
|
|
OPENH323DIR=$(HOME)/openh323
|
2003-08-19 01:23:39 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef PWLIBDIR
|
2005-08-30 02:54:02 +00:00
|
|
|
PWLIBDIR=$(HOME)/pwlib
|
2003-08-19 01:23:39 +00:00
|
|
|
endif
|
|
|
|
|
2006-08-21 02:11:39 +00:00
|
|
|
LOADABLE_MODS:=$(C_MODS) $(CC_MODS)
|
|
|
|
|
|
|
|
ifneq ($(findstring channels,$(MENUSELECT_EMBED)),)
|
|
|
|
EMBEDDED_MODS:=$(LOADABLE_MODS)
|
|
|
|
LOADABLE_MODS:=
|
|
|
|
endif
|
2006-07-15 19:59:35 +00:00
|
|
|
|
2006-06-24 19:43:31 +00:00
|
|
|
all: _all
|
1999-12-01 05:25:44 +00:00
|
|
|
|
2006-07-06 21:04:28 +00:00
|
|
|
include $(ASTTOPDIR)/Makefile.moddir_rules
|
2006-02-12 16:52:42 +00:00
|
|
|
|
2006-06-24 19:43:31 +00:00
|
|
|
clean::
|
2006-07-06 23:18:45 +00:00
|
|
|
rm -f busy.h ringtone.h gentone
|
2006-08-21 13:47:45 +00:00
|
|
|
$(MAKE) -C misdn clean
|
2005-04-29 04:37:02 +00:00
|
|
|
|
2006-09-19 17:07:22 +00:00
|
|
|
ifneq ($(wildcard h323/Makefile.ast),)
|
|
|
|
include h323/Makefile.ast
|
2006-09-29 18:54:21 +00:00
|
|
|
H323LDFLAGS+=-Wl,--version-script=h323/noexport.map
|
2006-09-20 16:33:42 +00:00
|
|
|
clean::
|
|
|
|
$(MAKE) -C h323 clean
|
2006-09-19 17:07:22 +00:00
|
|
|
else
|
|
|
|
h323/libchanh323.a h323/Makefile.ast:
|
|
|
|
$(CMD_PREFIX) $(MAKE) -C h323
|
|
|
|
$(CMD_PREFIX) rm -f ../main/asterisk
|
|
|
|
$(CMD_PREFIX) echo "***************************************************************"
|
|
|
|
$(CMD_PREFIX) echo
|
|
|
|
$(CMD_PREFIX) echo "********** Re-run 'make' to pick up H.323 parameters **********"
|
|
|
|
$(CMD_PREFIX) echo
|
|
|
|
$(CMD_PREFIX) echo "***************************************************************"
|
|
|
|
$(CMD_PREFIX) exit 1
|
|
|
|
endif
|
2005-10-31 22:51:12 +00:00
|
|
|
|
2006-09-29 22:48:43 +00:00
|
|
|
gentone: gentone.c
|
|
|
|
$(ECHO_PREFIX) echo " [LD] $^ -> $@"
|
|
|
|
$(CMD_PREFIX) $(HOST_CC) $(STATIC_BUILD) -o $@ $(HOST_CFLAGS) $(HOST_LDFLAGS) $^ $(LIBS)
|
2006-07-15 16:40:05 +00:00
|
|
|
gentone: LIBS+=-lm
|
2001-12-25 21:12:07 +00:00
|
|
|
|
2001-04-30 04:42:40 +00:00
|
|
|
busy.h: gentone
|
|
|
|
./gentone busy 480 620
|
|
|
|
|
|
|
|
ringtone.h: gentone
|
|
|
|
./gentone ringtone 440 480
|
|
|
|
|
2006-07-06 23:18:45 +00:00
|
|
|
chan_oss.o: busy.h ringtone.h
|
2005-11-01 21:53:30 +00:00
|
|
|
|
2006-09-29 22:48:43 +00:00
|
|
|
$(if $(filter chan_iax2,$(EMBEDDED_MODS)),modules.link,chan_iax2.so): iax2-parser.o iax2-provision.o
|
2002-02-16 19:23:59 +00:00
|
|
|
|
2006-06-24 19:43:31 +00:00
|
|
|
chan_alsa.o: busy.h ringtone.h
|
2003-02-07 19:23:19 +00:00
|
|
|
|
2006-08-21 02:11:39 +00:00
|
|
|
ifeq ($(OSARCH),linux-gnu)
|
2006-09-19 17:07:22 +00:00
|
|
|
chan_h323.so: chan_h323.o h323/libchanh323.a h323/Makefile.ast
|
|
|
|
$(ECHO_PREFIX) echo " [LD] $^ -> $@"
|
|
|
|
$(CMD_PREFIX) $(CXX) $(SOLINK) $(H323LDFLAGS) -o $@ $< h323/libchanh323.a $(H323LDLIBS)
|
2005-04-29 04:37:02 +00:00
|
|
|
else
|
2006-09-19 17:07:22 +00:00
|
|
|
chan_h323.so: chan_h323.o h323/libchanh323.a
|
|
|
|
$(ECHO_PREFIX) echo " [LD] $^ -> $@"
|
|
|
|
$(CMD_PREFIX) $(CXX) $(SOLINK) -o $@ $< h323/libchanh323.a $(CHANH323LIB) -L$(PWLIBDIR)/lib $(PTLIB) -L$(OPENH323DIR)/lib $(H323LIB) -L/usr/lib -lcrypto -lssl -lexpat
|
2005-04-29 04:37:02 +00:00
|
|
|
endif
|
2003-08-16 17:00:22 +00:00
|
|
|
|
2006-12-19 21:28:43 +00:00
|
|
|
chan_misdn.o: ASTCFLAGS+=-Imisdn
|
2006-07-06 23:18:45 +00:00
|
|
|
|
2006-12-19 21:28:43 +00:00
|
|
|
misdn_config.o: ASTCFLAGS+=-Imisdn
|
|
|
|
|
|
|
|
misdn/isdn_lib.o: ASTCFLAGS+=-Wno-strict-aliasing
|
2006-07-06 23:18:45 +00:00
|
|
|
|
2006-09-29 22:48:43 +00:00
|
|
|
$(if $(filter chan_misdn,$(EMBEDDED_MODS)),modules.link,chan_misdn.so): chan_misdn.o misdn_config.o misdn/isdn_lib.o misdn/isdn_msg_parser.o
|