Switch to a new, MSYS2 based build environment for Windows.

Highlights are:
- Since MSYS2 is much more unixlike than our old build environment we
  can remove most Windows specific hacks from the Makefile.
- MSYS2 has an package manager, the build environment can be updated
  by "pacman -Syu" just like an ordenary Arch Linux installation.
- Parallel builds are now working.
- git is integrated into the build envirment.
- zlib is now linked as a dynamic lib.

After this commit the old bild environment will no longer work! The
latest version must be downloaded and extracted to C:\MSYS2. Get it
here: https://deponie.yamagi.org/quake2/windows/build/
This commit is contained in:
Yamagi Burmeister 2017-05-25 11:18:19 +02:00
parent 346b841e72
commit c5f10dd879
2 changed files with 10 additions and 25 deletions

View file

@ -198,17 +198,9 @@ endif
# Extra CFLAGS for SDL # Extra CFLAGS for SDL
ifeq ($(WITH_SDL2),yes) ifeq ($(WITH_SDL2),yes)
ifeq ($(YQ2_OSTYPE),Windows)
SDLCFLAGS := $(shell /custom/bin/sdl2-config --cflags)
else
SDLCFLAGS := $(shell sdl2-config --cflags) SDLCFLAGS := $(shell sdl2-config --cflags)
endif
else # not SDL2 else # not SDL2
ifeq ($(YQ2_OSTYPE),Windows)
SDLCFLAGS :=
else
SDLCFLAGS := $(shell sdl-config --cflags) SDLCFLAGS := $(shell sdl-config --cflags)
endif
endif # SDL2 endif # SDL2
# ---------- # ----------
@ -233,7 +225,7 @@ INCLUDE := -I/usr/local/include
else ifeq ($(YQ2_OSTYPE),OpenBSD) else ifeq ($(YQ2_OSTYPE),OpenBSD)
INCLUDE := -I/usr/local/include INCLUDE := -I/usr/local/include
else ifeq ($(YQ2_OSTYPE),Windows) else ifeq ($(YQ2_OSTYPE),Windows)
INCLUDE := -I/custom/include INCLUDE := -I/usr/include
endif endif
# ---------- # ----------
@ -251,7 +243,7 @@ LDFLAGS := -L/usr/local/lib -lm
else ifeq ($(YQ2_OSTYPE),OpenBSD) else ifeq ($(YQ2_OSTYPE),OpenBSD)
LDFLAGS := -L/usr/local/lib -lm LDFLAGS := -L/usr/local/lib -lm
else ifeq ($(YQ2_OSTYPE),Windows) else ifeq ($(YQ2_OSTYPE),Windows)
LDFLAGS := -L/custom/lib -lws2_32 -lwinmm LDFLAGS := -L/usr/lib -lws2_32 -lwinmm
else ifeq ($(YQ2_OSTYPE), Darwin) else ifeq ($(YQ2_OSTYPE), Darwin)
LDFLAGS := $(OSX_ARCH) -lm LDFLAGS := $(OSX_ARCH) -lm
endif endif
@ -267,25 +259,19 @@ endif
# ---------- # ----------
# Extra LDFLAGS for SDL # Extra LDFLAGS for SDL
ifeq ($(YQ2_OSTYPE), Windows) ifeq ($(YQ2_OSTYPE), Darwin)
ifeq ($(WITH_SDL2),yes)
SDLLDFLAGS := $(shell /custom/bin/sdl2-config --libs)
else # not SDL2
SDLLDFLAGS := -lSDL
endif # SDL2
else ifeq ($(YQ2_OSTYPE), Darwin)
ifeq ($(WITH_SDL2),yes) ifeq ($(WITH_SDL2),yes)
SDLLDFLAGS := -lSDL2 SDLLDFLAGS := -lSDL2
else # not SDL2 else # not SDL2
SDLLDFLAGS := -lSDL -framework OpenGL -framework Cocoa SDLLDFLAGS := -lSDL -framework OpenGL -framework Cocoa
endif # SDL2 endif # SDL2
else # not Darwin/Win else # not Darwin
ifeq ($(WITH_SDL2),yes) ifeq ($(WITH_SDL2),yes)
SDLLDFLAGS := $(shell sdl2-config --libs) SDLLDFLAGS := $(shell sdl2-config --libs)
else # not SDL2 else # not SDL2
SDLLDFLAGS := $(shell sdl-config --libs) SDLLDFLAGS := $(shell sdl-config --libs)
endif # SDL2 endif # SDL2
endif # Darwin/Win endif # Darwin
# ---------- # ----------

View file

@ -207,9 +207,9 @@ libvorbis openal-soft`
On Windows a MinGW environment is needed. A preinstalled environment with all On Windows a MinGW environment is needed. A preinstalled environment with all
dependencies can be found at http://deponie.yamagi.org/quake2/windows/build/ dependencies can be found at http://deponie.yamagi.org/quake2/windows/build/
Just extract it into C:\MinGW\ and start either the 32 bit or 64 bit version Just extract it into C:\MSYS2\ and start either the 32 bit or 64 bit version
through *C:\MinGW\MSYS32* or *C:\MinGW\MSYS64*. With the preinstalled MinGW through *C:\MSYS2\msys32.exe* or *C:\MSYS2\msys64.exe*. With the preinstalled
environment GNU Make is highly recommended, CMake requires further MinGW environment GNU Make is highly recommended, CMake requires further
configuration. At this time Yamagi Quake II can't be compiled with Microsoft configuration. At this time Yamagi Quake II can't be compiled with Microsoft
Visual Studio. Visual Studio.
@ -222,7 +222,6 @@ source directory and type *make*. After that copy everything from the release/
directory to your Yamagi Quake II installation directory. directory to your Yamagi Quake II installation directory.
For the addons download or clone their source, change into the source directory For the addons download or clone their source, change into the source directory
and type *make* (*make CC=gcc* on Windows). After the compilation finishes the and type *make*. After the compilation finishes the release/game.so is copied to
release/game.so is copied to the corresponding directory in your Quake II the corresponding directory in your Quake II installation.
installation.