pgroce / squeezelite

Export of code.google.com/p/squeezelite
Other
0 stars 0 forks source link

no parameters to compile staticly #50

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Would like to compile squeezelite (Ubuntu) statically so that  libMad0, etc 
libraries are included in the executable.  Is this possible?

Original issue reported on code.google.com by dan.h...@clarecontrols.com on 15 Nov 2013 at 5:06

GoogleCodeExporter commented 8 years ago
Afraid you would need to edit the code for this as it is designed to 
dynamically load the codec modules it finds, but because of this won't build as 
a single static binary without changes.  The original reason for this was to 
avoid concerns over which codecs are included or not and their licensing - it 
will just use those present on the target machine.

Original comment by trio...@btinternet.com on 16 Nov 2013 at 11:28

GoogleCodeExporter commented 8 years ago
Version 1.3.1 now allows linking at compile time.  If you change the makefile 
then you should be able to use this to link codecs statically.  Set 
OPTS=-DLINKALL to use this feature:

OPTS=-DLINKALL make

Original comment by trio...@btinternet.com on 25 Nov 2013 at 10:07

GoogleCodeExporter commented 8 years ago

Original comment by trio...@btinternet.com on 4 Dec 2013 at 8:52

GoogleCodeExporter commented 8 years ago
One additional question.  In your #2 update you mention "If you change the 
makefile then.....".

What changes are required in the makefile so that the OPTS=DLINKALL parameter 
is used?

Original comment by dan.h...@clarecontrols.com on 4 Dec 2013 at 8:54

GoogleCodeExporter commented 8 years ago
It will currently build with dynamic linking at compile time with:

OPTS=-DLINKALL make

If then edit the makefile to change -lmad to the location of libmad.a then it 
should build this statically.  You could add -static to the makefile, but I 
don't believe libsound is normally linked statically.  Depends on what you are 
trying to do?

Original comment by trio...@btinternet.com on 4 Dec 2013 at 8:59