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
18 # The Original Code is Open Phone Abstraction Library.
20 # The Initial Developer of the Original Code is Equivalence Pty. Ltd.
22 # Contributor(s): ______________________________________.
25 # Revision 1.48 2006/10/16 21:30:55 dsandras
26 # Applied patch from Brian Lu <brian lu sun com> to fix compilation issues
27 # on OpenSolaris. Thanks!
29 # Revision 1.47 2006/10/10 10:12:34 csoutheren
30 # Allow correct operation if subdirs are missing
32 # Revision 1.46 2006/10/10 07:18:17 csoutheren
33 # Allow compilation with and without various options
35 # Revision 1.45 2006/10/05 07:11:49 csoutheren
36 # Add --disable-lid option
38 # Revision 1.44 2006/10/04 06:19:08 csoutheren
39 # Fixed SRTP configuration for Linux
41 # Revision 1.43 2006/10/02 13:30:50 rjongbloed
44 # Revision 1.42 2006/09/18 08:41:53 rjongbloed
45 # Added simple OPAL sample to default build.
46 # Added check that Makefile may need to be rebuilt from configure script.
48 # Revision 1.41 2006/09/11 20:44:17 dereksmithies
49 # Fix spacing at end of line for two iax files.
51 # Revision 1.40 2006/09/11 20:13:36 dsandras
52 # Fixed IAX2 build thanks to Stephen Cook <siti orcon net nz>.
54 # Revision 1.39 2006/09/07 10:05:55 rjongbloed
55 # Added "make update" target to do cvs update and rebuild
57 # Revision 1.38 2006/08/15 19:41:38 dsandras
58 # Only build plugins when building the library.
60 # Revision 1.37 2006/08/09 23:14:00 dereksmithies
61 # Add fix for compiling new iax processing files.
62 # Big thanks to Stephen Cook, (sitiveni@gmail.com) for this work.
63 # Thanks also for the Google Summer of Code.
65 # Revision 1.36 2006/08/08 09:16:47 rjongbloed
66 # Fixed building of audio plugins on linux
68 # Revision 1.35 2006/08/03 12:43:52 csoutheren
69 # Fixed compilation on Linux
71 # Revision 1.34 2006/07/24 14:03:38 csoutheren
72 # Merged in audio and video plugins from CVS branch PluginBranch
74 # Revision 1.33 2006/06/08 07:03:16 csoutheren
75 # Changed to force docs to build even when docs directory exists
77 # Revision 1.32 2006/05/30 12:04:08 hfriederich
78 # Enabling to build H.460
80 # Revision 1.31 2006/04/22 14:05:47 dsandras
81 # When building a shared library x that references symbols in libraries y,
82 # the y libraries need to be added to the linker command always. Thanks to
83 # Vitaly Lipatov. (Fixes Ekiga report #338310).
85 # Revision 1.30 2006/04/20 16:56:41 hfriederich
86 # Changes to allow compilation of H.224/H.281 code as well as to disable H.224 entirely
88 # Revision 1.29 2006/04/17 00:06:26 csoutheren
89 # Allow ILBC codec to be disabled and detect if not present
91 # Revision 1.28.2.1 2006/05/16 07:03:09 csoutheren
92 # Fixed Linux compile system
94 # Revision 1.28 2006/02/01 22:42:55 dominance
95 # ensure we have the full disctinct SONAME instead of just the major number version.
97 # Revision 1.27 2006/01/30 02:23:15 csoutheren
98 # First cut at fixing problem with speex libraries
100 # Revision 1.26 2006/01/20 00:00:59 csoutheren
101 # Added protected against some source directories not being present
102 # even wen configuration says they should be
104 # Revision 1.25 2006/01/19 22:40:33 dereksmithies
105 # Add iax2 to the list of instal directories. Thanks to Damien Sandras
106 # for reporting the bug in iax2 compilation.
108 # Revision 1.24 2006/01/18 11:26:29 dsandras
109 # Reverted previous change.
111 # Revision 1.22 2006/01/14 10:43:06 dsandras
112 # Applied patch from Brian Lu <Brian.Lu _AT_____ sun.com> to allow compilation
113 # with OpenSolaris compiler. Many thanks !!!
115 # Revision 1.21 2006/01/07 17:37:50 dsandras
116 # Updated to speex 1.1.11.2 to fix divergeance issues.
118 # Revision 1.20 2006/01/01 19:19:32 dsandras
119 # Added RFC2190 H.263 codec thanks to Salyens. Many thanks!
121 # Revision 1.19 2005/12/06 06:34:10 csoutheren
122 # Added configure support for Sangoma and empty LID source and header files
124 # Revision 1.18 2005/11/24 20:31:54 dsandras
125 # Added support for echo cancelation using Speex.
126 # Added possibility to add a filter to an OpalMediaPatch for all patches of a connection.
128 # Revision 1.17 2005/11/23 22:01:37 dsandras
129 # Reverted previous change. echocancel.cxx is not ready to go in yet.
131 # Revision 1.16 2005/11/23 21:58:33 dsandras
134 # Revision 1.15 2005/11/20 21:03:50 dsandras
135 # Upgraded to Speex 1.1.10.
137 # Revision 1.14 2005/09/13 20:48:22 dominance
138 # minor cleanups needed to support mingw compilation. Thanks goes to Julien Puydt.
140 # Revision 1.13 2005/08/10 11:07:14 csoutheren
142 # Fixed dynamic linking on MacOSX
143 # Thanks to Hannes Friederich
145 # Revision 1.12 2005/07/30 07:39:26 csoutheren
146 # Added support for compiling new IAX2 code
148 # Revision 1.11 2005/04/26 10:58:37 dsandras
149 # Committed workaround for "make install".
151 # Revision 1.10 2005/04/25 10:14:14 dsandras
152 # Move LIBDIR down due to conflicting names.
154 # Revision 1.9 2005/04/25 09:31:35 dsandras
157 # Revision 1.8 2005/04/25 09:07:58 dsandras
158 # Fixed install/uninstall.
160 # Revision 1.7 2005/04/21 01:05:55 csoutheren
161 # New fix from Peter Robinson
163 # Revision 1.6 2005/04/20 05:46:32 csoutheren
164 # Patch 1146010. Fix problem with install targets
165 # Thanks to Peter Robinson
167 # Revision 1.5 2005/04/11 10:41:05 dsandras
168 # Added patch from Georgi Georgiev to fix compilation issues on Athlon64.
170 # Revision 1.4 2005/02/27 22:03:39 dereksmithies
171 # Add target to generate docs with doxygen.
173 # Revision 1.3 2005/01/31 07:40:41 csoutheren
174 # Fix for MacOSX thanks to Hannes Friederich
176 # Revision 1.2 2004/12/05 18:14:20 dsandras
179 # Revision 1.1 2004/12/04 18:37:58 dsandras
180 # Ported the "make install" / "make uninstall" system from OpenH323 to OPAL.
182 # Revision 2.29 2004/06/04 05:29:28 csoutheren
183 # Updated for ASN file changes and added silencedetect.cxx
185 # Revision 2.28 2004/04/25 02:53:28 rjongbloed
186 # Fixed GNU 3.4 warnings
188 # Revision 2.27 2004/03/11 06:54:25 csoutheren
189 # Added ability to disable SIP or H.323 stacks
191 # Revision 2.26 2004/02/23 01:28:49 rjongbloed
192 # Fixed unix build for recent upgrade to OpenH323 latest code.
194 # Revision 2.25 2004/02/16 09:15:19 csoutheren
195 # Fixed problems with codecs on Unix systems
197 # Revision 2.24 2003/04/08 11:46:35 robertj
198 # Better portability for tr command when doing ASN parse.
200 # Revision 2.23 2003/04/08 06:09:19 robertj
201 # Fixed ASN compilation so do not need -I on compile line for asn includes.
203 # Revision 2.22 2003/04/02 06:52:04 robertj
204 # Added dependencies for H450 ASN files
206 # Revision 2.21 2003/03/26 02:49:00 robertj
207 # Added service/daemon sample application.
209 # Revision 2.20 2003/03/19 04:45:29 robertj
210 # Added opalvxml to build
212 # Revision 2.19 2003/03/18 23:09:37 robertj
213 # Fixed LD_LIBRARY_PATH issue with Solaris
215 # Revision 2.18 2003/03/17 23:08:41 robertj
218 # Revision 2.17 2003/03/17 22:36:38 robertj
219 # Added video support.
221 # Revision 2.16 2003/01/15 00:08:18 robertj
222 # Updated to OpenH323 v1.10.3
224 # Revision 2.15 2002/11/12 12:06:34 robertj
225 # Fixed Solaris compatibility
227 # Revision 2.14 2002/11/11 07:43:32 robertj
228 # Added speex codec files
230 # Revision 2.13 2002/09/11 05:56:16 robertj
231 # Fixed double inclusion of common.mak
232 # Added opalwavfile.cxx module
234 # Revision 2.12 2002/03/15 10:51:53 robertj
235 # Fixed problem with recursive inclusion on make files.
237 # Revision 2.11 2002/03/05 06:27:34 robertj
238 # Added ASN parser build and version check code.
240 # Revision 2.10 2002/02/22 04:16:25 robertj
241 # Added G.726 codec and fixed the lpc10 and GSM codecs.
243 # Revision 2.9 2002/02/11 09:38:28 robertj
244 # Moved version to root directory
246 # Revision 2.8 2002/02/06 11:52:53 rogerh
247 # Move -I$(ASN_INCDIR) so Opal's ldap.h is found instead of the OS's ldap.h
249 # Revision 2.7 2002/02/01 10:29:35 rogerh
250 # Use the right version.h file. (the other one had comments which confused
253 # Revision 2.6 2002/02/01 04:58:23 craigs
254 # Added sip directory to VPATH
256 # Revision 2.5 2002/02/01 04:53:01 robertj
257 # Added (very primitive!) SIP support.
259 # Revision 2.4 2002/02/01 00:19:20 robertj
260 # Updated to latest pwlilb.
261 # Added rfc2833 module
263 # Revision 2.3 2001/08/17 05:24:22 robertj
264 # Updates from OpenH323 v1.6.0 release.
266 # Revision 2.2 2001/08/01 06:22:55 robertj
267 # Major changes to H.323 capabilities, uses OpalMediaFormat for base name.
268 # Added G.711 transcoder.
270 # Revision 2.1 2001/07/30 03:41:20 robertj
271 # Added build of subdirectories for samples.
272 # Hid the asnparser.version file.
273 # Changed default OPALDIR variable to be current directory.
275 # Revision 2.0 2001/07/27 15:48:24 robertj
276 # Conversion of OpenH323 to Open Phone Abstraction Library (OPAL)
279 export OPALDIR
=@OPALDIR@
282 OS_NAME
=$(shell uname
-s
)
283 ifeq ($(OS_NAME
),SunOS
)
284 override SHELL
=/usr
/bin
/bash
289 all :: bothdepend both
300 include $(OPALDIR
)/opal_inc.mak
302 PREFIX
=@INSTALLPREFIX@
/
303 exec_prefix = ${PREFIX}
309 ifeq ($(USE_GCC
),yes
)
313 OPAL_OBJDIR
= $(OPAL_LIBDIR
)/$(PT_OBJBASE
)
318 OBJDIR
= $(OPAL_OBJDIR
)
319 LIBDIR
= $(OPAL_LIBDIR
)
320 TARGET
= $(OPAL_LIBDIR
)/$(OPAL_FILE
)
322 STDCCFLAGS
+= @STDCCFLAGS@
325 STDCCFLAGS
+= -DPASN_NOPRINTON
327 STDCCFLAGS
+= -DPTRACING
330 VPATH_CXX
:= $(OPAL_SRCDIR
)/opal \
332 $(OPAL_SRCDIR
)/lids \
335 ifneq (,$(wildcard src
/iax2
))
337 VPATH_CXX
+= $(OPAL_SRCDIR
)/iax2
340 ifneq (,$(wildcard src
/sip
))
342 VPATH_CXX
+= $(OPAL_SRCDIR
)/sip
345 ifneq (,$(wildcard src
/h323
))
347 VPATH_CXX
+= $(OPAL_SRCDIR
)/h323 \
348 $(OPAL_SRCDIR
)/t120 \
353 ifneq (,$(wildcard src
/h224
))
355 VPATH_CXX
+= $(OPAL_SRCDIR
)/h224
359 VPATH_C
:= $(OPAL_SRCDIR
)/codec
361 ########################################
362 # Source files for library
364 SOURCES
:= $(OPAL_SRCDIR
)/opal
/manager.
cxx \
365 $(OPAL_SRCDIR
)/opal
/endpoint.
cxx \
366 $(OPAL_SRCDIR
)/opal
/connection.
cxx \
367 $(OPAL_SRCDIR
)/opal
/call.
cxx \
368 $(OPAL_SRCDIR
)/opal
/mediafmt.
cxx \
369 $(OPAL_SRCDIR
)/opal
/mediastrm.
cxx \
370 $(OPAL_SRCDIR
)/opal
/patch.
cxx \
371 $(OPAL_SRCDIR
)/opal
/transcoders.
cxx \
372 $(OPAL_SRCDIR
)/opal
/transports.
cxx \
373 $(OPAL_SRCDIR
)/opal
/guid.
cxx \
374 $(OPAL_SRCDIR
)/opal
/opalglobalstatics.
cxx \
375 $(OPAL_SRCDIR
)/rtp
/rtp.
cxx \
376 $(OPAL_SRCDIR
)/rtp
/jitter.
cxx \
378 ifeq ($(HAS_AUDIO
),1)
379 SOURCES
+= $(OPAL_SRCDIR
)/opal
/pcss.
cxx
382 ifeq ($(OPAL_IVR
), 1)
383 SOURCES
+= $(OPAL_SRCDIR
)/opal
/ivr.
cxx \
384 $(OPAL_SRCDIR
)/opal
/opalvxml.
cxx
387 ########################################
391 ifeq ($(OPAL_H323
),1)
394 ASN_SRCDIR
:= $(OPAL_SRCDIR
)/asn
395 ASN_INCDIR
:= $(OPAL_INCDIR
)/asn
397 H450_ASN_FILES
:= h4501 h4502 h4503 h4504 h4505 h4506 h4507 h4508 h4509 h45010 h45011
398 SIMPLE_ASN_FILES
:= x880
$(H450_ASN_FILES
) mcs gcc t38
400 ASN_H_FILES
:= $(addprefix $(ASN_INCDIR
)/,$(addsuffix .h
, $(SIMPLE_ASN_FILES
)))
401 ASN_CXX_FILES
:= $(addprefix $(ASN_SRCDIR
)/,$(addsuffix .
cxx,$(SIMPLE_ASN_FILES
)))
403 ASN_H_FILES
+= $(ASN_INCDIR
)/h225.h
404 ASN_CXX_FILES
+= $(ASN_SRCDIR
)/h225_1.
cxx $(ASN_SRCDIR
)/h225_2.
cxx
406 ASN_H_FILES
+= $(ASN_INCDIR
)/h235.h
$(ASN_SRCDIR
)/h235_t.
cxx
407 ASN_CXX_FILES
+= $(ASN_SRCDIR
)/h235.
cxx
409 ASN_H_FILES
+= $(ASN_INCDIR
)/h245.h
410 ASN_CXX_FILES
+= $(ASN_SRCDIR
)/h245_1.
cxx $(ASN_SRCDIR
)/h245_2.
cxx $(ASN_SRCDIR
)/h245_3.
cxx
412 ASN_H_FILES
+= $(ASN_INCDIR
)/h248.h
413 ASN_CXX_FILES
+= $(ASN_SRCDIR
)/h248.
cxx
415 ASN_H_FILES
+= $(ASN_INCDIR
)/h501.h
416 ASN_CXX_FILES
+= $(ASN_SRCDIR
)/h501.
cxx
418 .PRECIOUS
: $(ASN_CXX_FILES
) $(ASN_H_FILES
)
421 SOURCES
+= $(ASN_CXX_FILES
) \
422 $(OPAL_SRCDIR
)/h323
/h323ep.
cxx \
423 $(OPAL_SRCDIR
)/h323
/h323.
cxx \
424 $(OPAL_SRCDIR
)/h323
/h323caps.
cxx \
425 $(OPAL_SRCDIR
)/h323
/h323neg.
cxx \
426 $(OPAL_SRCDIR
)/h323
/h323pdu.
cxx \
427 $(OPAL_SRCDIR
)/h323
/h323rtp.
cxx \
428 $(OPAL_SRCDIR
)/h323
/channels.
cxx \
429 $(OPAL_SRCDIR
)/h323
/svcctrl.
cxx \
430 $(OPAL_SRCDIR
)/h323
/h450pdu.
cxx \
431 $(OPAL_SRCDIR
)/h323
/q931.
cxx \
432 $(OPAL_SRCDIR
)/h323
/transaddr.
cxx \
433 $(OPAL_SRCDIR
)/h323
/gkclient.
cxx \
434 $(OPAL_SRCDIR
)/h323
/gkserver.
cxx \
435 $(OPAL_SRCDIR
)/h323
/h225ras.
cxx \
436 $(OPAL_SRCDIR
)/h323
/h323trans.
cxx \
437 $(OPAL_SRCDIR
)/h323
/h235auth.
cxx \
438 $(OPAL_SRCDIR
)/h323
/h501pdu.
cxx \
439 $(OPAL_SRCDIR
)/h323
/h323annexg.
cxx \
440 $(OPAL_SRCDIR
)/h323
/peclient.
cxx \
443 SOURCES
+= $(OPAL_SRCDIR
)/h323
/h4601.
cxx
447 SOURCES
+= $(OPAL_SRCDIR
)/h235auth1.
cxx
450 SOURCES
+= $(OPAL_SRCDIR
)/t120
/t120proto.
cxx \
451 $(OPAL_SRCDIR
)/t120
/h323t120.
cxx \
452 $(OPAL_SRCDIR
)/t120
/x224.
cxx \
453 $(OPAL_SRCDIR
)/t38
/t38proto.
cxx \
454 $(OPAL_SRCDIR
)/t38
/h323t38.
cxx
456 ifeq ($(OPAL_H224
), 1)
458 SOURCES
+= $(OPAL_SRCDIR
)/h224
/h323h224.
cxx
468 ifeq ($(OPAL_IAX2
),1)
472 $(OPAL_SRCDIR
)/iax2
/callprocessor.
cxx \
473 $(OPAL_SRCDIR
)/iax2
/specialprocessor.
cxx \
474 $(OPAL_SRCDIR
)/iax2
/frame.
cxx \
475 $(OPAL_SRCDIR
)/iax2
/iax2con.
cxx \
476 $(OPAL_SRCDIR
)/iax2
/iax2ep.
cxx \
477 $(OPAL_SRCDIR
)/iax2
/iax2medstrm.
cxx \
478 $(OPAL_SRCDIR
)/iax2
/iedata.
cxx \
479 $(OPAL_SRCDIR
)/iax2
/ies.
cxx \
480 $(OPAL_SRCDIR
)/iax2
/processor.
cxx \
481 $(OPAL_SRCDIR
)/iax2
/receiver.
cxx \
482 $(OPAL_SRCDIR
)/iax2
/regprocessor.
cxx\
483 $(OPAL_SRCDIR
)/iax2
/remote.
cxx \
484 $(OPAL_SRCDIR
)/iax2
/safestrings.
cxx \
485 $(OPAL_SRCDIR
)/iax2
/sound.
cxx \
486 $(OPAL_SRCDIR
)/iax2
/transmit.
cxx
490 ################################################################################
496 SOURCES
+= $(OPAL_SRCDIR
)/sip
/sipep.
cxx \
497 $(OPAL_SRCDIR
)/sip
/sipcon.
cxx \
498 $(OPAL_SRCDIR
)/sip
/sippdu.
cxx \
499 $(OPAL_SRCDIR
)/sip
/sdp.
cxx \
507 ifeq ($(OPAL_H224
), 1)
510 SOURCES
+= $(OPAL_SRCDIR
)/h224
/q922.
cxx \
511 $(OPAL_SRCDIR
)/h224
/h224.
cxx \
512 $(OPAL_SRCDIR
)/h224
/h281.
cxx
519 ifeq ($(OPAL_LID
), 1)
521 SOURCES
+= $(OPAL_SRCDIR
)/lids
/lid.
cxx \
522 $(OPAL_SRCDIR
)/lids
/lidep.
cxx \
523 $(OPAL_SRCDIR
)/lids
/lidpluginmgr.
cxx \
530 ifeq ($(OPAL_SRTP
), 1)
531 SOURCES
+= $(OPAL_SRCDIR
)/rtp
/srtp.
cxx \
540 SOURCES
+= $(OPAL_SRCDIR
)/codec
/g711codec.
cxx \
541 $(OPAL_SRCDIR
)/codec
/g711.c \
542 $(OPAL_SRCDIR
)/codec
/rfc2833.
cxx \
543 $(OPAL_SRCDIR
)/codec
/opalwavfile.
cxx \
544 $(OPAL_SRCDIR
)/codec
/silencedetect.
cxx \
545 $(OPAL_SRCDIR
)/codec
/echocancel.
cxx \
546 $(OPAL_SRCDIR
)/codec
/opalpluginmgr.
cxx
548 ifeq ($(HAS_VIDEO
), 1)
549 SOURCES
+= $(OPAL_SRCDIR
)/codec
/vidcodec.
cxx
552 SPEEX_DIR
= $(OPAL_SRCDIR
)/codec
/speex
554 #HEADER_FILES += $(OPAL_INCDIR)/speexcodec.h
556 #SOURCES += $(OPAL_SRCDIR)/codec/speexcodec.cxx
558 ifdef OPAL_SYSTEM_SPEEX
560 ENDLDLIBS
:= -lspeex
$(ENDLDLIBS
)
564 SPEEX_INCDIR
= $(SPEEX_DIR
)/libspeex
565 SPEEX_SRCDIR
= $(SPEEX_DIR
)/libspeex
567 VPATH_C
+= $(SPEEX_SRCDIR
)
568 VPATH_CXX
+= $(SPEEX_SRCDIR
)
570 HEADER_FILES
+= $(SPEEX_INCDIR
)/speex.h \
571 $(SPEEX_INCDIR
)/speex_bits.h \
572 $(SPEEX_INCDIR
)/speex_header.h \
573 $(SPEEX_INCDIR
)/speex_callbacks.h \
574 $(SPEEX_INCDIR
)/speex_config_types.h \
575 $(SPEEX_INCDIR
)/speex_preprocess.h \
576 $(SPEEX_INCDIR
)/speex_stereo.h \
577 $(SPEEX_INCDIR
)/speex_types.h \
578 $(SPEEX_INCDIR
)/speex_jitter.h \
579 $(SPEEX_INCDIR
)/speex_echo.h
581 SOURCES
+= $(SPEEX_SRCDIR
)/speex_preprocess.c \
582 $(SPEEX_SRCDIR
)/smallft.c \
583 $(SPEEX_SRCDIR
)/misc.c \
584 $(SPEEX_SRCDIR
)/mdf.c \
585 $(SPEEX_SRCDIR
)/math_approx.c \
586 $(SPEEX_SRCDIR
)/kiss_fftr.c \
587 $(SPEEX_SRCDIR
)/kiss_fft.c \
588 $(SPEEX_SRCDIR
)/fftwrap.c \
590 endif # OPAL_SYSTEM_SPEEX
593 # Files to be cleaned during make clean
596 CLEAN_FILES
= $(OPAL_LIB
)
599 ####################################################
601 include @PWLIBDIR@
/make
/common.mak
603 ####################################################
606 ifneq ($(OSTYPE
),Darwin
)
607 LIBNAME_MAJ
= $(OPAL_FILE
).
$(MAJOR_VERSION
)
608 LIBNAME_MIN
= $(LIBNAME_MAJ
).
$(MINOR_VERSION
)
609 ifeq ($(BUILD_TYPE
),.
)
610 LIBNAME_PAT
= $(LIBNAME_MIN
).
$(BUILD_NUMBER
)
612 LIBNAME_PAT
= $(LIBNAME_MIN
)-$(BUILD_TYPE
)$(BUILD_NUMBER
)
615 LIBNAME_MAJ
= $(subst .
$(LIB_SUFFIX
),.
$(MAJOR_VERSION
).
$(LIB_SUFFIX
),$(OPAL_FILE
))
616 LIBNAME_MIN
= $(subst .
$(LIB_SUFFIX
),.
$(MAJOR_VERSION
).
$(MINOR_VERSION
).
$(LIB_SUFFIX
),$(OPAL_FILE
))
617 ifeq ($(BUILD_TYPE
),.
)
618 LIBNAME_PAT
= $(subst .
$(LIB_SUFFIX
),.
$(MAJOR_VERSION
).
$(MINOR_VERSION
).
$(BUILD_NUMBER
).
$(LIB_SUFFIX
),$(OPAL_FILE
))
620 LIBNAME_PAT
= $(subst .
$(LIB_SUFFIX
),.
$(MAJOR_VERSION
).
$(MINOR_VERSION
)-$(BUILD_TYPE
)$(BUILD_NUMBER
).
$(LIB_SUFFIX
),$(OPAL_FILE
))
624 LIB_SONAME
= $(LIBNAME_MIN
)
626 CLEAN_FILES
+= $(LIBDIR
)/$(LIBNAME_PAT
) $(LIBDIR
)/$(OPAL_FILE
) $(LIBDIR
)/$(LIBNAME_MAJ
) $(LIBDIR
)/$(LIBNAME_MIN
)
628 ifneq ($(P_SHAREDLIB
),1)
629 STATIC_LIB_FILE
= $(LIBDIR
)/$(OPAL_FILE
)
631 STATIC_LIB_FILE
= $(LIBDIR
)/$(subst .
$(LIB_SUFFIX
),_s.
$(STATICLIBEXT
),$(OPAL_FILE
))
634 $(LIBDIR
)/$(OPAL_FILE
) : $(TARGETLIB
)
636 ifeq ($(P_SHAREDLIB
),1)
638 SYSLIBS
+= -L
$(PW_LIBDIR
) -l
$(PTLIB_BASE
)$(LIB_TYPE
)
639 ifeq ($(OSTYPE
),beos
)
640 # BeOS requires different options when building shared libraries
641 LDSOOPTS
= -nostdlib
-nostart
642 EXTLIBS
= -lstdc
++.r4
644 ifeq ($(OSTYPE
),Darwin
)
645 LDSOOPTS
= -dynamiclib
651 ENDLDLIBS
:= $(SYSLIBS
) $(ENDLDLIBS
)
653 ifeq ($(OSTYPE
),rtems
)
657 ifneq ($(OSTYPE
), QNX
)
658 ifneq (,$(findstring $(OSTYPE
),FreeBSD OpenBSDs
))
669 # Solaris loader doesn't grok -soname (sees it as -s -oname)
670 # We could use -Wl,-h,$(LIB_BASENAME).1 but then we find that the arglist
671 # to gcc is 2900+ bytes long and it will barf. I fix this by invoking ld
672 # directly and passing it the equivalent arguments...jpd@louisiana.edu
673 ifeq ($(OSTYPE
),solaris
)
674 LDSOOPTS
= -Bdynamic
-G
-h
$(LIB_SONAME
)
677 ifeq ($(OSTYPE
),mingw
)
678 LDSOOPTS
+= -Wl
,--kill-at
680 ifneq ($(OSTYPE
),Darwin
)
681 LDSOOPTS
+= -Wl
,-soname
,$(LIB_SONAME
)
687 $(LIBDIR
)/$(OPAL_FILE
): $(LIBDIR
)/$(LIBNAME_PAT
)
688 cd
$(LIBDIR
) ; rm -f
$(OPAL_FILE
) ; ln
-sf
$(LIBNAME_PAT
) $(OPAL_FILE
)
689 cd
$(LIBDIR
) ; rm -f
$(LIBNAME_MAJ
) ; ln
-sf
$(LIBNAME_PAT
) $(LIBNAME_MAJ
)
690 cd
$(LIBDIR
) ; rm -f
$(LIBNAME_MIN
) ; ln
-sf
$(LIBNAME_PAT
) $(LIBNAME_MIN
)
692 $(LIBDIR
)/$(LIBNAME_PAT
): $(STATIC_LIB_FILE
)
693 @echo EXTLIBS
= $(EXTLIBS
)
694 @echo SYSLIBS
= $(SYSLIBS
)
695 @if
[ ! -d
$(LIBDIR
) ] ; then mkdir
$(LIBDIR
) ; fi
696 $(LD
) $(LDSOOPTS
) -o
$(LIBDIR
)/$(LIBNAME_PAT
) $(LDFLAGS
) $(EXTLIBS
) $(OBJS
) $(ENDLDLIBS
)
700 $(STATIC_LIB_FILE
): $(OBJS
)
701 @if
[ ! -d
$(LIBDIR
) ] ; then mkdir
$(LIBDIR
) ; fi
702 $(ARCHIVE
) $(STATIC_LIB_FILE
) $(OBJS
)
703 ifeq ($(P_USE_RANLIB
),1)
704 $(RANLIB
) $(STATIC_LIB_FILE
)
707 ####################################################
710 $(MAKE
) NOTRACE
=1 opt
712 # Build rules for the Speex codec
714 $(OPAL_OBJDIR
)/%.o
: $(SPEEX_SRCDIR
)/%.c
715 @if
[ ! -d
$(OPAL_OBJDIR
) ] ; then mkdir
-p
$(OPAL_OBJDIR
) ; fi
716 $(CC
) $(STDCCFLAGS
) -I
$(SPEEX_INCDIR
) $(OPTCCFLAGS
) $(CFLAGS
) -c
$< -o
$@
718 $(DEPDIR
)/%.dep
: $(SPEEX_SRCDIR
)/%.c
719 @if
[ ! -d
$(DEPDIR
) ] ; then mkdir
-p
$(DEPDIR
) ; fi
720 @printf
%s
$(OPAL_OBJDIR
)/ > $@
721 $(CC
) -I
$(SPEEX_INCDIR
) $(CFLAGS
) -M
$< >> $@
723 ###############################################################################
725 $(subst tagbuild
,,$(STANDARD_TARGETS
)) ::
726 @set
-e
; $(foreach dir,$(SUBDIRS
),if
test -e
$(dir) ; then
$(MAKE
) -C
$(dir) $@
; fi
;)
729 $(STANDARD_TARGETS
) :: Makefile
731 Makefile
: Makefile.in configure
733 @echo
"*******************************************************"
734 @echo Makefile is not up to date
, is a .
/configure necessary?
735 @echo
"*******************************************************"
739 @echo
$(ASN_CXX_FILES
)
743 mkdir
-p
$(DESTDIR
)@LIBDIR@
744 ( for
dir in
$(DESTDIR
)@LIBDIR@ \
745 $(DESTDIR
)$(PREFIX
)/include/opal
/asn \
746 $(DESTDIR
)$(PREFIX
)/include/opal
/codec \
747 $(DESTDIR
)$(PREFIX
)/include/opal
/h323 \
748 $(DESTDIR
)$(PREFIX
)/include/opal
/iax2 \
749 $(DESTDIR
)$(PREFIX
)/include/opal
/lids \
750 $(DESTDIR
)$(PREFIX
)/include/opal
/opal \
751 $(DESTDIR
)$(PREFIX
)/include/opal
/rtp \
752 $(DESTDIR
)$(PREFIX
)/include/opal
/sip \
753 $(DESTDIR
)$(PREFIX
)/include/opal
/t120 \
754 $(DESTDIR
)$(PREFIX
)/include/opal
/t38 \
755 $(DESTDIR
)$(PREFIX
)/share
/opal
;\
756 do mkdir
-p
$$dir ; chmod
755 $$dir ; \
758 $(INSTALL
) -m
755 lib
/$(LIBNAME_PAT
) $(DESTDIR
)@LIBDIR@
759 ln
-snf
$(LIBNAME_PAT
) \
760 $(DESTDIR
)@LIBDIR@
/$(OPAL_FILE
).
$(MAJOR_VERSION
).
$(MINOR_VERSION
)
761 ln
-snf
$(LIBNAME_PAT
) \
762 $(DESTDIR
)@LIBDIR@
/$(OPAL_FILE
).
$(MAJOR_VERSION
)
763 ln
-snf
$(LIBNAME_PAT
) \
764 $(DESTDIR
)@LIBDIR@
/$(OPAL_FILE
)
765 ln
-snf
$(LIBNAME_PAT
) \
766 $(DESTDIR
)@LIBDIR@
/libopal.so
767 ( for fn in
include/asn
/*.h
; do \
768 $(INSTALL
) -m
644 $$fn $(DESTDIR
)$(PREFIX
)/include/opal
/asn
; \
770 ( for fn in
include/codec
/*.h
; do \
771 $(INSTALL
) -m
644 $$fn $(DESTDIR
)$(PREFIX
)/include/opal
/codec
; \
773 ( for fn in
include/h323
/*.h
; do \
774 $(INSTALL
) -m
644 $$fn $(DESTDIR
)$(PREFIX
)/include/opal
/h323
; \
776 ( for fn in
include/iax2
/*.h
; do \
777 $(INSTALL
) -m
644 $$fn $(DESTDIR
)$(PREFIX
)/include/opal
/iax2
; \
779 ( for fn in
include/lids
/*.h
; do \
780 $(INSTALL
) -m
644 $$fn $(DESTDIR
)$(PREFIX
)/include/opal
/lids
; \
782 ( for fn in
include/opal
/*.h
; do \
783 $(INSTALL
) -m
644 $$fn $(DESTDIR
)$(PREFIX
)/include/opal
/opal
; \
785 ( for fn in
include/rtp
/*.h
; do \
786 $(INSTALL
) -m
644 $$fn $(DESTDIR
)$(PREFIX
)/include/opal
/rtp
; \
788 ( for fn in
include/sip
/*.h
; do \
789 $(INSTALL
) -m
644 $$fn $(DESTDIR
)$(PREFIX
)/include/opal
/sip
; \
791 ( for fn in
include/t120
/*.h
; do \
792 $(INSTALL
) -m
644 $$fn $(DESTDIR
)$(PREFIX
)/include/opal
/t120
; \
794 ( for fn in
include/t38
/*.h
; do \
795 $(INSTALL
) -m
644 $$fn $(DESTDIR
)$(PREFIX
)/include/opal
/t38
; \
797 $(INSTALL
) -m
644 opal_inc.mak
$(DESTDIR
)$(PREFIX
)/share
/opal
798 $(MAKE
) -C plugins
install
801 rm -rf
$(DESTDIR
)$(PREFIX
)/include/opal \
802 $(DESTDIR
)$(PREFIX
)/share
/opal
803 rm -f
$(DESTDIR
)@LIBDIR@
/$(OPAL_FILE
) \
804 $(DESTDIR
)@LIBDIR@
/libopal.so \
805 $(DESTDIR
)@LIBDIR@
/$(OPAL_FILE
).
$(MAJOR_VERSION
).
$(MINOR_VERSION
) \
806 $(DESTDIR
)@LIBDIR@
/$(OPAL_FILE
).
$(MAJOR_VERSION
) \
807 $(DESTDIR
)@LIBDIR@
/$(LIBNAME_PAT
)
808 $(MAKE
) -C plugins
uninstall
816 # End of file #################################################################