mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-18 23:10:26 +00:00
mymake:: SDL2 with mingw-cross
This commit is contained in:
parent
066b683bde
commit
45e80ca5b5
15
mymake.cpp
15
mymake.cpp
@ -108,8 +108,13 @@ void set_mingw64_cross() {
|
|||||||
compiler = "x86_64-w64-mingw32-g++ -mwindows -march=native -W -Wall -Wextra -Werror -Wno-unused-parameter -Wno-invalid-offsetof -Wno-implicit-fallthrough -Wno-maybe-uninitialized -c";
|
compiler = "x86_64-w64-mingw32-g++ -mwindows -march=native -W -Wall -Wextra -Werror -Wno-unused-parameter -Wno-invalid-offsetof -Wno-implicit-fallthrough -Wno-maybe-uninitialized -c";
|
||||||
linker = "x86_64-w64-mingw32-g++";
|
linker = "x86_64-w64-mingw32-g++";
|
||||||
default_exec_name = "hyper.exe";
|
default_exec_name = "hyper.exe";
|
||||||
opts = "-DWINDOWS -DGLEW_STATIC -DUSE_STDFUNCTION=1 -DCAP_PNG=1 -I /usr/x86_64-w64-mingw32/include/SDL/";
|
opts = "-DWINDOWS -DGLEW_STATIC -DUSE_STDFUNCTION=1 -DCAP_PNG=1";
|
||||||
libs = " hyper64.res -static-libgcc -lopengl32 -lSDL -lSDL_gfx -lSDL_mixer -lSDL_ttf -lpthread -lz -lglew32 -lpng";
|
if(sdlver == 1) opts += " -I /usr/x86_64-w64-mingw32/include/SDL/";
|
||||||
|
if(sdlver == 2) opts += " -I /usr/x86_64-w64-mingw32/include/SDL2/";
|
||||||
|
libs = " hyper64.res -static-libgcc -lopengl32";
|
||||||
|
if(sdlver == 1) libs += " -lSDL -lSDL_gfx -lSDL_mixer -lSDL_ttf";
|
||||||
|
if(sdlver == 2) libs += " -lSDL2 -lSDL2_gfx -lSDL2_mixer -lSDL2_ttf";
|
||||||
|
libs += " -lpthread -lz -lglew32 -lpng";
|
||||||
setvbuf(stdout, NULL, _IONBF, 0); // MinGW is quirky with output buffering
|
setvbuf(stdout, NULL, _IONBF, 0); // MinGW is quirky with output buffering
|
||||||
if(!file_exists("hyper64.res"))
|
if(!file_exists("hyper64.res"))
|
||||||
mysystem("x86_64-w64-mingw32-windres hyper.rc -O coff -o hyper64.res");
|
mysystem("x86_64-w64-mingw32-windres hyper.rc -O coff -o hyper64.res");
|
||||||
@ -266,9 +271,15 @@ int main(int argc, char **argv) {
|
|||||||
else if(s == "-vr") {
|
else if(s == "-vr") {
|
||||||
obj_dir += "/vr";
|
obj_dir += "/vr";
|
||||||
setdir += "../";
|
setdir += "../";
|
||||||
|
if(os == "mingw64" || os == "mingw64-cross") {
|
||||||
|
linker += " for-win64/mingw64/bin/libopenvr_api.dll";
|
||||||
|
opts += " -DCAP_VR=1 -I./for-win64/mingw64/include/openvr/";
|
||||||
|
}
|
||||||
|
else {
|
||||||
linker += " -lopenvr_api";
|
linker += " -lopenvr_api";
|
||||||
opts += " -DCAP_VR=1 -I/usr/include/openvr/";
|
opts += " -DCAP_VR=1 -I/usr/include/openvr/";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if(s == "-rv") {
|
else if(s == "-rv") {
|
||||||
|
|
||||||
if(standard == default_standard) {
|
if(standard == default_standard) {
|
||||||
|
Loading…
Reference in New Issue
Block a user