Mercurial > mxe-octave
changeset 1993:91aa4270e0e9
package freeglut: fix static build and add test program
author | Tony Theodore <tonyt@logyst.com> |
---|---|
date | Mon, 19 Sep 2011 23:32:17 +1000 |
parents | a8709467c874 |
children | 8bf08e374ef9 |
files | src/freeglut-test.c src/freeglut.mk |
diffstat | 2 files changed, 26 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/freeglut-test.c Mon Sep 19 23:32:17 2011 +1000 @@ -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); +}
--- a/src/freeglut.mk Mon Sep 19 22:57:11 2011 +1000 +++ b/src/freeglut.mk Mon Sep 19 23:32:17 2011 +1000 @@ -31,5 +31,10 @@ --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