Enable shared build for sdl2_mixer.

Added a fix for library order when linking.
This commit is contained in:
Tobias Gruetzmacher 2014-10-09 21:15:06 +02:00
parent 10d10facd7
commit 3a73727b76
2 changed files with 27 additions and 9 deletions

View File

@ -0,0 +1,21 @@
This file is part of MXE.
See index.html for further information.
Fix link order for the 2 test programs.
diff -Naur SDL2_mixer-2.0.0/Makefile.in SDL2_mixer-2.0.0.fixed/Makefile.in
--- SDL2_mixer-2.0.0/Makefile.in 2013-08-10 19:39:54.000000000 +0200
+++ SDL2_mixer-2.0.0.fixed/Makefile.in 2014-10-09 13:27:51.275921178 +0200
@@ -66,10 +66,10 @@
$(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) $(LDFLAGS) $(objects)/$(TARGET)
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playwave.lo $(objects)/$(TARGET) $(SDL_LIBS) $(LDFLAGS)
$(objects)/playmus$(EXE): $(objects)/playmus.lo $(objects)/$(TARGET)
- $(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playmus.lo $(SDL_CFLAGS) $(SDL_LIBS) $(LDFLAGS) $(objects)/$(TARGET)
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playmus.lo $(objects)/$(TARGET) $(SDL_LIBS) $(LDFLAGS)
install: all install-hdrs install-lib #install-bin
install-hdrs:

View File

@ -25,9 +25,7 @@ define $(PKG)_BUILD
>> '$(1)/SDL2_mixer.pc.in'
$(SED) -i 's,for path in /usr/local; do,for path in; do,' '$(1)/configure'
cd '$(1)' && ./configure \
--host='$(TARGET)' \
--disable-shared \
--prefix='$(PREFIX)/$(TARGET)' \
$(MXE_CONFIGURE_OPTS) \
--with-sdl-prefix='$(PREFIX)/$(TARGET)' \
--disable-sdltest \
--disable-music-mod \
@ -41,14 +39,13 @@ define $(PKG)_BUILD
SMPEG_CONFIG='$(PREFIX)/$(TARGET)/bin/smpeg2-config' \
WINDRES='$(TARGET)-windres' \
LIBS='-lvorbis -logg'
$(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
$(MAKE) -C '$(1)' -j '$(JOBS)' install $(MXE_DISABLE_CRUFT)
# '$(TARGET)-gcc' \
# -W -Wall -Werror -ansi -pedantic \
# '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-sdl2_mixer.exe' \
# `'$(TARGET)-pkg-config' SDL2_mixer --cflags --libs`
'$(TARGET)-gcc' \
-W -Wall -Werror -ansi -pedantic \
'$(TOP_DIR)/src/sdl_mixer-test.c' -o '$(PREFIX)/$(TARGET)/bin/test-sdl2_mixer.exe' \
`'$(TARGET)-pkg-config' SDL2_mixer --cflags --libs`
endef
$(PKG)_BUILD_i686-pc-mingw32 =
$(PKG)_BUILD_SHARED =