[asterisk-dev] [asterisk-commits] file: trunk r95648 - /trunk/codecs/Makefile

Luigi Rizzo rizzo at icir.org
Tue Jan 1 17:20:51 CST 2008


On Tue, Jan 01, 2008 at 11:09:32PM -0000, SVN commits to the Asterisk project wrote:
> Author: file
> Date: Tue Jan  1 17:09:32 2008
> New Revision: 95648
> 
> URL: http://svn.digium.com/view/asterisk?view=rev&rev=95648
> Log:
> Fix building of codec_resample on platforms other then Cygwin. On everything else it actually gets built after codec_resample, so you can't exactly link it in since it doesn't exist.

I just noticed the bug, but I think the proper workaround is at the
end of this email (i need to add more comments though).

The original code (and your patch) are able to build
codec_resample.so even without the (static) library, because
the dynamic linker does not care about all symbols being resolved.
However you won't be able to load it because symbols from libresample.a
will not be resolved at load time.

I am not sure how Russell managed to test it but perhaps it was
available elsewhere e.g. in chan_console ?

Note, mine is just a workaround - because 'main/' is a special
directory in terms of build order, i think the various static
libraries that we build with asterisk should be located in some
directory other than main/ so we make sure they are built first.

	cheers
	luigi


Index: Makefile
===================================================================
--- Makefile    (revision 95623)
+++ Makefile    (working copy)
@@ -380,6 +380,9 @@
     # directories containing them must be completed before the main Asterisk
     # binary can be built
 main: $(filter-out main,$(MOD_SUBDIRS))
+codecs: libresample
+libresample:
+       @$(MAKE) $(PRINT_DIR) -C main libresample/libresample.a
 else
     # Windows: we need to build main (i.e. the asterisk dll) first,
     # followed by res, followed by the other directories, because





More information about the asterisk-dev mailing list