Previous Thread
Next Thread
Print Thread
Joined: Mar 2004
Posts: 665
Senior Member
OP Offline
Senior Member
Joined: Mar 2004
Posts: 665
Hello,

how do I build mame using system libs (expat, zlib, etc.) after the buildsystem overhaul? Is it supported?

Joined: Mar 2008
Posts: 154
Senior Member
Offline
Senior Member
Joined: Mar 2008
Posts: 154
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



Master of Sarcastic Wit
Linux User #182984
Joined: May 2008
Posts: 4,899
Q
Very Senior Member
Offline
Very Senior Member
Q
Joined: May 2008
Posts: 4,899
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.?


A mind is like a parachute. It doesn't work unless it's open. [Frank Zappa]

We're searching for QMC2 translators and support for existing translations. Interested? See here!
Joined: Mar 2008
Posts: 154
Senior Member
Offline
Senior Member
Joined: Mar 2008
Posts: 154
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



Master of Sarcastic Wit
Linux User #182984
Joined: May 2008
Posts: 4,899
Q
Very Senior Member
Offline
Very Senior Member
Q
Joined: May 2008
Posts: 4,899
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).


A mind is like a parachute. It doesn't work unless it's open. [Frank Zappa]

We're searching for QMC2 translators and support for existing translations. Interested? See here!
Joined: Mar 2008
Posts: 154
Senior Member
Offline
Senior Member
Joined: Mar 2008
Posts: 154
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




Master of Sarcastic Wit
Linux User #182984
Joined: May 2008
Posts: 4,899
Q
Very Senior Member
Offline
Very Senior Member
Q
Joined: May 2008
Posts: 4,899
I'd say that's probably better, but I'm not a MAME-dev smile.


A mind is like a parachute. It doesn't work unless it's open. [Frank Zappa]

We're searching for QMC2 translators and support for existing translations. Interested? See here!
Joined: Mar 2004
Posts: 665
Senior Member
OP Offline
Senior Member
Joined: Mar 2004
Posts: 665
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?

Joined: May 2008
Posts: 4,899
Q
Very Senior Member
Offline
Very Senior Member
Q
Joined: May 2008
Posts: 4,899
Originally Posted By Belegdol
Also, how would I go about submitting this?

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


A mind is like a parachute. It doesn't work unless it's open. [Frank Zappa]

We're searching for QMC2 translators and support for existing translations. Interested? See here!

Moderated by  R. Belmont 

Link Copied to Clipboard
Who's Online Now
5 members (R. Belmont, Xolod, JonasP, MAMEBase, Olivier Galibert), 23 guests, and 3 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,913
Posts117,078
Members4,989
Most Online890
Jan 17th, 2020
Forum Host
These forums are hosted by www.retrogamesformac.com
Forum hosted by www.retrogamesformac.com