Opened 15 years ago

Closed 13 years ago

Last modified 2 years ago

#7451 closed enhancement

OSX: Improve "bundle" build target

Reported by: (none) Owned by: fingolfin
Priority: normal Component: Port: Mac OS X
Keywords: Cc:


In response to "bug" number 1326281, here's a feature request.

Instead of doing (for "make bundle", Mac OS X application file):

`sdl-config --static-libs` \ /sw/lib/libmad.a \ /sw/lib/libvorbisfile.a \ /sw/lib/libvorbis.a \ /sw/lib/libogg.a \ /sw/lib/libmpeg2.a \ /sw/lib/libFLAC.a \

, the makefile should be configured to only link those libraries that actually exist (i.e. those that are found when running configure). I'm not really sure why you should want to edit this manually, when it can be done automatically.

Ticket imported from: #1327285. Ticket imported from: feature-requests/267.

Change History (5)

comment:1 by fingolfin, 15 years ago

To highlight the background of this "feature" a bit: I added the "bundle" target (and more specifically, the "scummvm-static" target). to make building a static OSX binary a bit comfortable for me. It is used to make the release binaries, and those are always to be linked against *all* libs anyway. Furthermore, the build assumes you have installed all those libs via Fink, into the default Fink install location. There is a "OSXOPT" hack variable in the Makefile to slightly improve this (I think khalek added it since he uses OpenDarwin).

As such, this Makefile rule indeed doesn't deal with libs not being installed. Nor does it deal with systems were a lib is installed with something else than Fink (e.g. manually, OpenDarwin, etc.).

Personally I didn't put any effort (and won't in the future) into improving this, since it does precisely what I need it for. Implementing it "properly" OTOH would require a lot of work, and I wouldn't gain anything by it...

That said, if anybody feels like providing a patch for this, it'd be welcome (as long as it fulfills certain minimum quality standards, of course :-). The most likely way to implement this would be to enhance the configure script to generate the "scummvm-static" rule appropriately.

comment:2 by fingolfin, 15 years ago

Summary: Only existing libraries should be linked when compilingOSX: Improve "bundle" build target

comment:3 by fingolfin, 13 years ago

I changed our build system some time ago such that the "bundle" target will indeed only link in those lib*.a files for which support was detected&enabled by configure. You will still have to edit the OSXOPT var if you don't use FInk to install these things, though, and that won't change anytime soon, if ever. Essentially, finding the "correct" .a files matching the headers the compiler sees is a non-trivial task and would complicate our configure script a lot; comparing this to the net benefit (avoiding to edit a single line, once, in a Makefile), it just doesn't seem worth the hassle.

comment:4 by fingolfin, 13 years ago

Owner: set to fingolfin
Status: newclosed

comment:5 by digitall, 2 years ago

Component: Port: Mac OS X
Note: See TracTickets for help on using tickets.