summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/freeglut-test.c20
-rw-r--r--src/freeglut.mk7
2 files changed, 26 insertions, 1 deletions
diff --git a/src/freeglut-test.c b/src/freeglut-test.c
new file mode 100644
index 0000000..254230b
--- /dev/null
+++ b/src/freeglut-test.c
@@ -0,0 +1,20 @@
+/* This file is part of mingw-cross-env. */
+/* See doc/index.html for further information. */
+
+#include <GL/glut.h>
+
+#include <stdio.h>
+
+int main(int argc, char *argv[])
+{
+ glutInit(&argc, argv);
+ glutInitWindowSize(640,480);
+ glutInitWindowPosition(10,10);
+ glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
+
+ glutCreateWindow("FreeGLUT Shapes");
+
+ glutMainLoop();
+
+ return(0);
+}
diff --git a/src/freeglut.mk b/src/freeglut.mk
index a855b55..daae51d 100644
--- a/src/freeglut.mk
+++ b/src/freeglut.mk
@@ -31,5 +31,10 @@ define $(PKG)_BUILD
--disable-debug \
--without-progs \
--without-x
- $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
+ $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= EXPORT_FLAGS='-DFREEGLUT_STATIC'
+
+ '$(TARGET)-gcc' \
+ -W -Wall -Werror -ansi -pedantic \
+ '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-freeglut.exe' \
+ -lglut -lglu32 -lopengl32 -lwinmm -lgdi32 -mwindows -DFREEGLUT_STATIC
endef