]> git.lizzy.rs Git - shadowclad.git/commitdiff
Set things up for testing a mingw-w64 crossbuild
authoroutfrost <kotlet.bahn@gmail.com>
Wed, 27 May 2020 03:34:09 +0000 (05:34 +0200)
committeroutfrost <kotlet.bahn@gmail.com>
Wed, 27 May 2020 03:34:09 +0000 (05:34 +0200)
Makefile
src/engine/render.c
src/main.c

index cf092585b16c58291fd53ca35f79356ea8b39209..754b2385e77cf810a46d64c9fc16b3f1c516e8a3 100644 (file)
--- 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
index 33b162516a1324a64c5e9f686e456d02f393d72d..8e5133a9182f319e638785d3d552fde6df456dd1 100644 (file)
@@ -1,7 +1,7 @@
 #include "render.h"
 
 #include <stdbool.h>
-#include <GL/glut.h>
+#include <GL/freeglut_std.h>
 
 #include "geometry.h"
 #include "performance.h"
index 7372d8eef5bbd831af0a80d3885f32b107b52a97..a84730ec7b9f589518c698324ecd9f3d5a1b03d6 100644 (file)
@@ -1,5 +1,5 @@
-#include <GL/glxew.h>
-#include <GL/glut.h>
+//#include <GL/glxew.h>
+#include <GL/freeglut_std.h>
 
 #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);