premake/README-linux.txt
author Sam Lantinga
Thu, 01 Sep 2016 01:26:56 -0700
changeset 10304 ee83e0b4a36f
parent 7925 f090a47eb7f7
permissions -rwxr-xr-x
wayland: Add support for relative mouse mode, by Jonas Ådahl <jadahl@gmail.com>

Generate the C protocol files from the protocol XML files installed by
wayland-protocols, and use them to implement support for relative pointer
motions and pointer locking.

Note that at the time, the protocol is unstable and may change in the future.
Any future breaking changes will, however, fail gracefully and result in no
regressions compared to before this patch.
icculus@7925
     1
You may generate GNU makefiles for building SDL2 and its related test suite by
icculus@7925
     2
using the gmake shell script in the Linux/build-scripts folder.
icculus@7925
     3
icculus@7925
     4
Linux support is currently experimental for the meta-build system. Most of the
icculus@7925
     5
progress made on this support happened toward the end of the meta-build system
icculus@7925
     6
project, so there is a lot currently missing that could be added in the future.
icculus@7925
     7
For the most part, the Linux support works well, but there is a significant
icculus@7925
     8
amount of testing needed to verify it can be built in many different
icculus@7925
     9
environments.
icculus@7925
    10
icculus@7925
    11
The Linux project does not target every dependency it should (as seen in the
icculus@7925
    12
autotools configure script or in the CMake script), but it does target the
icculus@7925
    13
following dependencies:
icculus@7925
    14
icculus@7925
    15
  -D-Bus (required to build Linux at all)
icculus@7925
    16
  -DLOpen (most of the other dependencies are dependent on this)
icculus@7925
    17
  -ALSA
icculus@7925
    18
  -PulseAudio
icculus@7925
    19
  -ESD
icculus@7925
    20
  -NAS
icculus@7925
    21
  -OSS
icculus@7925
    22
  -X11
icculus@7925
    23
  -OpenGL
icculus@7925
    24
icculus@7925
    25
Also, the Linux system should be building the SDL2 library as a shared library,
icculus@7925
    26
but it builds it as a static library because of a few premake-related issues.
icculus@7925
    27
This is because when the makefile generated by premake tells the linker where to
icculus@7925
    28
find the definitions library (libSDL2.o), it also gives a hint to the loader to
icculus@7925
    29
find libSDL2.so in the same place, with a relative path. This means in order to
icculus@7925
    30
execute the program dynamically linked to SDL2, it's looking in some path like:
icculus@7925
    31
icculus@7925
    32
  "../../SDL2/Build/Debug"
icculus@7925
    33
icculus@7925
    34
Now, while this path works at the location of the makefile (such as
icculus@7925
    35
./tests/testsprite), it does not make sense from the actual location of the
icculus@7925
    36
executable (./tests/testsprite/Build/Debug). Furthermore, it's just massively
icculus@7925
    37
inconvenient to have a relative path to look for the shared object. Moving
icculus@7925
    38
libSDL2.so into the same directory as the executable does not solve this issue.
icculus@7925
    39
Unfortunately, premake also does not allow an install target to be created for
icculus@7925
    40
the makefiles, which is another one of the major issues related to building SDL2
icculus@7925
    41
as a shared library on Linux. Once these problems are solved, this support
icculus@7925
    42
should be very straightforward to add to this system in the future.
icculus@7925
    43
icculus@7925
    44
The Linux system does have both an automated test and cleaning shell files for
icculus@7925
    45
running through the entire supported test suite and cleaning up the generated
icculus@7925
    46
and built files, respectively.