1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236
|
#################################################################################
#
# Makefile
#
# Makefile for the OpenH323 wrapper library and the ASTERISK channel
# driver module.
#
# Copyright (c) 2002-2005 InAccess Networks
# Michalis Manousos <manousos@inaccessnetworks.com>
# Dimitris Economou <decon@inaccessnetworks.com>
#
# This file is part of "H.323 support for ASTERISK"
#
# "H.323 support for ASTERISK" is free software;
# you can redistribute it and/or modify it under the terms of the
# GNU General Public License as published by the Free Software Foundation;
# either version 2 of the License, or (at your option) any later version.
#
# "H.323 support for ASTERISK" is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# $Id: Makefile,v 1.48.2.5 2005/01/21 16:33:47 manousos Exp $
#
#################################################################################
# Export all variables to child processes
.EXPORT_ALL_VARIABLES:
#################################################################################
###### START OF USER CONFIGURABLE PARAMETERS
#
# Install everything under this directory. If this is empty, then everything
# will be installed under /
#
DESTDIR=
#
# Set PWLIBDIR variable to the directory containing the sources of
# PWlib library.
#
# Note: You must build the 'pwlib' library before trying to
# compile asterisk-oh323. Do not use the installed library of your
# distribution. It won't work.
#
PWLIBDIR=/root/src/oh323/pwlib
#
# Set OPENH323LIBDIR variable to the directory containing the sources of
# OpenH323 library.
#
# Note: You must build the 'openh323' library before trying to
# compile asterisk-oh323. Do not use the installed library of your
# distribution. It won't work.
#
OPENH323DIR=/root/src/oh323/openh323
#
# Set ASTERISKINCDIR variable to the directory containing the include files of
# Asterisk PBX.
#
ASTERISKINCDIR=/root/src/asterisk/include
#
# Set ASTERISKMODDIR variable to the directory where ASTERISK's modules reside.
# The "chan_oh323.so" driver will be installed in this directory.
#
# Note: This directory is created under $DESTDIR.
#
ASTERISKMODDIR=/usr/lib/asterisk/modules
#
# Set ASTERISKETCDIR variable to the directory where ASTERISK's configuration
# files reside. The "oh323.conf" file will be installed in this directory.
#
# Note: This directory is created under $DESTDIR.
#
ASTERISKETCDIR=/etc/asterisk
#
# Set OH323WRAPLIBDIR variable to the directory where oh323wrap library
# will be installed. You SHOULD add this directory to your
# LD_LIBRARY_PATH shell variable, or to the /etc/ld.so.conf
# file and run "ldconfig" after the installation of asterisk-oh323.
#
# Note: This directory is created under $DESTDIR.
#
OH323WRAPLIBDIR=/usr/local/lib
#
# Set WRAPTRACING to 1 to enable tracing information from the OpenH323Wrap
# library or to 0 to disable it.
#
WRAPTRACING=1
#
# Set OH323STAT to 1 to build the OH323 Asterisk channel driver
# with statically linked OpenH323/Pwlib/oh323wrap libraries.
#
# Note: Turn this flag on if you don't want problems in runtime where the
# channel driver links with different libraries than these used during
# compilation (e.g. if you have installed a distro specific OpenH323/Pwlib).
# With this flag on the channel driver is huge, in size, but Asterisk boots
# faster!
#
OH323STAT=1
#
# Set OH323BUILDTYPE to 'debug', 'opt' or 'optnotrace' to select the
# build type. This should match the build type of the libraries
# (OpenH323/Pwlib).
#
#OH323BUILDTYPE=debug
OH323BUILDTYPE=opt
#OH323BUILDTYPE=optnotrace
#
# Define options that were used during Asterisk compilation
#
#DEBUG_THREADS=1
#DO_CRASH=1
#DETECT_DEADLOCKS=1
#
# Extra compilation options. Here you should add the options
# PWLIB, OPENH323 were compiled with.
#
#NOVIDEO=1
#NO_SPEEX=1
#NOAUDIOCODECS=1
#NOTRACE=1
#NO_IPv6=1
#P_PTHREADS=1
#HAS_OH323MODS=1
#SKIP_SUFFIX=1
#LIBPT_BASE=libpt
#LIBH323_BASE=libh323
#SKIP_EXTLIBS=1
#EXTLIBS=
###### END OF USER CONFIGURABLE PARAMETERS
#################################################################################
#
# Definition of variables and toolchain
#
SHELL := /bin/sh
SUBDIRS = wrapper asterisk-driver
.PHONY: all build install clean subdirs_build subdir_install subdir_clean \
rpm rpm_clean help $(SUBDIRS)
CC = gcc
CPP = g++
MAKE = make
INSTALL = install
TOUCH = touch
AR = ar
STRIP = strip
STRIPFLAGS=
OH323WRAPINCLUDE= \
-I$(PWLIBDIR)/include \
-I$(OPENH323DIR)/include \
-I$(OPENH323DIR)/include/openh323 \
-I../asterisk-driver
ifdef NOTRACE
OH323BUILDTYPE = optnotrace
endif
ifeq ($(OH323BUILDTYPE),optnotrace)
OPENH323USERFLAGS := NOTRACE=1
endif
CPPFLAGS = -Wall -x c++ -Os
ASTERISKINCLUDE = -I$(ASTERISKINCDIR) -I../wrapper
CFLAGS = -Wall
ifdef HAS_OH323MODS
CPPFLAGS += -DHAS_OH323MODS
CFLAGS += -DHAS_OH323MODS
endif
ifdef DEBUG_THREADS
CFLAGS += -DDEBUG_THREADS
endif
ifdef DO_CRASH
CFLAGS += -DDO_CRASH
endif
ifdef DETECT_DEADLOCKS
CFLAGS += -DDETECT_DEADLOCKS
endif
#
# Rules
#
build: subdirs_build
strip: subdirs_strip
install: subdirs_build subdirs_install
clean: subdirs_clean rpm_clean
all: subdirs_build subdirs_strip subdirs_install
subdirs_build:
for x in $(SUBDIRS); do $(MAKE) -C $$x build || exit 1 ; done
subdirs_strip:
for x in $(SUBDIRS); do $(MAKE) -C $$x strip || exit 1 ; done
subdirs_install:
for x in $(SUBDIRS); do $(MAKE) -C $$x install || exit 1 ; done
subdirs_clean:
for x in $(SUBDIRS); do $(MAKE) -C $$x clean || exit 1 ; done
rpm:
$(MAKE) -C rpm rpm
rpm_clean:
$(MAKE) -C rpm rpm_clean
help:
@echo "Available targets for 'asterisk-oh323' :"
@echo " make Build the binaries (channel driver/wrapper library)"
@echo " make build The same as a simple 'make'"
@echo " make strip Strip the built binaries to save space"
@echo " make install Install the built binaries"
@echo " make all Build, strip and install the binaries"
@echo " make clean Delete temporary, object and built binaries"
|