1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-20 23:50:27 +00:00

remove -Werror and -march=native from mymake

This commit is contained in:
Zeno Rogue 2022-07-05 02:54:07 +02:00
parent 8eaeff85eb
commit 1987eff6cd

View File

@ -65,7 +65,7 @@ string exec_name = "";
void set_linux() { void set_linux() {
preprocessor = "g++ -E"; preprocessor = "g++ -E";
compiler = "g++ -Wall -Wextra -Wno-maybe-uninitialized -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-invalid-offsetof -rdynamic -fdiagnostics-color=always -c -march=native"; compiler = "g++ -Wall -Wextra -Wno-maybe-uninitialized -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-invalid-offsetof -rdynamic -fdiagnostics-color=always -c";
linker = "g++ -rdynamic"; linker = "g++ -rdynamic";
default_exec_name = "hyper"; default_exec_name = "hyper";
if(sdlver == 2) { if(sdlver == 2) {
@ -84,7 +84,7 @@ void set_linux() {
void set_mac() { void set_mac() {
preprocessor = "g++ -E"; preprocessor = "g++ -E";
compiler = "g++ -march=native -W -Wall -Wextra -Wsuggest-override -pedantic -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-invalid-offsetof -c"; compiler = "g++ -W -Wall -Wextra -Wsuggest-override -pedantic -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-invalid-offsetof -c";
linker = "g++"; linker = "g++";
default_exec_name = "hyper"; default_exec_name = "hyper";
opts = "-DMAC -I/usr/local/include"; opts = "-DMAC -I/usr/local/include";
@ -94,7 +94,7 @@ void set_mac() {
void set_mingw64() { void set_mingw64() {
mingw64 = true; mingw64 = true;
preprocessor = "g++ -E"; preprocessor = "g++ -E";
compiler = "g++ -mwindows -march=native -W -Wall -Wextra -Werror -Wno-unused-parameter -Wno-invalid-offsetof -Wno-implicit-fallthrough -Wno-maybe-uninitialized -c"; compiler = "g++ -mwindows -W -Wall -Wextra -Wno-unused-parameter -Wno-invalid-offsetof -Wno-implicit-fallthrough -Wno-maybe-uninitialized -c";
linker = "g++"; linker = "g++";
default_exec_name = "hyper"; default_exec_name = "hyper";
opts = "-DWINDOWS -DCAP_GLEW=1 -DCAP_PNG=1"; opts = "-DWINDOWS -DCAP_GLEW=1 -DCAP_PNG=1";
@ -105,7 +105,7 @@ void set_mingw64() {
/* cross-compile Linux to Windows (tested on Archlinux) */ /* cross-compile Linux to Windows (tested on Archlinux) */
void set_mingw64_cross() { void set_mingw64_cross() {
preprocessor = "x86_64-w64-mingw32-g++ -E"; preprocessor = "x86_64-w64-mingw32-g++ -E";
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 -W -Wall -Wextra -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"; opts = "-DWINDOWS -DGLEW_STATIC -DUSE_STDFUNCTION=1 -DCAP_PNG=1";
@ -232,13 +232,14 @@ int main(int argc, char **argv) {
setdir += "../"; setdir += "../";
opts += " -DCAP_SDL2=1"; opts += " -DCAP_SDL2=1";
} }
else if(s.substr(0, 2) == "-f") { else if(s.substr(0, 2) == "-f" || s.substr(0, 2) == "-m") {
opts += " " + s; opts += " " + s;
obj_dir += "/"; obj_dir += "/";
setdir += "../"; setdir += "../";
for(char c: s) for(char c: s)
if(!isalnum(c)) obj_dir += "_"; if(!isalnum(c)) obj_dir += "_";
else obj_dir += c; else obj_dir += c;
compiler += " " + s;
linker += " " + s; linker += " " + s;
} }
else if(s == "-o") { else if(s == "-o") {
@ -256,6 +257,8 @@ int main(int argc, char **argv) {
optimized = 2, compiler += " -O2", obj_dir += "/O2", setdir += "../"; optimized = 2, compiler += " -O2", obj_dir += "/O2", setdir += "../";
else if(s == "-O3") else if(s == "-O3")
optimized = 3, compiler += " -O3", obj_dir += "/O3", setdir += "../"; optimized = 3, compiler += " -O3", obj_dir += "/O3", setdir += "../";
else if(s == "-Werror")
compiler += " -Werror", obj_dir += "/Werror", setdir += "../";
else if(s.substr(0, 4) == "-std") else if(s.substr(0, 4) == "-std")
standard = s; standard = s;
else if(s.substr(0, 2) == "-l") else if(s.substr(0, 2) == "-l")