Open
Conversation
The Makefile already calls gcc to link together mame, so use $(CC) instead of $(LD) for the final link step.
Within the Makefile, mame is first linked together and then stripped. If the strip step fails, the end result is an unstripped mame binary. Running 'make' again will not try to re-strip it because a file named 'mame' now exists. Modify the final steps of the build process. Place the unstripped binary into $(OBJ), and the stripped binary into $(PWD) as before.
So as to allow mame4all-pi to be built via cross-compilation, honor the environment variable CROSS_COMPILE as a prefix to build tools. Then to match autotools standards, rename the variable "CPP" to "CXX". All build tools' names can now be overridden by the calling environment.
Attempt to detect if pkg-config is installed. If so, then use SDL's pc file for its CFLAGS and LIBS. Otherwise, default back to the hard-coded values that were previously within the Makefile.
If pkg-config is installed, use VideoCore Shared Memory (VCSM)'s pc file for its CFLAGS and LIBS. Otherwise, default back to the hard-coded values that were previously within the Makefile.
If pkg-config is installed, use EGL's pc file for its CFLAGS and LIBS. Otherwise, default back to the hard-coded values that were previously within the Makefile.
If pkg-config is installed, use glib-2.0's pc file for its CFLAGS and LIBS. Otherwise, default back to the hard-coded values that were previously within the Makefile.
If pkg-config is installed, use alsa's pc file for its CFLAGS and LIBS. Otherwise, default back to the hard-coded values that were previously within the Makefile.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I modified the mame4all-pi build scripts to allow for cross-compilation. This was needed in my case, as that I used Buildroot to construct a custom MAME system.
Caution: I have not tried these changes on Raspbian. For someone using Raspbian, please check if my changes results in a still working mame binary, prior to accepting my pull request.