Jump to content

Compiling Xmame - which CFlags in makefile?


Recommended Posts

Hi people.

 

Up until now I have been using the xmame packages from the PLF.

 

But I want the latest version now (0.92) instead of the one in the PLF (0.90).

 

Also I wanted to learn a bit more regarding compiling in general.

 

I have an athlon-XP 3000 and want to compile a version optimised for my CPU

 

I looked through the makefile and noticed there is a commented line which refers to athlon-xp.

 

Can anyone give me any ideas where to edit the CFlags options and what I should put (an examples would be helpful

 

Or is it a good idea to just use the makefile as it is (i.e does it somehow auto optimise for an Athlon-XP)?

 

Any advice will be greatful.

 

Cheers

 

[moved from Software by spinynorman]

Link to comment
Share on other sites

I compile the windows version under MinGW, and I assume that XMame is based on the same source. In the windows version makefile there is a section with a series of if-then statements for different architectures.

 

I usually add the following to the makefile

...

ifdef ATHLON-XP

NAME = $(PREFIX)$(TARGET)$(SUFFIX)atxp

ARCH = -march=athlon-xp

else

...

 

 

then I build "make ATHLON-XP=1"

 

 

I don't know if the mamefile is similar for XMame but basically you should be able to use the -march=athlon-xp and gcc will automagically select the proper CFlags.

Link to comment
Share on other sites

You need to edit the makefile.unix file. Just follow the defaults and read the explenations. I never bother installing xmame (I just run it from the build directory) so I skip all that in the makefile. And I use arts_smotek because it sounds better. If you're done editing type make -f makefile.unix and watch it being build.

Link to comment
Share on other sites

Thanks for the responses,

 

I notice in the makefile.unix there are lines that have

 

CFLAGS =

 

Do i put all the optimisations in one line? , ie:-

 

CFLAGS = -pipe -march=athlon-xp -msse (..etc)

 

or can i put them on seperate lines, ie :-

 

CFLAGS += -msse

CFLAGS += -pipe

CFLAGS += (.....etc)

 

or does it not matter?

 

Cheers for any advice.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...