From: outfrost Date: Wed, 27 May 2020 03:34:09 +0000 (+0200) Subject: Set things up for testing a mingw-w64 crossbuild X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=b820f0abc1bc8afa80488d25e0a3cae0149e352a;p=shadowclad.git Set things up for testing a mingw-w64 crossbuild --- diff --git a/Makefile b/Makefile index cf09258..754b238 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,7 @@ -PLATFORM ?= x86_64-linux-gnu +#PLATFORM ?= x86_64-linux-gnu +PLATFORM ?= x86_64-w64-mingw32 + +CC ::= x86_64-w64-mingw32-cc BUILDDIR ?= target/$(PLATFORM) SRCDIR ?= src @@ -36,7 +39,8 @@ depfiles ::= $(addprefix $(BUILDDIR)/, $(addsuffix .mk, $(srcfiles))) #else # binext ::= #endif -binary ::= $(BUILDDIR)/shadowclad #$(binext) +binary ::= $(BUILDDIR)/shadowclad.exe +#binary ::= $(BUILDDIR)/shadowclad #$(binext) # ###### # Main build rules diff --git a/src/engine/render.c b/src/engine/render.c index 33b1625..8e5133a 100644 --- a/src/engine/render.c +++ b/src/engine/render.c @@ -1,7 +1,7 @@ #include "render.h" #include -#include +#include #include "geometry.h" #include "performance.h" diff --git a/src/main.c b/src/main.c index 7372d8e..a84730e 100644 --- a/src/main.c +++ b/src/main.c @@ -1,5 +1,5 @@ -#include -#include +//#include +#include #include "engine/logger.h" #include "engine/performance.h" @@ -19,9 +19,9 @@ int main(int argc, char** argv) { glutCreateWindow("shadowclad"); logInfo("OpenGL %s", (const char*) glGetString(GL_VERSION)); - logInfo("GLSL %s", (const char*) glGetString(GL_SHADING_LANGUAGE_VERSION)); + //logInfo("GLSL %s", (const char*) glGetString(GL_SHADING_LANGUAGE_VERSION)); logInfo("%s", (const char*) glGetString(GL_RENDERER)); - + /* GLenum glewInitStatus = glewInit(); if (glewInitStatus != GLEW_OK) { logError("GLEW init failed: %s", (const char*) glewGetErrorString(glewInitStatus)); @@ -47,7 +47,7 @@ int main(int argc, char** argv) { else { logWarning("Could not enable vsync (extensions not supported)"); } - + */ glutDisplayFunc(renderFrame); glutReshapeFunc(resizeStage); //glutKeyboardFunc(key_pressed);