Introduction to sdl12-compat
The Simple DirectMedia Layer (SDL for short) is a cross-platform library designed to make it easy to write multimedia software, such as games and emulators. This code is a compatibility layer; it provides a binary and source compatible API for programs written against SDL 1.2, but it uses SDL 2.0 behind the scenes.
Note
Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.
Package Information
SDL Dependencies
Required
CMake-3.28.1, GLU-9.0.3, and SDL2-2.28.5
Installation of sdl12-compat
Install sdl12-compat by running the following commands:
mkdir build &&
cd build &&
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=RELEASE \
.. &&
make
Now, as the root
user:
make install &&
rm -vf /usr/lib/libSDLmain.a
Testing SDL
If you wish, test the sdlcompat package using the included test programs. It is not required to install any of the resulting binaries to validate the installation.
You'll need to manually run all the test programs (they are listed in the README
file in this directory). Many of them will need to be manually killed, and you'll need to turn your speakers on with the volume at a suitable level.
Contents
Installed Program: sdl-config
Installed Libraries: libSDL.so
Installed Directories: /usr/include/SDL
Short Descriptions
sdl-config
|
determines the compile and linker flags that should be used to compile and link programs that use libSDL
|
libSDL.so
|
contains functions that provide compatibility links to SDL2 low level functions for audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D frame buffer across multiple platforms
|