Open main menu

Difference between revisions of "Compiling ScummVM/MinGW"

1,304 bytes added ,  23:33, 10 December 2020
Add instructions for building GLEW
(Add instructions for building GLEW)
Line 70: Line 70:
* [https://curl.haxx.se/ libcurl]. Optional, for cloud support.
* [https://curl.haxx.se/ libcurl]. Optional, for cloud support.
** You need the latest libcurl source code ([https://curl.haxx.se/download/curl-7.71.1.tar.xz v7.71.1] at the time of writing).
** You need the latest libcurl source code ([https://curl.haxx.se/download/curl-7.71.1.tar.xz v7.71.1] at the time of writing).
* [http://glew.sourceforge.net GLEW]. Optional, for hardware acceleration in 3D games.
** You need the latest GLEW source code ([https://sourceforge.net/projects/glew/files/glew/2.1.0/ v2.1.0] at the time of writing).


==== Precompiled libraries ====
==== Precompiled libraries ====
Line 349: Line 352:
  make
  make
  make install
  make install
=== GLEW ===
Unzip the GLEW archive in a folder, open MSYS, go to the GLEW folder and apply the following patch:
<syntaxhighlight lang="diff">
--- config/Makefile.mingw.orig  2017-07-31 12:25:39 +0100
+++ config/Makefile.mingw      2020-12-10 20:23:36 +0000
@@ -5,8 +5,7 @@
LN :=
LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32
LDFLAGS.EXTRA = -L/mingw/lib
-CFLAGS.EXTRA  += -fno-builtin -fno-stack-protector
-LDFLAGS.EXTRA += -nostdlib
+CFLAGS.EXTRA  += -fno-builtin -fno-stack-protector -Wno-cast-function-type
WARN = -Wall -W
POPT = -O2
BIN.SUFFIX = .exe
@@ -14,4 +13,4 @@
LIB.DEVLNK    = lib$(NAME).dll.a  # for mingw this is the dll import lib
LIB.SHARED    = $(NAME).dll
LIB.STATIC    = lib$(NAME).a      # the static lib will be broken
-LDFLAGS.SO    = -shared -Wl,-soname,$(LIB.SONAME) -Wl,--out-implib,lib/$(LIB.DEVLNK)
+LDFLAGS.SO    = -nostdlib -shared -Wl,-soname,$(LIB.SONAME) -Wl,--out-implib,lib/$(LIB.DEVLNK)
</syntaxhighlight>
Then issue these commands to compile and install the library:
make install.all GLEW_PREFIX=$PREFIX GLEW_DEST=$PREFIX




213

edits