Skip to content

Commit c8e3551

Browse files
committed
sdl2-std, sdl2-std32: complete link flags
The previous LDFLAGS only provided -lSDL2 -lSDL2main which forced consumers to chase the missing transitive deps (X11, pthread, dl, rt, m) in their own Makefiles. Add the full set that sdl2-config --libs returns so a single include of sdl2-std.mk or sdl2-std32.mk is enough to link a SDL2 host (32 or 64 bit) program on this target. Also mark libdreamroq as DONE in FUTURE_IDEAS.md: it is now shipped inside the sh4zam package and no longer needs a separate clone.
1 parent 7638285 commit c8e3551

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

docs/FUTURE_IDEAS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This document contains a list of tools and libraries that were previously in the
88
* ~~Description: A small library for the Dreamcast AICA sound subsystem.~~
99
* ~~URL: [https://github.com/pcercuei/AICAOS.git](https://github.com/pcercuei/AICAOS.git)~~
1010

11-
- **libdreamroq**
11+
- **libdreamroq** (DONE)
1212
* Description: Library for playing RoQ videos.
1313
* URL: [https://github.com/dreamcastdevs/libdreamroq.git](https://github.com/dreamcastdevs/libdreamroq.git)
1414

scripts/registry/mk/sdl2-std.mk

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# sdl2-std.mk - SDL2 apt (host-64)
22
# Source: apt libsdl2-dev:amd64 (multi-arch /usr/lib/x86_64-linux-gnu)
3+
# Provides the full link set returned by sdl2-config on this target.
34

45
SDL2_STD_CFLAGS := -I/usr/include/SDL2 -D_REENTRANT
5-
SDL2_STD_LDFLAGS := -L/usr/lib/x86_64-linux-gnu -lSDL2 -lSDL2main
6+
SDL2_STD_LDFLAGS := -L/usr/lib/x86_64-linux-gnu \
7+
-lSDL2 -lSDL2main \
8+
-lX11 -lpthread -ldl -lrt -lm

scripts/registry/mk/sdl2-std32.mk

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# sdl2-std32.mk - SDL2 apt (host-32)
22
# Source: apt libsdl2-dev:i386 (multi-arch /usr/lib/i386-linux-gnu)
3+
# Provides the full link set returned by sdl2-config on this target.
34

45
SDL2_STD32_CFLAGS := -I/usr/include/SDL2 -D_REENTRANT
5-
SDL2_STD32_LDFLAGS := -L/usr/lib/i386-linux-gnu -lSDL2 -lSDL2main
6+
SDL2_STD32_LDFLAGS := -L/usr/lib/i386-linux-gnu \
7+
-lSDL2 -lSDL2main \
8+
-lX11 -lpthread -ldl -lrt -lm

0 commit comments

Comments
 (0)