mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-18 18:21:38 +00:00
dac94ce284
This includes a complete Windows header and library refresh, including the addition of 64-bit compiled libs: *libogg 1.3.0 *libvorbis 1.3.3 *zlib 1.2.7 *libpng 1.5.13 *libvpx 9a3de881c0e681ba1a79a166a86308bbc84b4acd *SDL_mixer 1.2.12 (for RENDERTYPE=SDL) *DirectX import libraries: dsound and dxguid (now included) To build in 64-bit, you essentially need MinGW's MSYS (but not MinGW itself) and MinGW-w64 at the top of your PATH. The target is automatically detected using `$(CC) -dumpmachine`. The EDukeWiki will get detailed instrucitons. All compiler and linker warnings when building in 64-bit mode have been fixed. Remaining 64-bit to-do: - The ebacktrace dll does not build under 64-bit. It uses code specific to the format of 32-bit executables and will have to be ported to work with 64-bit executables. A future 64-bit version will be named ebacktrace1-64.dll. - RENDERTYPE=SDL crashes in SDL_mixer's Mix_Linked_Version(). - DirectInput gives an error and does not function. This only affects joysticks, and the error never happens without any plugged in. - Port the classic renderer ASM to 64-bit. (Just kidding, this is way out of my league.) This commit includes a fair bit of Makefile development spanning all platforms, including simplifying the SDLCONFIG code, fixing build on Mac OS X (thanks rhoenie!), globally factoring Apple brew/port inclusion, enforcing that all -L come before all -l, and ensuring that $(shell ) is always :='d. In addition, I have resurrected the old GCC_MAJOR and GCC_MINOR detection using `$(CC) -dumpversion`, but I have made it failsafe in case the command fails or the version is manually specified. I have applied this new fine-grained detection where applicable, including allowing LTO, and restraining -W's to versions that support them. git-svn-id: https://svn.eduke32.com/eduke32@3278 1a8010ca-5511-0410-912e-c29ae57300e0
115 lines
4.3 KiB
Text
115 lines
4.3 KiB
Text
Instructions for Building EDuke32's Library Dependencies Targeting Win32 and Win64
|
|
|
|
First, follow these instructions:
|
|
http://wiki.eduke32.com/wiki/Building_EDuke32_on_Windows
|
|
|
|
Download the latest sources from:
|
|
https://www.xiph.org/downloads/
|
|
http://zlib.net/
|
|
http://www.libpng.org/pub/png/libpng.html
|
|
http://www.webmproject.org/code/
|
|
http://www.libsdl.org/download-1.2.php
|
|
http://www.libsdl.org/projects/SDL_mixer/
|
|
|
|
The build output listed as "Desired Results" is what EDuke32 needs to function.
|
|
|
|
The desired results for each library in some cases may need to be installed to the compiler. "x depends on the results of y to compile" means that the build output of x must be added to the compiler in this way. Copy files listed in each category to the appropriate destinations:
|
|
|
|
For MinGW (MinGW32):
|
|
from the compiler root (ex. C:\MinGW\)
|
|
headers: include\
|
|
libraries: lib\
|
|
|
|
For MinGW-w64:
|
|
from the compiler root (ex. C:\MinGW-w64\mingw32-dw2\)
|
|
headers: <target>-w64-mingw32\include\
|
|
libraries: <target>-w64-mingw32\lib\
|
|
|
|
Binaries need to be present with the finished EDuke32 executables. They are not needed during compilation.
|
|
|
|
NB: Text in [] are commands to be pasted into the Windows command prompt, sans [].
|
|
http://wiki.eduke32.com/wiki/Working_with_the_Windows_Command_Prompt
|
|
|
|
|
|
|
|
libogg:
|
|
To build:
|
|
[sh ./configure && make]
|
|
Desired Results:
|
|
- headers: ogg\config_types.h ogg\ogg.h ogg\os_types.h
|
|
- libraries: libogg.a
|
|
|
|
libvorbis:
|
|
To build:
|
|
[sh ./configure && make]
|
|
Desired Results:
|
|
- headers: vorbis\codec.h vorbis\vorbisfile.h
|
|
- libraries: libvorbis.a libvorbisfile.a
|
|
libvorbis depends on the results of libogg to compile.
|
|
|
|
|
|
zlib:
|
|
You may want to change -O3 to -O2 in win32\Makefile.gcc for stability and possibly performance benefits.
|
|
To build:
|
|
[make -f win32\Makefile.gcc]
|
|
[ar rcs libz_mini.a crc32.o deflate.o adler32.o zutil.o trees.o]
|
|
Desired Results:
|
|
- headers: (none)
|
|
- libraries: libz_mini.a
|
|
|
|
|
|
libpng:
|
|
Edit scripts\Makefile.gcc so that ZLIBINC and ZLIBLIB point to the directory of zlib from above, or, rename your zlib directory so that, relative to the libpng directory, it is "../zlib". You will get a compile-time error if this is omitted or done incorrectly.
|
|
Copy the file "minipng.dfa" to the root of the libpng data.
|
|
To build:
|
|
[make -f scripts/pnglibconf.mak DFA_XTRA=./minipng.dfa CPP="gcc -E"]
|
|
[make -f scripts/makefile.gcc libpng.a]
|
|
[ren libpng.a libpng_mini.a]
|
|
Desired Results:
|
|
- headers: png.h pngconf.h pnglibconf.h
|
|
- libraries: libpng_mini.a
|
|
|
|
|
|
libvpx:
|
|
Download the binary of yasm (http://yasm.tortall.net/) for your host system architecture. Both builds target both architectures.
|
|
The build environment needs pr.exe (https://mingw-lib.googlecode.com/files/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2).
|
|
If the configure scripts do not recognize your 64-bit compiler, you may need to apply the included patch "libvpx with MinGW-w64.patch".
|
|
To build:
|
|
[sh ./configure --disable-vp8-encoder --disable-multithread --disable-spatial-resampling --as=yasm && make]
|
|
Desired Results:
|
|
- headers: vpx\vp8.h vpx\vp8dx.h vpx\vpx_codec.h vpx\vpx_codec_impl_bottom.h vpx\vpx_codec_impl_top.h vpx\vpx_decoder.h vpx\vpx_decoder_compat.h vpx\vpx_image.h vpx\vpx_integer.h
|
|
- libraries: libvpx.a libvpx_g.a
|
|
|
|
|
|
SDL:
|
|
To build:
|
|
[sh ./configure && make]
|
|
Desired Results:
|
|
- headers: SDL_*.h
|
|
- libraries: libSDL.a libSDL.dll.a libSDLmain.a
|
|
- binaries: SDL.dll
|
|
|
|
SDL_mixer:
|
|
Download SDL_mixer-devel-<version>-VC.zip.
|
|
The library used for linking can be found at these paths:
|
|
32-bit: SDL_mixer-<version>/lib/x86/SDL_mixer.lib
|
|
64-bit: SDL_mixer-<version>/lib/x64/SDL_mixer.lib
|
|
Compiling SDL_mixer has not been shown to work with either MinGW. If you would like to try anyway:
|
|
To build:
|
|
[sh ./configure && make]
|
|
SDL_mixer depends on the results of SDL to compile. Note that the headers must be installed without the "SDL" prefix directory.
|
|
Note: With just this bare bones setup all the external libraries and formats will be disabled, but that's OK.
|
|
Desired Results:
|
|
- headers: SDL_mixer.h
|
|
- libraries: SDL_mixer.lib
|
|
- binaries: SDL_mixer.dll
|
|
|
|
|
|
dsound:
|
|
dxguid:
|
|
See Windows\src\dxlibs.
|
|
To build:
|
|
[make]
|
|
Desired Results:
|
|
- headers: ddraw.h dinput.h dsound.h (pre-positioned in Windows\include)
|
|
- libraries: libdsound.a libdxguid.a
|