Fix linking of libsdl_{mixer,sound}
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 17 Mar 2010 23:43:04 +0000 (23:43 +0000)
committerLars-Peter Clausen <lars@metafoo.de>
Wed, 17 Mar 2010 23:43:04 +0000 (23:43 +0000)
SVN-Revision: 20257

libs/libsdl_mixer/Makefile
libs/libsdl_mixer/patches/001-fix-linking.patch [new file with mode: 0644]
libs/libsdl_sound/Makefile

index 25e13e068943253cf778eb537a8a82bffd5194bd..0b6bcd9f9bab810b6243eed96878463e26641181 100644 (file)
@@ -20,6 +20,8 @@ PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
+TARGET_LDFLAGS += -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
+
 define Package/libsdl-mixer
   SECTION:=libs
   CATEGORY:=Libraries
diff --git a/libs/libsdl_mixer/patches/001-fix-linking.patch b/libs/libsdl_mixer/patches/001-fix-linking.patch
new file mode 100644 (file)
index 0000000..a7b1fb1
--- /dev/null
@@ -0,0 +1,17 @@
+diff --git a/Makefile.in b/Makefile.in
+index 76fdd3c..3ab4939 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -75,10 +75,10 @@ $(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS)
+       $(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
+ $(objects)/playwave$(EXE): $(objects)/playwave.lo $(objects)/$(TARGET)
+-      $(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playwave.lo $(SDL_CFLAGS) $(SDL_LIBS) $(objects)/$(TARGET)
++      $(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playwave.lo $(SDL_CFLAGS) $(SDL_LIBS) $(objects)/$(TARGET) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
+ $(objects)/playmus$(EXE): $(objects)/playmus.lo $(objects)/$(TARGET)
+-      $(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playmus.lo $(SDL_CFLAGS) $(SDL_LIBS) $(objects)/$(TARGET)
++      $(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playmus.lo $(SDL_CFLAGS) $(SDL_LIBS) $(objects)/$(TARGET) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
+ install: all install-hdrs install-lib #install-bin
+ install-hdrs:
index 52587ae29e81d9b2b0e3779904d40c3a39674363..836b4fce05bf08e2cff667f186ce763543048270 100644 (file)
@@ -20,6 +20,8 @@ PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
+TARGET_LDFLAGS += -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
+
 define Package/libsdl-sound
   SECTION:=libs
   CATEGORY:=Libraries