Update symbols
[opal/cbnco.git] / Makefile.in
blob027de707d86d6550bd485248d4cec30c8d6c6507
2 # Makefile
4 # Make file for Open Phone Abstraction library
6 # Copyright (c) 2001 Equivalence Pty. Ltd.
8 # The contents of this file are subject to the Mozilla Public License
9 # Version 1.0 (the "License"); you may not use this file except in
10 # compliance with the License. You may obtain a copy of the License at
11 # http://www.mozilla.org/MPL/
13 # Software distributed under the License is distributed on an "AS IS"
14 # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
15 # the License for the specific language governing rights and limitations
16 # under the License.
18 # The Original Code is Open Phone Abstraction Library.
20 # The Initial Developer of the Original Code is Equivalence Pty. Ltd.
22 # Contributor(s): ______________________________________.
24 # $Log$
25 # Revision 1.50 2007/01/11 03:24:57 dereksmithies
26 # It now references the new file to compile, iax2/iax2jitter.cxx
28 # Revision 1.49 2006/12/08 05:08:16 csoutheren
29 # Applied 1589270 - spec, pkgconfig, doxygen
30 # Thanks to Frederic Heem
32 # Revision 1.48 2006/10/16 21:30:55 dsandras
33 # Applied patch from Brian Lu <brian lu sun com> to fix compilation issues
34 # on OpenSolaris. Thanks!
36 # Revision 1.47 2006/10/10 10:12:34 csoutheren
37 # Allow correct operation if subdirs are missing
39 # Revision 1.46 2006/10/10 07:18:17 csoutheren
40 # Allow compilation with and without various options
42 # Revision 1.45 2006/10/05 07:11:49 csoutheren
43 # Add --disable-lid option
45 # Revision 1.44 2006/10/04 06:19:08 csoutheren
46 # Fixed SRTP configuration for Linux
48 # Revision 1.43 2006/10/02 13:30:50 rjongbloed
49 # Added LID plug ins
51 # Revision 1.42 2006/09/18 08:41:53 rjongbloed
52 # Added simple OPAL sample to default build.
53 # Added check that Makefile may need to be rebuilt from configure script.
55 # Revision 1.41 2006/09/11 20:44:17 dereksmithies
56 # Fix spacing at end of line for two iax files.
58 # Revision 1.40 2006/09/11 20:13:36 dsandras
59 # Fixed IAX2 build thanks to Stephen Cook <siti orcon net nz>.
61 # Revision 1.39 2006/09/07 10:05:55 rjongbloed
62 # Added "make update" target to do cvs update and rebuild
64 # Revision 1.38 2006/08/15 19:41:38 dsandras
65 # Only build plugins when building the library.
67 # Revision 1.37 2006/08/09 23:14:00 dereksmithies
68 # Add fix for compiling new iax processing files.
69 # Big thanks to Stephen Cook, (sitiveni@gmail.com) for this work.
70 # Thanks also for the Google Summer of Code.
72 # Revision 1.36 2006/08/08 09:16:47 rjongbloed
73 # Fixed building of audio plugins on linux
75 # Revision 1.35 2006/08/03 12:43:52 csoutheren
76 # Fixed compilation on Linux
78 # Revision 1.34 2006/07/24 14:03:38 csoutheren
79 # Merged in audio and video plugins from CVS branch PluginBranch
81 # Revision 1.33 2006/06/08 07:03:16 csoutheren
82 # Changed to force docs to build even when docs directory exists
84 # Revision 1.32 2006/05/30 12:04:08 hfriederich
85 # Enabling to build H.460
87 # Revision 1.31 2006/04/22 14:05:47 dsandras
88 # When building a shared library x that references symbols in libraries y,
89 # the y libraries need to be added to the linker command always. Thanks to
90 # Vitaly Lipatov. (Fixes Ekiga report #338310).
92 # Revision 1.30 2006/04/20 16:56:41 hfriederich
93 # Changes to allow compilation of H.224/H.281 code as well as to disable H.224 entirely
95 # Revision 1.29 2006/04/17 00:06:26 csoutheren
96 # Allow ILBC codec to be disabled and detect if not present
98 # Revision 1.28.2.1 2006/05/16 07:03:09 csoutheren
99 # Fixed Linux compile system
101 # Revision 1.28 2006/02/01 22:42:55 dominance
102 # ensure we have the full disctinct SONAME instead of just the major number version.
104 # Revision 1.27 2006/01/30 02:23:15 csoutheren
105 # First cut at fixing problem with speex libraries
107 # Revision 1.26 2006/01/20 00:00:59 csoutheren
108 # Added protected against some source directories not being present
109 # even wen configuration says they should be
111 # Revision 1.25 2006/01/19 22:40:33 dereksmithies
112 # Add iax2 to the list of instal directories. Thanks to Damien Sandras
113 # for reporting the bug in iax2 compilation.
115 # Revision 1.24 2006/01/18 11:26:29 dsandras
116 # Reverted previous change.
118 # Revision 1.22 2006/01/14 10:43:06 dsandras
119 # Applied patch from Brian Lu <Brian.Lu _AT_____ sun.com> to allow compilation
120 # with OpenSolaris compiler. Many thanks !!!
122 # Revision 1.21 2006/01/07 17:37:50 dsandras
123 # Updated to speex 1.1.11.2 to fix divergeance issues.
125 # Revision 1.20 2006/01/01 19:19:32 dsandras
126 # Added RFC2190 H.263 codec thanks to Salyens. Many thanks!
128 # Revision 1.19 2005/12/06 06:34:10 csoutheren
129 # Added configure support for Sangoma and empty LID source and header files
131 # Revision 1.18 2005/11/24 20:31:54 dsandras
132 # Added support for echo cancelation using Speex.
133 # Added possibility to add a filter to an OpalMediaPatch for all patches of a connection.
135 # Revision 1.17 2005/11/23 22:01:37 dsandras
136 # Reverted previous change. echocancel.cxx is not ready to go in yet.
138 # Revision 1.16 2005/11/23 21:58:33 dsandras
139 # Fixed Makefile.in.
141 # Revision 1.15 2005/11/20 21:03:50 dsandras
142 # Upgraded to Speex 1.1.10.
144 # Revision 1.14 2005/09/13 20:48:22 dominance
145 # minor cleanups needed to support mingw compilation. Thanks goes to Julien Puydt.
147 # Revision 1.13 2005/08/10 11:07:14 csoutheren
148 # Fixed bug #1255554
149 # Fixed dynamic linking on MacOSX
150 # Thanks to Hannes Friederich
152 # Revision 1.12 2005/07/30 07:39:26 csoutheren
153 # Added support for compiling new IAX2 code
155 # Revision 1.11 2005/04/26 10:58:37 dsandras
156 # Committed workaround for "make install".
158 # Revision 1.10 2005/04/25 10:14:14 dsandras
159 # Move LIBDIR down due to conflicting names.
161 # Revision 1.9 2005/04/25 09:31:35 dsandras
162 # Fixed make.
164 # Revision 1.8 2005/04/25 09:07:58 dsandras
165 # Fixed install/uninstall.
167 # Revision 1.7 2005/04/21 01:05:55 csoutheren
168 # New fix from Peter Robinson
170 # Revision 1.6 2005/04/20 05:46:32 csoutheren
171 # Patch 1146010. Fix problem with install targets
172 # Thanks to Peter Robinson
174 # Revision 1.5 2005/04/11 10:41:05 dsandras
175 # Added patch from Georgi Georgiev to fix compilation issues on Athlon64.
177 # Revision 1.4 2005/02/27 22:03:39 dereksmithies
178 # Add target to generate docs with doxygen.
180 # Revision 1.3 2005/01/31 07:40:41 csoutheren
181 # Fix for MacOSX thanks to Hannes Friederich
183 # Revision 1.2 2004/12/05 18:14:20 dsandras
184 # Cleanups.
186 # Revision 1.1 2004/12/04 18:37:58 dsandras
187 # Ported the "make install" / "make uninstall" system from OpenH323 to OPAL.
189 # Revision 2.29 2004/06/04 05:29:28 csoutheren
190 # Updated for ASN file changes and added silencedetect.cxx
192 # Revision 2.28 2004/04/25 02:53:28 rjongbloed
193 # Fixed GNU 3.4 warnings
195 # Revision 2.27 2004/03/11 06:54:25 csoutheren
196 # Added ability to disable SIP or H.323 stacks
198 # Revision 2.26 2004/02/23 01:28:49 rjongbloed
199 # Fixed unix build for recent upgrade to OpenH323 latest code.
201 # Revision 2.25 2004/02/16 09:15:19 csoutheren
202 # Fixed problems with codecs on Unix systems
204 # Revision 2.24 2003/04/08 11:46:35 robertj
205 # Better portability for tr command when doing ASN parse.
207 # Revision 2.23 2003/04/08 06:09:19 robertj
208 # Fixed ASN compilation so do not need -I on compile line for asn includes.
210 # Revision 2.22 2003/04/02 06:52:04 robertj
211 # Added dependencies for H450 ASN files
213 # Revision 2.21 2003/03/26 02:49:00 robertj
214 # Added service/daemon sample application.
216 # Revision 2.20 2003/03/19 04:45:29 robertj
217 # Added opalvxml to build
219 # Revision 2.19 2003/03/18 23:09:37 robertj
220 # Fixed LD_LIBRARY_PATH issue with Solaris
222 # Revision 2.18 2003/03/17 23:08:41 robertj
223 # Added IVR endpoint
225 # Revision 2.17 2003/03/17 22:36:38 robertj
226 # Added video support.
228 # Revision 2.16 2003/01/15 00:08:18 robertj
229 # Updated to OpenH323 v1.10.3
231 # Revision 2.15 2002/11/12 12:06:34 robertj
232 # Fixed Solaris compatibility
234 # Revision 2.14 2002/11/11 07:43:32 robertj
235 # Added speex codec files
237 # Revision 2.13 2002/09/11 05:56:16 robertj
238 # Fixed double inclusion of common.mak
239 # Added opalwavfile.cxx module
241 # Revision 2.12 2002/03/15 10:51:53 robertj
242 # Fixed problem with recursive inclusion on make files.
244 # Revision 2.11 2002/03/05 06:27:34 robertj
245 # Added ASN parser build and version check code.
247 # Revision 2.10 2002/02/22 04:16:25 robertj
248 # Added G.726 codec and fixed the lpc10 and GSM codecs.
250 # Revision 2.9 2002/02/11 09:38:28 robertj
251 # Moved version to root directory
253 # Revision 2.8 2002/02/06 11:52:53 rogerh
254 # Move -I$(ASN_INCDIR) so Opal's ldap.h is found instead of the OS's ldap.h
256 # Revision 2.7 2002/02/01 10:29:35 rogerh
257 # Use the right version.h file. (the other one had comments which confused
258 # pwlib's lib.mak)
260 # Revision 2.6 2002/02/01 04:58:23 craigs
261 # Added sip directory to VPATH
263 # Revision 2.5 2002/02/01 04:53:01 robertj
264 # Added (very primitive!) SIP support.
266 # Revision 2.4 2002/02/01 00:19:20 robertj
267 # Updated to latest pwlilb.
268 # Added rfc2833 module
270 # Revision 2.3 2001/08/17 05:24:22 robertj
271 # Updates from OpenH323 v1.6.0 release.
273 # Revision 2.2 2001/08/01 06:22:55 robertj
274 # Major changes to H.323 capabilities, uses OpalMediaFormat for base name.
275 # Added G.711 transcoder.
277 # Revision 2.1 2001/07/30 03:41:20 robertj
278 # Added build of subdirectories for samples.
279 # Hid the asnparser.version file.
280 # Changed default OPALDIR variable to be current directory.
282 # Revision 2.0 2001/07/27 15:48:24 robertj
283 # Conversion of OpenH323 to Open Phone Abstraction Library (OPAL)
286 export OPALDIR=@OPALDIR@
288 INSTALL=@INSTALL@
289 OS_NAME=$(shell uname -s)
290 ifeq ($(OS_NAME),SunOS)
291 override SHELL=/usr/bin/bash
292 endif
294 default :: optshared
296 all :: bothdepend both
298 update:
299 cvs -q update
300 $(MAKE) all
303 SUBDIRS := plugins
305 LIBRARY_MAKEFILE:=1
307 include $(OPALDIR)/opal_inc.mak
309 PREFIX=@INSTALLPREFIX@/
310 exec_prefix = ${PREFIX}
312 ifndef PREFIX
313 PREFIX=/usr/local
314 endif
316 ifeq ($(USE_GCC),yes)
317 ANSI_FLAG = -ansi
318 endif
320 OPAL_OBJDIR = $(OPAL_LIBDIR)/$(PT_OBJBASE)
321 ifdef NOTRACE
322 OPAL_OBJDIR += n
323 endif
325 OBJDIR = $(OPAL_OBJDIR)
326 LIBDIR = $(OPAL_LIBDIR)
327 TARGET = $(OPAL_LIBDIR)/$(OPAL_FILE)
329 STDCCFLAGS += @STDCCFLAGS@
331 ifdef NOTRACE
332 STDCCFLAGS += -DPASN_NOPRINTON
333 else
334 STDCCFLAGS += -DPTRACING
335 endif
337 VPATH_CXX := $(OPAL_SRCDIR)/opal \
338 $(OPAL_SRCDIR)/rtp \
339 $(OPAL_SRCDIR)/lids \
340 $(OPAL_SRCDIR)/codec
342 ifneq (,$(wildcard src/iax2))
343 IAX2_AVAIL = 1
344 VPATH_CXX += $(OPAL_SRCDIR)/iax2
345 endif
347 ifneq (,$(wildcard src/sip))
348 SIP_AVAIL = 1
349 VPATH_CXX += $(OPAL_SRCDIR)/sip
350 endif
352 ifneq (,$(wildcard src/h323))
353 H323_AVAIL = 1
354 VPATH_CXX += $(OPAL_SRCDIR)/h323 \
355 $(OPAL_SRCDIR)/t120 \
356 $(OPAL_SRCDIR)/t38 \
357 $(OPAL_SRCDIR)/asn
358 endif
360 ifneq (,$(wildcard src/h224))
361 H224_AVAIL = 1
362 VPATH_CXX += $(OPAL_SRCDIR)/h224
364 endif
366 VPATH_C := $(OPAL_SRCDIR)/codec
368 ########################################
369 # Source files for library
371 SOURCES := $(OPAL_SRCDIR)/opal/manager.cxx \
372 $(OPAL_SRCDIR)/opal/endpoint.cxx \
373 $(OPAL_SRCDIR)/opal/connection.cxx \
374 $(OPAL_SRCDIR)/opal/call.cxx \
375 $(OPAL_SRCDIR)/opal/mediafmt.cxx \
376 $(OPAL_SRCDIR)/opal/mediastrm.cxx \
377 $(OPAL_SRCDIR)/opal/patch.cxx \
378 $(OPAL_SRCDIR)/opal/transcoders.cxx \
379 $(OPAL_SRCDIR)/opal/transports.cxx \
380 $(OPAL_SRCDIR)/opal/guid.cxx \
381 $(OPAL_SRCDIR)/opal/opalglobalstatics.cxx \
382 $(OPAL_SRCDIR)/rtp/rtp.cxx \
383 $(OPAL_SRCDIR)/rtp/jitter.cxx \
385 ifeq ($(HAS_AUDIO),1)
386 SOURCES += $(OPAL_SRCDIR)/opal/pcss.cxx
387 endif
389 ifeq ($(OPAL_IVR), 1)
390 SOURCES += $(OPAL_SRCDIR)/opal/ivr.cxx \
391 $(OPAL_SRCDIR)/opal/opalvxml.cxx
392 endif
394 ########################################
396 # H.323 files
398 ifeq ($(OPAL_H323),1)
399 ifdef H323_AVAIL
401 ASN_SRCDIR := $(OPAL_SRCDIR)/asn
402 ASN_INCDIR := $(OPAL_INCDIR)/asn
404 H450_ASN_FILES := h4501 h4502 h4503 h4504 h4505 h4506 h4507 h4508 h4509 h45010 h45011
405 SIMPLE_ASN_FILES := x880 $(H450_ASN_FILES) mcs gcc t38
407 ASN_H_FILES := $(addprefix $(ASN_INCDIR)/,$(addsuffix .h, $(SIMPLE_ASN_FILES)))
408 ASN_CXX_FILES := $(addprefix $(ASN_SRCDIR)/,$(addsuffix .cxx,$(SIMPLE_ASN_FILES)))
410 ASN_H_FILES += $(ASN_INCDIR)/h225.h
411 ASN_CXX_FILES += $(ASN_SRCDIR)/h225_1.cxx $(ASN_SRCDIR)/h225_2.cxx
413 ASN_H_FILES += $(ASN_INCDIR)/h235.h $(ASN_SRCDIR)/h235_t.cxx
414 ASN_CXX_FILES += $(ASN_SRCDIR)/h235.cxx
416 ASN_H_FILES += $(ASN_INCDIR)/h245.h
417 ASN_CXX_FILES += $(ASN_SRCDIR)/h245_1.cxx $(ASN_SRCDIR)/h245_2.cxx $(ASN_SRCDIR)/h245_3.cxx
419 ASN_H_FILES += $(ASN_INCDIR)/h248.h
420 ASN_CXX_FILES += $(ASN_SRCDIR)/h248.cxx
422 ASN_H_FILES += $(ASN_INCDIR)/h501.h
423 ASN_CXX_FILES += $(ASN_SRCDIR)/h501.cxx
425 .PRECIOUS: $(ASN_CXX_FILES) $(ASN_H_FILES)
428 SOURCES += $(ASN_CXX_FILES) \
429 $(OPAL_SRCDIR)/h323/h323ep.cxx \
430 $(OPAL_SRCDIR)/h323/h323.cxx \
431 $(OPAL_SRCDIR)/h323/h323caps.cxx \
432 $(OPAL_SRCDIR)/h323/h323neg.cxx \
433 $(OPAL_SRCDIR)/h323/h323pdu.cxx \
434 $(OPAL_SRCDIR)/h323/h323rtp.cxx \
435 $(OPAL_SRCDIR)/h323/channels.cxx \
436 $(OPAL_SRCDIR)/h323/svcctrl.cxx \
437 $(OPAL_SRCDIR)/h323/h450pdu.cxx \
438 $(OPAL_SRCDIR)/h323/q931.cxx \
439 $(OPAL_SRCDIR)/h323/transaddr.cxx \
440 $(OPAL_SRCDIR)/h323/gkclient.cxx \
441 $(OPAL_SRCDIR)/h323/gkserver.cxx \
442 $(OPAL_SRCDIR)/h323/h225ras.cxx \
443 $(OPAL_SRCDIR)/h323/h323trans.cxx \
444 $(OPAL_SRCDIR)/h323/h235auth.cxx \
445 $(OPAL_SRCDIR)/h323/h501pdu.cxx \
446 $(OPAL_SRCDIR)/h323/h323annexg.cxx \
447 $(OPAL_SRCDIR)/h323/peclient.cxx \
449 ifdef H323_H460
450 SOURCES += $(OPAL_SRCDIR)/h323/h4601.cxx
451 endif
453 ifdef HAS_OPENSSL
454 SOURCES += $(OPAL_SRCDIR)/h235auth1.cxx
455 endif
457 SOURCES += $(OPAL_SRCDIR)/t120/t120proto.cxx \
458 $(OPAL_SRCDIR)/t120/h323t120.cxx \
459 $(OPAL_SRCDIR)/t120/x224.cxx \
460 $(OPAL_SRCDIR)/t38/t38proto.cxx \
461 $(OPAL_SRCDIR)/t38/h323t38.cxx
463 ifeq ($(OPAL_H224), 1)
464 ifdef H224_AVAIL
465 SOURCES += $(OPAL_SRCDIR)/h224/h323h224.cxx
466 endif
467 endif
469 endif
470 endif
472 ##################
473 # IAX2 files
475 ifeq ($(OPAL_IAX2),1)
476 ifdef IAX2_AVAIL
478 SOURCES += \
479 $(OPAL_SRCDIR)/iax2/callprocessor.cxx \
480 $(OPAL_SRCDIR)/iax2/frame.cxx \
481 $(OPAL_SRCDIR)/iax2/iax2con.cxx \
482 $(OPAL_SRCDIR)/iax2/iax2ep.cxx \
483 $(OPAL_SRCDIR)/iax2/iax2jitter.cxx \
484 $(OPAL_SRCDIR)/iax2/iax2medstrm.cxx \
485 $(OPAL_SRCDIR)/iax2/iedata.cxx \
486 $(OPAL_SRCDIR)/iax2/ies.cxx \
487 $(OPAL_SRCDIR)/iax2/processor.cxx \
488 $(OPAL_SRCDIR)/iax2/receiver.cxx \
489 $(OPAL_SRCDIR)/iax2/regprocessor.cxx\
490 $(OPAL_SRCDIR)/iax2/remote.cxx \
491 $(OPAL_SRCDIR)/iax2/safestrings.cxx \
492 $(OPAL_SRCDIR)/iax2/sound.cxx \
493 $(OPAL_SRCDIR)/iax2/specialprocessor.cxx \
494 $(OPAL_SRCDIR)/iax2/transmit.cxx
495 endif
496 endif
498 ################################################################################
499 # SIP files
501 ifeq ($(OPAL_SIP),1)
502 ifdef SIP_AVAIL
504 SOURCES += $(OPAL_SRCDIR)/sip/sipep.cxx \
505 $(OPAL_SRCDIR)/sip/sipcon.cxx \
506 $(OPAL_SRCDIR)/sip/sippdu.cxx \
507 $(OPAL_SRCDIR)/sip/sdp.cxx \
509 endif
510 endif
512 ##################
513 # H.224 files
515 ifeq ($(OPAL_H224), 1)
516 ifdef H224_AVAIL
518 SOURCES += $(OPAL_SRCDIR)/h224/q922.cxx \
519 $(OPAL_SRCDIR)/h224/h224.cxx \
520 $(OPAL_SRCDIR)/h224/h281.cxx
521 endif
522 endif
524 ##################
525 # LIDS
527 ifeq ($(OPAL_LID), 1)
529 SOURCES += $(OPAL_SRCDIR)/lids/lid.cxx \
530 $(OPAL_SRCDIR)/lids/lidep.cxx \
531 $(OPAL_SRCDIR)/lids/lidpluginmgr.cxx \
533 endif
535 ##################
536 # SRTP
538 ifeq ($(OPAL_SRTP), 1)
539 SOURCES += $(OPAL_SRCDIR)/rtp/srtp.cxx \
541 endif
545 ##################
546 # Software codecs
548 SOURCES += $(OPAL_SRCDIR)/codec/g711codec.cxx \
549 $(OPAL_SRCDIR)/codec/g711.c \
550 $(OPAL_SRCDIR)/codec/rfc2833.cxx \
551 $(OPAL_SRCDIR)/codec/opalwavfile.cxx \
552 $(OPAL_SRCDIR)/codec/silencedetect.cxx \
553 $(OPAL_SRCDIR)/codec/echocancel.cxx \
554 $(OPAL_SRCDIR)/codec/opalpluginmgr.cxx
556 ifeq ($(HAS_VIDEO), 1)
557 SOURCES += $(OPAL_SRCDIR)/codec/vidcodec.cxx
558 endif
560 SPEEX_DIR = $(OPAL_SRCDIR)/codec/speex
562 #HEADER_FILES += $(OPAL_INCDIR)/speexcodec.h
564 #SOURCES += $(OPAL_SRCDIR)/codec/speexcodec.cxx
566 ifdef OPAL_SYSTEM_SPEEX
568 ENDLDLIBS := -lspeex $(ENDLDLIBS)
570 else
572 SPEEX_INCDIR = $(SPEEX_DIR)/libspeex
573 SPEEX_SRCDIR = $(SPEEX_DIR)/libspeex
575 VPATH_C += $(SPEEX_SRCDIR)
576 VPATH_CXX += $(SPEEX_SRCDIR)
578 HEADER_FILES += $(SPEEX_INCDIR)/speex.h \
579 $(SPEEX_INCDIR)/speex_bits.h \
580 $(SPEEX_INCDIR)/speex_header.h \
581 $(SPEEX_INCDIR)/speex_callbacks.h \
582 $(SPEEX_INCDIR)/speex_config_types.h \
583 $(SPEEX_INCDIR)/speex_preprocess.h \
584 $(SPEEX_INCDIR)/speex_stereo.h \
585 $(SPEEX_INCDIR)/speex_types.h \
586 $(SPEEX_INCDIR)/speex_jitter.h \
587 $(SPEEX_INCDIR)/speex_echo.h
589 SOURCES += $(SPEEX_SRCDIR)/speex_preprocess.c \
590 $(SPEEX_SRCDIR)/smallft.c \
591 $(SPEEX_SRCDIR)/misc.c \
592 $(SPEEX_SRCDIR)/mdf.c \
593 $(SPEEX_SRCDIR)/math_approx.c \
594 $(SPEEX_SRCDIR)/kiss_fftr.c \
595 $(SPEEX_SRCDIR)/kiss_fft.c \
596 $(SPEEX_SRCDIR)/fftwrap.c \
598 endif # OPAL_SYSTEM_SPEEX
601 # Files to be cleaned during make clean
604 CLEAN_FILES = $(OPAL_LIB)
607 ####################################################
609 include @PWLIBDIR@/make/common.mak
611 PROG=opal
612 ####################################################
613 # replace lib.mak
615 ifneq ($(OSTYPE),Darwin)
616 LIBNAME_MAJ = $(OPAL_FILE).$(MAJOR_VERSION)
617 LIBNAME_MIN = $(LIBNAME_MAJ).$(MINOR_VERSION)
618 ifeq ($(BUILD_TYPE),.)
619 LIBNAME_PAT = $(LIBNAME_MIN).$(BUILD_NUMBER)
620 else
621 LIBNAME_PAT = $(LIBNAME_MIN)-$(BUILD_TYPE)$(BUILD_NUMBER)
622 endif
623 else
624 LIBNAME_MAJ = $(subst .$(LIB_SUFFIX),.$(MAJOR_VERSION).$(LIB_SUFFIX),$(OPAL_FILE))
625 LIBNAME_MIN = $(subst .$(LIB_SUFFIX),.$(MAJOR_VERSION).$(MINOR_VERSION).$(LIB_SUFFIX),$(OPAL_FILE))
626 ifeq ($(BUILD_TYPE),.)
627 LIBNAME_PAT = $(subst .$(LIB_SUFFIX),.$(MAJOR_VERSION).$(MINOR_VERSION).$(BUILD_NUMBER).$(LIB_SUFFIX),$(OPAL_FILE))
628 else
629 LIBNAME_PAT = $(subst .$(LIB_SUFFIX),.$(MAJOR_VERSION).$(MINOR_VERSION)-$(BUILD_TYPE)$(BUILD_NUMBER).$(LIB_SUFFIX),$(OPAL_FILE))
630 endif
631 endif
633 LIB_SONAME = $(LIBNAME_MIN)
635 CLEAN_FILES += $(LIBDIR)/$(LIBNAME_PAT) $(LIBDIR)/$(OPAL_FILE) $(LIBDIR)/$(LIBNAME_MAJ) $(LIBDIR)/$(LIBNAME_MIN)
637 ifneq ($(P_SHAREDLIB),1)
638 STATIC_LIB_FILE = $(LIBDIR)/$(OPAL_FILE)
639 else
640 STATIC_LIB_FILE = $(LIBDIR)/$(subst .$(LIB_SUFFIX),_s.$(STATICLIBEXT),$(OPAL_FILE))
641 endif
643 $(LIBDIR)/$(OPAL_FILE) : $(TARGETLIB)
645 ifeq ($(P_SHAREDLIB),1)
647 SYSLIBS += -L$(PW_LIBDIR) -l$(PTLIB_BASE)$(LIB_TYPE)
648 ifeq ($(OSTYPE),beos)
649 # BeOS requires different options when building shared libraries
650 LDSOOPTS = -nostdlib -nostart
651 EXTLIBS = -lstdc++.r4
652 else
653 ifeq ($(OSTYPE),Darwin)
654 LDSOOPTS = -dynamiclib
655 else
656 LDSOOPTS = -shared
657 endif
658 endif
660 ENDLDLIBS := $(SYSLIBS) $(ENDLDLIBS)
662 ifeq ($(OSTYPE),rtems)
663 EXTLIBS = -lstdc++
664 endif
666 ifneq ($(OSTYPE), QNX)
667 ifneq (,$(findstring $(OSTYPE),FreeBSD OpenBSDs))
668 ifdef P_PTHREADS
669 EXTLIBS += -pthread
670 endif
671 else
672 ifdef P_PTHREADS
673 EXTLIBS += -lpthread
674 endif
675 endif
676 endif
678 # Solaris loader doesn't grok -soname (sees it as -s -oname)
679 # We could use -Wl,-h,$(LIB_BASENAME).1 but then we find that the arglist
680 # to gcc is 2900+ bytes long and it will barf. I fix this by invoking ld
681 # directly and passing it the equivalent arguments...jpd@louisiana.edu
682 ifeq ($(OSTYPE),solaris)
683 LDSOOPTS = -Bdynamic -G -h $(LIB_SONAME)
684 LD = $(CPLUS)
685 else
686 ifeq ($(OSTYPE),mingw)
687 LDSOOPTS += -Wl,--kill-at
688 else
689 ifneq ($(OSTYPE),Darwin)
690 LDSOOPTS += -Wl,-soname,$(LIB_SONAME)
691 endif
692 endif
693 LD = $(CPLUS)
694 endif
696 $(LIBDIR)/$(OPAL_FILE): $(LIBDIR)/$(LIBNAME_PAT)
697 cd $(LIBDIR) ; rm -f $(OPAL_FILE) ; ln -sf $(LIBNAME_PAT) $(OPAL_FILE)
698 cd $(LIBDIR) ; rm -f $(LIBNAME_MAJ) ; ln -sf $(LIBNAME_PAT) $(LIBNAME_MAJ)
699 cd $(LIBDIR) ; rm -f $(LIBNAME_MIN) ; ln -sf $(LIBNAME_PAT) $(LIBNAME_MIN)
701 cd $(LIBDIR) ; rm -f libopal.$(LIB_SUFFIX) ; ln -sf $(LIBNAME_PAT) libopal.$(LIB_SUFFIX)
703 $(LIBDIR)/$(LIBNAME_PAT): $(STATIC_LIB_FILE)
704 @echo EXTLIBS = $(EXTLIBS)
705 @echo SYSLIBS = $(SYSLIBS)
706 @if [ ! -d $(LIBDIR) ] ; then mkdir $(LIBDIR) ; fi
707 $(LD) $(LDSOOPTS) -o $(LIBDIR)/$(LIBNAME_PAT) $(LDFLAGS) $(EXTLIBS) $(OBJS) $(ENDLDLIBS)
709 endif # P_SHAREDLIB
711 $(STATIC_LIB_FILE): $(OBJS)
712 @if [ ! -d $(LIBDIR) ] ; then mkdir $(LIBDIR) ; fi
713 $(ARCHIVE) $(STATIC_LIB_FILE) $(OBJS)
714 ifeq ($(P_USE_RANLIB),1)
715 $(RANLIB) $(STATIC_LIB_FILE)
716 endif
718 ####################################################
720 notrace::
721 $(MAKE) NOTRACE=1 opt
723 # Build rules for the Speex codec
725 $(OPAL_OBJDIR)/%.o : $(SPEEX_SRCDIR)/%.c
726 @if [ ! -d $(OPAL_OBJDIR) ] ; then mkdir -p $(OPAL_OBJDIR) ; fi
727 $(CC) $(STDCCFLAGS) -I$(SPEEX_INCDIR) $(OPTCCFLAGS) $(CFLAGS) -c $< -o $@
729 $(DEPDIR)/%.dep : $(SPEEX_SRCDIR)/%.c
730 @if [ ! -d $(DEPDIR) ] ; then mkdir -p $(DEPDIR) ; fi
731 @printf %s $(OPAL_OBJDIR)/ > $@
732 $(CC) -I$(SPEEX_INCDIR) $(CFLAGS) -M $< >> $@
734 ###############################################################################
735 #### Subdirectories
736 $(subst tagbuild,,$(STANDARD_TARGETS)) ::
737 @set -e; $(foreach dir,$(SUBDIRS),if test -e $(dir) ; then $(MAKE) -C $(dir) $@; fi ;)
740 $(STANDARD_TARGETS) :: Makefile
742 Makefile: Makefile.in configure
743 @echo
744 @echo "*******************************************************"
745 @echo Makefile is not up to date, is a ./configure necessary?
746 @echo "*******************************************************"
747 @false
749 test:
750 @echo $(ASN_CXX_FILES)
752 #### Install targets
753 install:
754 mkdir -p $(DESTDIR)@LIBDIR@
755 ( for dir in $(DESTDIR)@LIBDIR@ \
756 $(DESTDIR)$(PREFIX)/include/opal/asn \
757 $(DESTDIR)$(PREFIX)/include/opal/codec \
758 $(DESTDIR)$(PREFIX)/include/opal/h323 \
759 $(DESTDIR)$(PREFIX)/include/opal/iax2 \
760 $(DESTDIR)$(PREFIX)/include/opal/lids \
761 $(DESTDIR)$(PREFIX)/include/opal/opal \
762 $(DESTDIR)$(PREFIX)/include/opal/rtp \
763 $(DESTDIR)$(PREFIX)/include/opal/sip \
764 $(DESTDIR)$(PREFIX)/include/opal/t120 \
765 $(DESTDIR)$(PREFIX)/include/opal/t38 \
766 $(DESTDIR)$(PREFIX)/lib/pkgconfig \
767 $(DESTDIR)$(PREFIX)/share/opal ;\
768 do mkdir -p $$dir ; chmod 755 $$dir ; \
769 done)
770 $(INSTALL) -m 755 lib/$(LIBNAME_PAT) $(DESTDIR)@LIBDIR@
771 $(INSTALL) -m 444 opal.pc $(DESTDIR)$(PREFIX)/lib/pkgconfig
772 ln -snf $(LIBNAME_PAT) \
773 $(DESTDIR)@LIBDIR@/$(OPAL_FILE).$(MAJOR_VERSION).$(MINOR_VERSION)
774 ln -snf $(LIBNAME_PAT) \
775 $(DESTDIR)@LIBDIR@/$(OPAL_FILE).$(MAJOR_VERSION)
776 ln -snf $(LIBNAME_PAT) \
777 $(DESTDIR)@LIBDIR@/$(OPAL_FILE)
778 ln -snf $(LIBNAME_PAT) \
779 $(DESTDIR)@LIBDIR@/libopal.so
780 ( for fn in include/asn/*.h ; do \
781 $(INSTALL) -m 644 $$fn $(DESTDIR)$(PREFIX)/include/opal/asn ; \
782 done)
783 ( for fn in include/codec/*.h ; do \
784 $(INSTALL) -m 644 $$fn $(DESTDIR)$(PREFIX)/include/opal/codec ; \
785 done)
786 ( for fn in include/h323/*.h ; do \
787 $(INSTALL) -m 644 $$fn $(DESTDIR)$(PREFIX)/include/opal/h323 ; \
788 done)
789 ( for fn in include/iax2/*.h ; do \
790 $(INSTALL) -m 644 $$fn $(DESTDIR)$(PREFIX)/include/opal/iax2 ; \
791 done)
792 ( for fn in include/lids/*.h ; do \
793 $(INSTALL) -m 644 $$fn $(DESTDIR)$(PREFIX)/include/opal/lids ; \
794 done)
795 ( for fn in include/opal/*.h ; do \
796 $(INSTALL) -m 644 $$fn $(DESTDIR)$(PREFIX)/include/opal/opal ; \
797 done)
798 ( for fn in include/rtp/*.h ; do \
799 $(INSTALL) -m 644 $$fn $(DESTDIR)$(PREFIX)/include/opal/rtp ; \
800 done)
801 ( for fn in include/sip/*.h ; do \
802 $(INSTALL) -m 644 $$fn $(DESTDIR)$(PREFIX)/include/opal/sip ; \
803 done)
804 ( for fn in include/t120/*.h ; do \
805 $(INSTALL) -m 644 $$fn $(DESTDIR)$(PREFIX)/include/opal/t120 ; \
806 done)
807 ( for fn in include/t38/*.h ; do \
808 $(INSTALL) -m 644 $$fn $(DESTDIR)$(PREFIX)/include/opal/t38 ; \
809 done)
810 $(INSTALL) -m 644 opal_inc.mak $(DESTDIR)$(PREFIX)/share/opal
811 $(MAKE) -C plugins install
813 uninstall:
814 rm -rf $(DESTDIR)$(PREFIX)/include/opal \
815 $(DESTDIR)$(PREFIX)/share/opal
816 rm -f $(DESTDIR)@LIBDIR@/$(OPAL_FILE) \
817 $(DESTDIR)@LIBDIR@/libopal.so \
818 $(DESTDIR)@LIBDIR@/$(OPAL_FILE).$(MAJOR_VERSION).$(MINOR_VERSION) \
819 $(DESTDIR)@LIBDIR@/$(OPAL_FILE).$(MAJOR_VERSION) \
820 $(DESTDIR)@LIBDIR@/$(LIBNAME_PAT) \
821 $(DESTDIR)$(PREFIX)/lib/pkgconfig/opal.pc \
822 $(MAKE) -C plugins uninstall
824 docs: FORCE
825 doxygen opal_cfg.dxy
827 FORCE:
830 # End of file #################################################################