Home Page
Posted By: belegdol building 0.161 using system libs - 04/30/15 08:39 PM
Hello,

how do I build mame using system libs (expat, zlib, etc.) after the buildsystem overhaul? Is it supported?
Posted By: wallyweek Re: building 0.161 using system libs - 05/05/15 07:45 AM
I see the makefile switches are gone so I assume the answer to Belegdol's question is no. wink

Let's make a step further: I'm going to write some patches for Ubuntu, as using bundled libraries in official packages is deprecated whenever possible (and other distros have similar recommendations).

I'd like to make things the right way and have them merged upstream, so I'm asking for blessing in
  • splitting scripts/src/3rdparty.lua into several lua scripts, one for each library
  • adding a switch in the makefile for each library and have it include the lua script OR set LDFLAGS as appropriate, i.e.
    Code:
    ifndef USE_COMMONLIB_EXPAT
    SCRIPTS += scripts/src/3rdparty/expat.lua
    else
    LDFLAGS += -lexpat
    endif
    

Any further suggestion is welcome, thanks. smile

Posted By: qmc2 Re: building 0.161 using system libs - 05/05/15 01:21 PM
Although I don't think the recommendation is always good, I agree that it should be user-selectable... but wouldn't it be better to call it USE_SYSTEM_EXPAT etc.?
Posted By: wallyweek Re: building 0.161 using system libs - 05/05/15 01:30 PM
Originally Posted By qmc2
wouldn't it be better to call it USE_SYSTEM_EXPAT etc.?

yes

also, the variable name is actually LDOPTS (not LDFLAGS) smile

Posted By: qmc2 Re: building 0.161 using system libs - 05/05/15 01:47 PM
Yeah. It's probably still better to do the necessary changes in the respective LUA scripts rather than in makefile, mainly because makefile is just "the vehicle to drive GENie" which will then take care of the generation of system-dependent make rules or project files (and portability between toolchains / OSs).
Posted By: wallyweek Re: building 0.161 using system libs - 05/07/15 08:10 AM
Originally Posted By qmc2
Yeah. It's probably still better to do the necessary changes in the respective LUA scripts rather than in makefile


I see.

What about something like this? Still needs some testing, though. smile

http://pastebin.com/K8sFLy2c


Posted By: qmc2 Re: building 0.161 using system libs - 05/07/15 04:36 PM
I'd say that's probably better, but I'm not a MAME-dev smile.
Posted By: belegdol Re: building 0.161 using system libs - 06/01/15 09:18 PM
Basing on wallyweek's work I have put together the code to build almost everything as system lib:
http://lesloueizeh.com/belegdol/mame-systemlibs.patch
Feedback is welcome. Also, how would I go about submitting this?
Posted By: qmc2 Re: building 0.161 using system libs - 06/02/15 06:39 AM
Originally Posted By Belegdol
Also, how would I go about submitting this?

http://wiki.mamedev.org/index.php?title=Submitting_Source_Code smile
© Forums