Previous Thread
Next Thread
Print Thread
Joined: Mar 2004
Posts: 672
Likes: 1
Senior Member
OP Offline
Senior Member
Joined: Mar 2004
Posts: 672
Likes: 1
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,930
Likes: 24
Q
Very Senior Member
Offline
Very Senior Member
Q
Joined: May 2008
Posts: 4,930
Likes: 24
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]
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,930
Likes: 24
Q
Very Senior Member
Offline
Very Senior Member
Q
Joined: May 2008
Posts: 4,930
Likes: 24
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]
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,930
Likes: 24
Q
Very Senior Member
Offline
Very Senior Member
Q
Joined: May 2008
Posts: 4,930
Likes: 24
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]
Joined: Mar 2004
Posts: 672
Likes: 1
Senior Member
OP Offline
Senior Member
Joined: Mar 2004
Posts: 672
Likes: 1
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,930
Likes: 24
Q
Very Senior Member
Offline
Very Senior Member
Q
Joined: May 2008
Posts: 4,930
Likes: 24
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]

Moderated by  R. Belmont 

Link Copied to Clipboard
Who's Online Now
2 members (R. Belmont, 1 invisible), 22 guests, and 4 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,170
Posts120,090
Members5,039
Most Online1,283
Dec 21st, 2022
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Forum hosted by www.retrogamesformac.com