premake/README-linux.txt
changeset 7925 f090a47eb7f7
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/premake/README-linux.txt	Sun Nov 10 00:38:37 2013 -0500
     1.3 @@ -0,0 +1,46 @@
     1.4 +You may generate GNU makefiles for building SDL2 and its related test suite by
     1.5 +using the gmake shell script in the Linux/build-scripts folder.
     1.6 +
     1.7 +Linux support is currently experimental for the meta-build system. Most of the
     1.8 +progress made on this support happened toward the end of the meta-build system
     1.9 +project, so there is a lot currently missing that could be added in the future.
    1.10 +For the most part, the Linux support works well, but there is a significant
    1.11 +amount of testing needed to verify it can be built in many different
    1.12 +environments.
    1.13 +
    1.14 +The Linux project does not target every dependency it should (as seen in the
    1.15 +autotools configure script or in the CMake script), but it does target the
    1.16 +following dependencies:
    1.17 +
    1.18 +  -D-Bus (required to build Linux at all)
    1.19 +  -DLOpen (most of the other dependencies are dependent on this)
    1.20 +  -ALSA
    1.21 +  -PulseAudio
    1.22 +  -ESD
    1.23 +  -NAS
    1.24 +  -OSS
    1.25 +  -X11
    1.26 +  -OpenGL
    1.27 +
    1.28 +Also, the Linux system should be building the SDL2 library as a shared library,
    1.29 +but it builds it as a static library because of a few premake-related issues.
    1.30 +This is because when the makefile generated by premake tells the linker where to
    1.31 +find the definitions library (libSDL2.o), it also gives a hint to the loader to
    1.32 +find libSDL2.so in the same place, with a relative path. This means in order to
    1.33 +execute the program dynamically linked to SDL2, it's looking in some path like:
    1.34 +
    1.35 +  "../../SDL2/Build/Debug"
    1.36 +
    1.37 +Now, while this path works at the location of the makefile (such as
    1.38 +./tests/testsprite), it does not make sense from the actual location of the
    1.39 +executable (./tests/testsprite/Build/Debug). Furthermore, it's just massively
    1.40 +inconvenient to have a relative path to look for the shared object. Moving
    1.41 +libSDL2.so into the same directory as the executable does not solve this issue.
    1.42 +Unfortunately, premake also does not allow an install target to be created for
    1.43 +the makefiles, which is another one of the major issues related to building SDL2
    1.44 +as a shared library on Linux. Once these problems are solved, this support
    1.45 +should be very straightforward to add to this system in the future.
    1.46 +
    1.47 +The Linux system does have both an automated test and cleaning shell files for
    1.48 +running through the entire supported test suite and cleaning up the generated
    1.49 +and built files, respectively.
    1.50 \ No newline at end of file