commit 4b82abb13c11e12f1b76a38aca5f899692b89d7d
parent b2d4e9715849cd4b8bfe58bac3530108aaa55559
Author: Brian Swetland <swetland@frotz.net>
Date: Sun, 1 Sep 2013 01:12:45 -0700
build: staticly link libSDL2, work around weird link problem on ubuntu 12.04.3
- sdl2-config --static-libs doesn't actually get me linked against static libs
- just hardcode the real static path for now
- for some reason even though I have NVIDIA GL installed/selected, this box
keeps trying to link against mesa GL which lacks newer APIs. a -L/usr/lib before
-lGL "fixes" it for now.
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
@@ -19,7 +19,8 @@ what_to_build:: all
SDLCFG := /work/sdl2/bin/sdl2-config
SDLFLAGS := $(shell $(SDLCFG) --cflags)
-SDLLIBS := $(shell $(SDLCFG) --static-libs)
+#SDLLIBS := $(shell $(SDLCFG) --static-libs)
+SDLLIBS := /work/sdl2/lib/libSDL2.a -lpthread -lrt
HOST_CFLAGS := $(SDLFLAGS) -Wall -g -O2
HOST_CFLAGS += -std=c++0x
@@ -28,10 +29,11 @@ HOST_CFLAGS += -Ifreetype-2.5.0.1/include
#HOST_CFLAGS += -ffunction-sections -fdata-sections
HOST_LFLAGS := -static-libstdc++
+#HOST_LFLAGS += -Wl,--verbose
#HOST_LFLAGS += -Wl,-gc-sections
#GLLIB := /usr/lib/nvidia-experimental-310/libGL.so.310.14
-GLLIB := -lGL
+GLLIB := -L/usr/lib -lGL
HOST_LIBS := $(SDLLIBS) $(GLLIB) -lm -lpng
include $(wildcard arch/*/config.mk)