Github provides a Travis CI integration which makes it easy to have a quick
check of a patch before a pull request is accepted. It is not enough to prove
the correctness of a contribution but at least helps to avoid some of the worst
build problems.
This feature *must* be enabled by the mupen64plus administrator *before this
commit is merged*:
- https://travis-ci.org/profile/mupen64plus
- Login via your Github account
- Make sure you are on "https://travis-ci.org/profile/mupen64plus"
- Switch repository to "On"
The current version of SDL is 2.0.3. All new releases of distributions contain
this library already. Current Linux distributions and OpenBSD even backporting
patches from Mupen64Plus 2.1 repo to use SDL 2. Android and other mobile
platform don't have support for legacy SDL 1.2.
People like Anthony J. Bentley and Riley Labrecque already requested
a new release of Mupen64Plus 2.1 with SDL2
Different operation systems (Unix vs. Windows) use different line ending types.
It can easily happen that users from different systems edit files and replace
all line endings of a file with the system specific version. This screws up
diffs and makes merges harder.
Git can normalize line endings for specific files and avoid this problem.
Binary files should be marked to avoid accidentally normalization.
The *.d depends files for make just list the files used when building an
object file. Removing a file listed in such a dependency file causes make to
search for a way to recreate it. This usually cannot work because these files
aren't autogenerated.
The gcc option -MP can be used to generate empty rule for these files. Removing
a file in a dependency list will then execute this empty rule and continue with
the execution of the creation of the object file. This compilation process will
then automatically correct the dependency file.
SDL needs to overwrite the main function to initialize the inner state on some
operating systems. Not doing it this way will cause random crashes and
undefined behaviour.
Systems which need a special main function are for example Apple MacOS,
Android, iPhone or Win32. SDL will handle it automatically and keep systems
without such requirement with an untouched main function.
n.pepinpe requested in #540 to allow overwriting the automatically searched
CFLAGS and LIBS for used libraries. This should allow distributors to set the
build configuration without patching the makefile. This is important for
systems were pkg-config or sdl-config aren't normally used.
The GCC introduced Link-time optimization in GCC 4.5 (2010-04-14). This should
be long enough available that interested users have upgraded to a compiler
supporting it.
The MSVC project already enabled WholeProgramOptimization since a long time.
Enabling it by default in GCC seems to be equally valid.
The GCC manual states for different parameters that the options for compilation
must also be used when linking. The options for compilation are stored in
CFLAGS and added to LINK.o to fix the behavior.
Option which need this are for example -fPIC/-fPIE or -flto.
The POSTFIX make option is useful for distributions to compile different
versions of the plugin in parallel. The object files will be stored in a
directory with the postfix appended and the linker result will also have this
postfix appended.
The CROSS_COMPILE make option can be used to automatically prepend the prefix
to all build relevant tools to seamlessly allow cross compilation without
setting each tool name separately.
Cross compiling for MinGW32 would can be done using
$ make -C projects/unix/ CROSS_COMPILE=i686-pc-mingw32- HOST_CPU=i686 UNAME=MINGW