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
|
|
|
|
2007-12-09 21:29:37 +00:00
|
|
|
-include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
|
2006-06-07 16:03:31 +00:00
|
|
|
|
2007-12-17 07:25:35 +00:00
|
|
|
MODULE_PREFIX=chan
|
|
|
|
MENUSELECT_CATEGORY=CHANNELS
|
|
|
|
MENUSELECT_DESCRIPTION=Channel Drivers
|
2005-11-01 21:53:30 +00:00
|
|
|
|
2006-04-24 17:11:45 +00:00
|
|
|
ifeq ($(OSARCH),OpenBSD)
|
2008-10-07 19:26:09 +00:00
|
|
|
PTLIB=-lpt
|
|
|
|
H323LIB=-lh323
|
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),)
|
2007-12-10 03:50:38 +00:00
|
|
|
MODULE_EXCLUDE += chan_h323
|
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-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
|
|
|
|
2007-11-20 16:12:10 +00:00
|
|
|
ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
|
|
|
|
LIBS+= -lres_monitor.so -lres_features.so
|
|
|
|
endif
|
|
|
|
|
2006-09-19 17:07:22 +00:00
|
|
|
ifneq ($(wildcard h323/Makefile.ast),)
|
2009-03-29 05:32:04 +00:00
|
|
|
include h323/Makefile.ast
|
|
|
|
endif
|
|
|
|
|
2006-09-20 16:33:42 +00:00
|
|
|
clean::
|
2009-03-29 05:32:04 +00:00
|
|
|
$(MAKE) -C misdn clean
|
2007-10-30 20:30:35 +00:00
|
|
|
if [ -f h323/Makefile ]; then $(MAKE) -C h323 clean; fi
|
2005-10-31 22:51:12 +00:00
|
|
|
|
2007-10-01 21:54:41 +00:00
|
|
|
dist-clean::
|
|
|
|
rm -f h323/Makefile
|
|
|
|
|
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
|
2009-06-25 19:54:12 +00:00
|
|
|
$(if $(filter chan_dahdi,$(EMBEDDED_MODS)),modules.link,chan_dahdi.so): sig_analog.o sig_pri.o
|
2002-02-16 19:23:59 +00:00
|
|
|
|
2009-04-10 20:26:46 +00:00
|
|
|
ifneq ($(filter chan_h323,$(EMBEDDED_MODS)),)
|
|
|
|
modules.link: h323/libchanh323.a
|
|
|
|
else
|
2006-08-21 02:11:39 +00:00
|
|
|
ifeq ($(OSARCH),linux-gnu)
|
2009-04-10 20:26:46 +00:00
|
|
|
chan_h323.so: chan_h323.o h323/libchanh323.a
|
2006-09-19 17:07:22 +00:00
|
|
|
$(ECHO_PREFIX) echo " [LD] $^ -> $@"
|
2009-04-10 20:26:46 +00:00
|
|
|
$(CMD_PREFIX) $(CXX) $(PTHREAD_CFLAGS) $(ASTLDFLAGS) $(SOLINK) -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] $^ -> $@"
|
2007-01-23 06:56:26 +00:00
|
|
|
$(CMD_PREFIX) $(CXX) $(PTHREAD_CFLAGS) $(ASTLDFLAGS) $(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
|
2009-04-10 20:26:46 +00:00
|
|
|
endif
|
2003-08-16 17:00:22 +00:00
|
|
|
|
2009-07-21 13:28:04 +00:00
|
|
|
chan_misdn.o: _ASTCFLAGS+=-Imisdn
|
2006-07-06 23:18:45 +00:00
|
|
|
|
2009-07-21 13:28:04 +00:00
|
|
|
misdn_config.o: _ASTCFLAGS+=-Imisdn
|
2006-12-19 21:28:43 +00:00
|
|
|
|
2009-07-21 13:28:04 +00:00
|
|
|
misdn/isdn_lib.o: _ASTCFLAGS+=-Wno-strict-aliasing
|
2006-07-06 23:18:45 +00:00
|
|
|
|
2008-01-02 14:53:26 +00:00
|
|
|
$(if $(filter chan_misdn,$(EMBEDDED_MODS)),modules.link,chan_misdn.so): misdn_config.o misdn/isdn_lib.o misdn/isdn_msg_parser.o
|
2007-07-05 15:29:24 +00:00
|
|
|
|
2008-01-08 23:09:44 +00:00
|
|
|
$(if $(filter chan_oss,$(EMBEDDED_MODS)),modules.link,chan_oss.so): console_video.o vgrabbers.o console_board.o
|
2008-05-16 00:51:14 +00:00
|
|
|
|
|
|
|
chan_usbradio.o: ./xpmr/xpmr.c ./xpmr/xpmr.h ./xpmr/xpmr_coef.h
|
|
|
|
|
|
|
|
chan_usbradio.so: LIBS+=-lusb -lasound
|
2009-07-21 13:28:04 +00:00
|
|
|
chan_usbradio.so: _ASTCFLAGS+=-DNDEBUG
|
2008-05-16 00:51:14 +00:00
|
|
|
|
2009-03-29 05:32:04 +00:00
|
|
|
h323/Makefile.ast:
|
|
|
|
$(CMD_PREFIX) $(MAKE) -C h323 Makefile.ast
|
|
|
|
|
2009-04-10 20:26:46 +00:00
|
|
|
h323/libchanh323.a: h323/Makefile.ast
|
2009-03-29 05:32:04 +00:00
|
|
|
$(CMD_PREFIX) $(MAKE) -C h323 libchanh323.a
|