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
|
#################################################################################
#
# Makefile
#
# Makefile for the OpenH323 wrapper Library
#
# 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.25.2.2 2005/01/21 15:14:09 manousos Exp $
#
#################################################################################
.EXPORT_ALL_VARIABLES:
.PHONY: .pwlib_version .openh323_version
OPENH323USERFLAGS =
STDCCFLAGS :=
ifdef NOVIDEO
OPENH323USERFLAGS += NOVIDEO=1
STDCCFLAGS += -DNO_H323_VIDEO
endif
ifdef NOAUDIOCODECS
OPENH323USERFLAGS += NOAUDIOCODECS=1
STDCCFLAGS += -DNO_H323_AUDIO_CODECS
endif
ifdef NOSPEEX
OPENH323USERFLAGS += NO_SPEEX=1
STDCCFLAGS += -DNO_SPEEX
endif
ifdef NOTRACE
OPENH323USERFLAGS += NOTRACE=1
STDCCFLAGS += -DPASN_NOPRINTON -DPASN_LEANANDMEAN
endif
ifdef NO_IPv6
OPENH323USERFLAGS += NO_IPv6=1
else
STDCCFLAGS += -DP_HAS_IPV6
endif
ifdef P_PTHREADS
OPENH323USERFLAGS += P_PTHREADS=1
endif
ifdef OH323_SUPPRESS_H235
STDCCFLAGS += -DOH323_SUPPRESS_H235
endif
OPENH323FLAGS = $(shell make $(OPENH323USERFLAGS) -f openh323flags.mak \
--no-print-directory -s \
PWLIBDIR=$(PWLIBDIR) OPENH323DIR=$(OPENH323DIR) ccflags)
CPPFLAGS = $(OPENH323FLAGS) -Wall -x c++ -Os
ifeq ($(WRAPTRACING),1)
ifeq (,$(WRAPTRACING_LEVEL))
WRAPTRACING_LEVEL=5
endif
CPPFLAGS += -DWRAPTRACING -DWRAPTRACING_LEVEL=$(WRAPTRACING_LEVEL)
endif
PWLIB_VERSION=$(shell if [ -f .pwlib_version ]; then cat .pwlib_version; else echo "UNKNOWN"; fi)
OH323_VERSION=$(shell if [ -f .openh323_version ]; then cat .openh323_version; else echo "UNKNOWN"; fi)
CPPFLAGS += -DPWLIBVERSION=\"$(PWLIB_VERSION)\" \
-DOPENH323VERSION=\"$(OH323_VERSION)\"
WRAPOBJECTS = wrapper_misc.o asteriskaudio.o wrapconnection.o wrapendpoint.o \
wrapper.o wrapcaps.o wrapgkserver.o
WRAPDEPS = $(shell ls *.hxx *.h)
.pwlib_version:
./check_ver $(PWLIBDIR) pwlib
.openh323_version:
./check_ver $(OPENH323DIR) openh323
build: .pwlib_version .openh323_version $(WRAPOBJECTS)
@if [ "$(PWLIB_VERSION)" = "UNKNOWN" ]; then \
echo "*** Cannot determine the version of PWLIB!"; exit 1; \
fi
@if [ "$(OPENH323_VERSION)" = "UNKNOWN" ]; then \
echo "*** Cannot determine the version of OPENH323!"; exit 1; \
fi
ifeq ($(OH323STAT),1)
$(AR) rc liboh323wrap_s.a $(WRAPOBJECTS)
else
$(CC) -shared -Wl,-soname,liboh323wrap.so -o liboh323wrap.so $(WRAPOBJECTS)
endif
strip:
install:
if [ ! -d $(DESTDIR)$(OH323WRAPLIBDIR) ]; then \
$(INSTALL) -d $(DESTDIR)$(OH323WRAPLIBDIR); \
fi
ifeq ($(OH323STAT),1)
$(INSTALL) -m 0644 liboh323wrap_s.a $(DESTDIR)$(OH323WRAPLIBDIR)
else
$(INSTALL) liboh323wrap.so $(DESTDIR)$(OH323WRAPLIBDIR)
cd $(DESTDIR)$(OH323WRAPLIBDIR); rm -f ./liboh323wrap.so.1; rm -f ./liboh323wrap.so.1.1
cd $(DESTDIR)$(OH323WRAPLIBDIR); ln -s liboh323wrap.so liboh323wrap.so.1
cd $(DESTDIR)$(OH323WRAPLIBDIR); ln -s liboh323wrap.so liboh323wrap.so.1.1
endif
clean:
rm -f $(WRAPOBJECTS) liboh323wrap* .pwlib_version* .openh323_version*
# Make sure that ASTERISK's channel driver will be re-built.
%.o: %.cxx $(WRAPDEPS)
$(CPP) $(CPPFLAGS) $(STDCCFLAGS) $(OH323WRAPINCLUDE) -c $< -o $@
$(TOUCH) ../asterisk-driver/chan_oh323.c
#################################################################################
|