ruby-glfw 0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +1 -0
- data/README.API +73 -0
- data/Rakefile +120 -0
- data/examples/boing.rb +519 -0
- data/examples/gears.rb +327 -0
- data/examples/keytest.rb +117 -0
- data/examples/listmodes.rb +20 -0
- data/examples/mipmaps.rb +104 -0
- data/examples/mipmaps.tga +0 -0
- data/examples/particles.rb +837 -0
- data/examples/pong3d.rb +741 -0
- data/examples/pong3d_field.tga +0 -0
- data/examples/pong3d_instr.tga +0 -0
- data/examples/pong3d_menu.tga +0 -0
- data/examples/pong3d_title.tga +0 -0
- data/examples/pong3d_winner1.tga +0 -0
- data/examples/pong3d_winner2.tga +0 -0
- data/examples/splitview.rb +432 -0
- data/examples/triangle.rb +89 -0
- data/examples/wave.rb +294 -0
- data/ext/glfw/glfw.c +1094 -0
- data/ext/glfw/mkrf_conf.rb +70 -0
- data/glfw-src/Makefile +220 -0
- data/glfw-src/compile.ami +61 -0
- data/glfw-src/compile.bat +217 -0
- data/glfw-src/compile.sh +607 -0
- data/glfw-src/docs/Makefile +57 -0
- data/glfw-src/docs/Reference.pdf +0 -0
- data/glfw-src/docs/UsersGuide.pdf +0 -0
- data/glfw-src/docs/cleanup.bat +22 -0
- data/glfw-src/docs/glfwdoc.sty +80 -0
- data/glfw-src/docs/glfwrm.tex +3034 -0
- data/glfw-src/docs/glfwug.tex +2024 -0
- data/glfw-src/docs/readme.txt +80 -0
- data/glfw-src/examples/Makefile.amigaos.gcc +70 -0
- data/glfw-src/examples/Makefile.amigaos.vbcc +70 -0
- data/glfw-src/examples/Makefile.dos.djgpp +71 -0
- data/glfw-src/examples/Makefile.macosx.gcc +96 -0
- data/glfw-src/examples/Makefile.win32.bcc +75 -0
- data/glfw-src/examples/Makefile.win32.cross-mgw +79 -0
- data/glfw-src/examples/Makefile.win32.cygwin +79 -0
- data/glfw-src/examples/Makefile.win32.lcc +74 -0
- data/glfw-src/examples/Makefile.win32.mgw +75 -0
- data/glfw-src/examples/Makefile.win32.msvc +74 -0
- data/glfw-src/examples/Makefile.win32.ow +74 -0
- data/glfw-src/examples/Makefile.win32.pellesc +74 -0
- data/glfw-src/examples/Makefile.x11.in +54 -0
- data/glfw-src/examples/boing.c +606 -0
- data/glfw-src/examples/bundle.sh +46 -0
- data/glfw-src/examples/gears.c +382 -0
- data/glfw-src/examples/keytest.c +264 -0
- data/glfw-src/examples/listmodes.c +48 -0
- data/glfw-src/examples/mipmaps.c +126 -0
- data/glfw-src/examples/mipmaps.tga +0 -0
- data/glfw-src/examples/mtbench.c +301 -0
- data/glfw-src/examples/mthello.c +48 -0
- data/glfw-src/examples/particles.c +1148 -0
- data/glfw-src/examples/pong3d.c +839 -0
- data/glfw-src/examples/pong3d_field.tga +0 -0
- data/glfw-src/examples/pong3d_instr.tga +0 -0
- data/glfw-src/examples/pong3d_menu.tga +0 -0
- data/glfw-src/examples/pong3d_title.tga +0 -0
- data/glfw-src/examples/pong3d_winner1.tga +0 -0
- data/glfw-src/examples/pong3d_winner2.tga +0 -0
- data/glfw-src/examples/splitview.c +506 -0
- data/glfw-src/examples/triangle.c +108 -0
- data/glfw-src/examples/wave.c +397 -0
- data/glfw-src/images/opengl.gif +0 -0
- data/glfw-src/images/osicert.gif +0 -0
- data/glfw-src/include/GL/glfw.h +486 -0
- data/glfw-src/lib/amigaos/Makefile.amigaos.gcc +128 -0
- data/glfw-src/lib/amigaos/Makefile.amigaos.vbcc +128 -0
- data/glfw-src/lib/amigaos/SDI_compiler.h +94 -0
- data/glfw-src/lib/amigaos/amigaos_enable.c +51 -0
- data/glfw-src/lib/amigaos/amigaos_fullscreen.c +319 -0
- data/glfw-src/lib/amigaos/amigaos_glext.c +61 -0
- data/glfw-src/lib/amigaos/amigaos_init.c +284 -0
- data/glfw-src/lib/amigaos/amigaos_joystick.c +359 -0
- data/glfw-src/lib/amigaos/amigaos_thread.c +494 -0
- data/glfw-src/lib/amigaos/amigaos_time.c +206 -0
- data/glfw-src/lib/amigaos/amigaos_window.c +830 -0
- data/glfw-src/lib/amigaos/platform.h +337 -0
- data/glfw-src/lib/dos/Makefile.dos.djgpp +146 -0
- data/glfw-src/lib/dos/dos_enable.c +51 -0
- data/glfw-src/lib/dos/dos_events.c +173 -0
- data/glfw-src/lib/dos/dos_fullscreen.c +101 -0
- data/glfw-src/lib/dos/dos_glext.c +59 -0
- data/glfw-src/lib/dos/dos_init.c +105 -0
- data/glfw-src/lib/dos/dos_irq.s +246 -0
- data/glfw-src/lib/dos/dos_joystick.c +94 -0
- data/glfw-src/lib/dos/dos_keyboard.c +694 -0
- data/glfw-src/lib/dos/dos_mouse.c +337 -0
- data/glfw-src/lib/dos/dos_thread.c +267 -0
- data/glfw-src/lib/dos/dos_time.c +309 -0
- data/glfw-src/lib/dos/dos_window.c +563 -0
- data/glfw-src/lib/dos/platform.h +341 -0
- data/glfw-src/lib/enable.c +295 -0
- data/glfw-src/lib/fullscreen.c +95 -0
- data/glfw-src/lib/glext.c +201 -0
- data/glfw-src/lib/image.c +629 -0
- data/glfw-src/lib/init.c +108 -0
- data/glfw-src/lib/input.c +280 -0
- data/glfw-src/lib/internal.h +210 -0
- data/glfw-src/lib/joystick.c +101 -0
- data/glfw-src/lib/macosx/Makefile.macosx.gcc +172 -0
- data/glfw-src/lib/macosx/Makefile.macosx.gcc.universal +166 -0
- data/glfw-src/lib/macosx/libglfw.pc.in +11 -0
- data/glfw-src/lib/macosx/macosx_enable.c +42 -0
- data/glfw-src/lib/macosx/macosx_fullscreen.c +126 -0
- data/glfw-src/lib/macosx/macosx_glext.c +52 -0
- data/glfw-src/lib/macosx/macosx_init.c +194 -0
- data/glfw-src/lib/macosx/macosx_joystick.c +50 -0
- data/glfw-src/lib/macosx/macosx_thread.c +414 -0
- data/glfw-src/lib/macosx/macosx_time.c +112 -0
- data/glfw-src/lib/macosx/macosx_window.c +1279 -0
- data/glfw-src/lib/macosx/platform.h +349 -0
- data/glfw-src/lib/stream.c +194 -0
- data/glfw-src/lib/tga.c +405 -0
- data/glfw-src/lib/thread.c +340 -0
- data/glfw-src/lib/time.c +83 -0
- data/glfw-src/lib/win32/Makefile.win32.bcc +265 -0
- data/glfw-src/lib/win32/Makefile.win32.cross-mgw +274 -0
- data/glfw-src/lib/win32/Makefile.win32.cygwin +279 -0
- data/glfw-src/lib/win32/Makefile.win32.lcc +246 -0
- data/glfw-src/lib/win32/Makefile.win32.mgw +243 -0
- data/glfw-src/lib/win32/Makefile.win32.msvc +242 -0
- data/glfw-src/lib/win32/Makefile.win32.ow +242 -0
- data/glfw-src/lib/win32/Makefile.win32.pellesc +242 -0
- data/glfw-src/lib/win32/glfwdll.def +67 -0
- data/glfw-src/lib/win32/glfwdll_mgw1.def +67 -0
- data/glfw-src/lib/win32/glfwdll_mgw2.def +67 -0
- data/glfw-src/lib/win32/glfwdll_pellesc.def +65 -0
- data/glfw-src/lib/win32/libglfw.pc.in +11 -0
- data/glfw-src/lib/win32/platform.h +474 -0
- data/glfw-src/lib/win32/win32_dllmain.c +60 -0
- data/glfw-src/lib/win32/win32_enable.c +155 -0
- data/glfw-src/lib/win32/win32_fullscreen.c +317 -0
- data/glfw-src/lib/win32/win32_glext.c +85 -0
- data/glfw-src/lib/win32/win32_init.c +356 -0
- data/glfw-src/lib/win32/win32_joystick.c +234 -0
- data/glfw-src/lib/win32/win32_thread.c +511 -0
- data/glfw-src/lib/win32/win32_time.c +146 -0
- data/glfw-src/lib/win32/win32_window.c +1714 -0
- data/glfw-src/lib/window.c +727 -0
- data/glfw-src/lib/x11/Makefile.x11.in +243 -0
- data/glfw-src/lib/x11/platform.h +415 -0
- data/glfw-src/lib/x11/x11_enable.c +51 -0
- data/glfw-src/lib/x11/x11_fullscreen.c +524 -0
- data/glfw-src/lib/x11/x11_glext.c +69 -0
- data/glfw-src/lib/x11/x11_init.c +275 -0
- data/glfw-src/lib/x11/x11_joystick.c +371 -0
- data/glfw-src/lib/x11/x11_keysym2unicode.c +902 -0
- data/glfw-src/lib/x11/x11_thread.c +507 -0
- data/glfw-src/lib/x11/x11_time.c +154 -0
- data/glfw-src/lib/x11/x11_window.c +1746 -0
- data/glfw-src/license.txt +21 -0
- data/glfw-src/readme.html +927 -0
- data/glfw-src/support/d/examples/Makefile +59 -0
- data/glfw-src/support/d/examples/boing.d +610 -0
- data/glfw-src/support/d/examples/gears.d +379 -0
- data/glfw-src/support/d/examples/keytest.d +272 -0
- data/glfw-src/support/d/examples/listmodes.d +48 -0
- data/glfw-src/support/d/examples/mipmaps.d +126 -0
- data/glfw-src/support/d/examples/mtbench.d +304 -0
- data/glfw-src/support/d/examples/mthello.d +54 -0
- data/glfw-src/support/d/examples/particles.d +1150 -0
- data/glfw-src/support/d/examples/pong3d.d +840 -0
- data/glfw-src/support/d/examples/splitview.d +486 -0
- data/glfw-src/support/d/examples/triangle.d +108 -0
- data/glfw-src/support/d/examples/wave.d +400 -0
- data/glfw-src/support/d/imports/gl.d +4539 -0
- data/glfw-src/support/d/imports/glfw.d +349 -0
- data/glfw-src/support/d/imports/glu.d +328 -0
- data/glfw-src/support/d/lib/glfwdll.def +64 -0
- data/glfw-src/support/d/lib/glu32.def +56 -0
- data/glfw-src/support/d/lib/makefile +12 -0
- data/glfw-src/support/d/lib/opengl32.def +372 -0
- data/glfw-src/support/d/readme.html +83 -0
- data/glfw-src/support/delphi/examples/Triangle.dpr +105 -0
- data/glfw-src/support/delphi/lib/glfw.pas +437 -0
- data/glfw-src/support/delphi/readme.html +97 -0
- data/glfw-src/support/lua/examples/gears.lua +383 -0
- data/glfw-src/support/lua/examples/test1.lua +68 -0
- data/glfw-src/support/lua/readme.html +128 -0
- data/glfw-src/support/lua/src/luaglfw.c +1179 -0
- data/glfw-src/support/lua/src/luaglfw.h +48 -0
- data/glfw-src/support/lua/src/runlua.c +82 -0
- data/glfw-src/support/masm/examples/fpc.mac +47 -0
- data/glfw-src/support/masm/examples/makeit.bat +66 -0
- data/glfw-src/support/masm/examples/triangle.asm +232 -0
- data/glfw-src/support/masm/include/glfw.inc +326 -0
- data/glfw-src/support/masm/include/glu32.inc +55 -0
- data/glfw-src/support/masm/include/opengl32.inc +372 -0
- data/glfw-src/support/masm/lib/glfwdll.lib +0 -0
- data/glfw-src/support/masm/readme.html +170 -0
- data/glfw-src/support/msvc80/GLFW.sln +26 -0
- data/glfw-src/support/msvc80/GLFW.vcproj +257 -0
- data/glfw-src/support/msvc80/GLFWDLL.vcproj +287 -0
- data/glfw-src/support/visualbasic/bindings/glfw.bas +320 -0
- data/glfw-src/support/visualbasic/bindings/glu32.bas +284 -0
- data/glfw-src/support/visualbasic/bindings/opengl32.bas +999 -0
- data/glfw-src/support/visualbasic/examples/Triangle.bas +101 -0
- data/glfw-src/support/visualbasic/readme.html +164 -0
- data/website/index.html +84 -0
- data/website/style.css +110 -0
- metadata +301 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
//========================================================================
|
|
2
|
+
// GLFW - An OpenGL framework
|
|
3
|
+
// File: joystick.c
|
|
4
|
+
// Platform: Any
|
|
5
|
+
// API version: 2.6
|
|
6
|
+
// WWW: http://glfw.sourceforge.net
|
|
7
|
+
//------------------------------------------------------------------------
|
|
8
|
+
// Copyright (c) 2002-2006 Camilla Berglund
|
|
9
|
+
//
|
|
10
|
+
// This software is provided 'as-is', without any express or implied
|
|
11
|
+
// warranty. In no event will the authors be held liable for any damages
|
|
12
|
+
// arising from the use of this software.
|
|
13
|
+
//
|
|
14
|
+
// Permission is granted to anyone to use this software for any purpose,
|
|
15
|
+
// including commercial applications, and to alter it and redistribute it
|
|
16
|
+
// freely, subject to the following restrictions:
|
|
17
|
+
//
|
|
18
|
+
// 1. The origin of this software must not be misrepresented; you must not
|
|
19
|
+
// claim that you wrote the original software. If you use this software
|
|
20
|
+
// in a product, an acknowledgment in the product documentation would
|
|
21
|
+
// be appreciated but is not required.
|
|
22
|
+
//
|
|
23
|
+
// 2. Altered source versions must be plainly marked as such, and must not
|
|
24
|
+
// be misrepresented as being the original software.
|
|
25
|
+
//
|
|
26
|
+
// 3. This notice may not be removed or altered from any source
|
|
27
|
+
// distribution.
|
|
28
|
+
//
|
|
29
|
+
//========================================================================
|
|
30
|
+
|
|
31
|
+
#include "internal.h"
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
//************************************************************************
|
|
35
|
+
//**** GLFW user functions ****
|
|
36
|
+
//************************************************************************
|
|
37
|
+
|
|
38
|
+
//========================================================================
|
|
39
|
+
// glfwGetJoystickParam() - Determine joystick capabilities
|
|
40
|
+
//========================================================================
|
|
41
|
+
|
|
42
|
+
GLFWAPI int GLFWAPIENTRY glfwGetJoystickParam( int joy, int param )
|
|
43
|
+
{
|
|
44
|
+
// Is GLFW initialized?
|
|
45
|
+
if( !_glfwInitialized )
|
|
46
|
+
{
|
|
47
|
+
return 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return _glfwPlatformGetJoystickParam( joy, param );
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
//========================================================================
|
|
55
|
+
// glfwGetJoystickPos() - Get joystick axis positions
|
|
56
|
+
//========================================================================
|
|
57
|
+
|
|
58
|
+
GLFWAPI int GLFWAPIENTRY glfwGetJoystickPos( int joy, float *pos,
|
|
59
|
+
int numaxes )
|
|
60
|
+
{
|
|
61
|
+
int i;
|
|
62
|
+
|
|
63
|
+
// Is GLFW initialized?
|
|
64
|
+
if( !_glfwInitialized )
|
|
65
|
+
{
|
|
66
|
+
return 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Clear positions
|
|
70
|
+
for( i = 0; i < numaxes; i++ )
|
|
71
|
+
{
|
|
72
|
+
pos[ i ] = 0.0f;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return _glfwPlatformGetJoystickPos( joy, pos, numaxes );
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
//========================================================================
|
|
80
|
+
// glfwGetJoystickButtons() - Get joystick button states
|
|
81
|
+
//========================================================================
|
|
82
|
+
|
|
83
|
+
GLFWAPI int GLFWAPIENTRY glfwGetJoystickButtons( int joy,
|
|
84
|
+
unsigned char *buttons, int numbuttons )
|
|
85
|
+
{
|
|
86
|
+
int i;
|
|
87
|
+
|
|
88
|
+
// Is GLFW initialized?
|
|
89
|
+
if( !_glfwInitialized )
|
|
90
|
+
{
|
|
91
|
+
return 0;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Clear button states
|
|
95
|
+
for( i = 0; i < numbuttons; i++ )
|
|
96
|
+
{
|
|
97
|
+
buttons[ i ] = GLFW_RELEASE;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return _glfwPlatformGetJoystickButtons( joy, buttons, numbuttons );
|
|
101
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
##########################################################################
|
|
2
|
+
# Makefile for GLFW on Mac OS X using GCC (Apple SDK).
|
|
3
|
+
#-------------------------------------------------------------------------
|
|
4
|
+
# To compile GLFW using this makefile, run:
|
|
5
|
+
# make -f Makefile.macosx.gcc
|
|
6
|
+
##########################################################################
|
|
7
|
+
|
|
8
|
+
##########################################################################
|
|
9
|
+
# Installation prefix (default to /usr/local)
|
|
10
|
+
##########################################################################
|
|
11
|
+
PREFIX ?= /usr/local
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
##########################################################################
|
|
15
|
+
# Default: Build GLFW static and shared library
|
|
16
|
+
##########################################################################
|
|
17
|
+
default: libglfw.a libglfw.dylib
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
##########################################################################
|
|
21
|
+
# Compiler settings
|
|
22
|
+
##########################################################################
|
|
23
|
+
CC = gcc
|
|
24
|
+
CFLAGS = -c -I. -I.. -Wall -O2 -fno-common -g
|
|
25
|
+
|
|
26
|
+
# Some modules should be optimized for speed (e.g. image decoding)
|
|
27
|
+
CFLAGS_SPEED = -c -I. -I.. -Wall -O3 -ffast-math -fno-common -g
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
##########################################################################
|
|
31
|
+
# Library builder settings
|
|
32
|
+
##########################################################################
|
|
33
|
+
AR = ar
|
|
34
|
+
SED = sed
|
|
35
|
+
INSTALL = install
|
|
36
|
+
ARFLAGS = -rcs
|
|
37
|
+
RANLIB = ranlib
|
|
38
|
+
DYLIBFLAGS = -framework AGL -framework Carbon -framework OpenGL \
|
|
39
|
+
-dynamiclib -Wl,-single_module -compatibility_version 1 \
|
|
40
|
+
-current_version 1 -install_name @executable_path/libglfw.dylib
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
##########################################################################
|
|
44
|
+
# Install GLFW header and static library
|
|
45
|
+
##########################################################################
|
|
46
|
+
install: libglfw.a libglfw.pc
|
|
47
|
+
$(INSTALL) -d $(PREFIX)/lib
|
|
48
|
+
$(INSTALL) -c -m 644 libglfw.a $(PREFIX)/lib/libglfw.a
|
|
49
|
+
$(RANLIB) $(PREFIX)/lib/libglfw.a
|
|
50
|
+
$(INSTALL) -d $(PREFIX)/include/GL
|
|
51
|
+
$(INSTALL) -c -m 644 ../../include/GL/glfw.h $(PREFIX)/include/GL/glfw.h
|
|
52
|
+
$(INSTALL) -d $(PREFIX)/lib/pkgconfig
|
|
53
|
+
$(INSTALL) -c -m 644 libglfw.pc $(PREFIX)/lib/pkgconfig/libglfw.pc
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
##########################################################################
|
|
57
|
+
# Object files for the GLFW library
|
|
58
|
+
##########################################################################
|
|
59
|
+
OBJS = \
|
|
60
|
+
enable.o \
|
|
61
|
+
fullscreen.o \
|
|
62
|
+
glext.o \
|
|
63
|
+
image.o \
|
|
64
|
+
init.o \
|
|
65
|
+
input.o \
|
|
66
|
+
joystick.o \
|
|
67
|
+
stream.o \
|
|
68
|
+
tga.o \
|
|
69
|
+
thread.o \
|
|
70
|
+
time.o \
|
|
71
|
+
window.o \
|
|
72
|
+
macosx_enable.o \
|
|
73
|
+
macosx_fullscreen.o \
|
|
74
|
+
macosx_glext.o \
|
|
75
|
+
macosx_init.o \
|
|
76
|
+
macosx_joystick.o \
|
|
77
|
+
macosx_thread.o \
|
|
78
|
+
macosx_time.o \
|
|
79
|
+
macosx_window.o
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
##########################################################################
|
|
83
|
+
# Rule for building libglfw.pc
|
|
84
|
+
##########################################################################
|
|
85
|
+
libglfw.pc: libglfw.pc.in
|
|
86
|
+
$(SED) -e 's,\@PREFIX\@,$(PREFIX),' libglfw.pc.in > libglfw.pc
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
##########################################################################
|
|
90
|
+
# Rule for building static library
|
|
91
|
+
##########################################################################
|
|
92
|
+
libglfw.a: $(OBJS)
|
|
93
|
+
$(AR) $(ARFLAGS) $@ $(OBJS)
|
|
94
|
+
$(RANLIB) $@
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
##########################################################################
|
|
98
|
+
# Rule for building shared library
|
|
99
|
+
##########################################################################
|
|
100
|
+
libglfw.dylib: $(OBJS)
|
|
101
|
+
$(CC) -o $@ $(DYLIBFLAGS) $(OBJS)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
##########################################################################
|
|
105
|
+
# Rule for cleaning up generated files
|
|
106
|
+
##########################################################################
|
|
107
|
+
clean:
|
|
108
|
+
@rm -f *.o libglfw.a libglfw.dylib libglfw.pc
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
##########################################################################
|
|
112
|
+
# Rules for building library object files
|
|
113
|
+
##########################################################################
|
|
114
|
+
enable.o: ../enable.c ../internal.h platform.h
|
|
115
|
+
$(CC) $(CFLAGS) -o $@ ../enable.c
|
|
116
|
+
|
|
117
|
+
fullscreen.o: ../fullscreen.c ../internal.h platform.h
|
|
118
|
+
$(CC) $(CFLAGS) -o $@ ../fullscreen.c
|
|
119
|
+
|
|
120
|
+
glext.o: ../glext.c ../internal.h platform.h
|
|
121
|
+
$(CC) $(CFLAGS) -o $@ ../glext.c
|
|
122
|
+
|
|
123
|
+
image.o: ../image.c ../internal.h platform.h
|
|
124
|
+
$(CC) $(CFLAGS_SPEED) -o $@ ../image.c
|
|
125
|
+
|
|
126
|
+
init.o: ../init.c ../internal.h platform.h
|
|
127
|
+
$(CC) $(CFLAGS) -o $@ ../init.c
|
|
128
|
+
|
|
129
|
+
input.o: ../input.c ../internal.h platform.h
|
|
130
|
+
$(CC) $(CFLAGS) -o $@ ../input.c
|
|
131
|
+
|
|
132
|
+
joystick.o: ../joystick.c ../internal.h platform.h
|
|
133
|
+
$(CC) $(CFLAGS) -o $@ ../joystick.c
|
|
134
|
+
|
|
135
|
+
stream.o: ../stream.c ../internal.h platform.h
|
|
136
|
+
$(CC) $(CFLAGS) -o $@ ../stream.c
|
|
137
|
+
|
|
138
|
+
tga.o: ../tga.c ../internal.h platform.h
|
|
139
|
+
$(CC) $(CFLAGS_SPEED) -o $@ ../tga.c
|
|
140
|
+
|
|
141
|
+
thread.o: ../thread.c ../internal.h platform.h
|
|
142
|
+
$(CC) $(CFLAGS) -o $@ ../thread.c
|
|
143
|
+
|
|
144
|
+
time.o: ../time.c ../internal.h platform.h
|
|
145
|
+
$(CC) $(CFLAGS) -o $@ ../time.c
|
|
146
|
+
|
|
147
|
+
window.o: ../window.c ../internal.h platform.h
|
|
148
|
+
$(CC) $(CFLAGS) -o $@ ../window.c
|
|
149
|
+
|
|
150
|
+
macosx_enable.o: macosx_enable.c ../internal.h platform.h
|
|
151
|
+
$(CC) $(CFLAGS) -o $@ macosx_enable.c
|
|
152
|
+
|
|
153
|
+
macosx_fullscreen.o: macosx_fullscreen.c ../internal.h platform.h
|
|
154
|
+
$(CC) $(CFLAGS) -o $@ macosx_fullscreen.c
|
|
155
|
+
|
|
156
|
+
macosx_glext.o: macosx_glext.c ../internal.h platform.h
|
|
157
|
+
$(CC) $(CFLAGS) -o $@ macosx_glext.c
|
|
158
|
+
|
|
159
|
+
macosx_init.o: macosx_init.c ../internal.h platform.h
|
|
160
|
+
$(CC) $(CFLAGS) -o $@ macosx_init.c
|
|
161
|
+
|
|
162
|
+
macosx_joystick.o: macosx_joystick.c ../internal.h platform.h
|
|
163
|
+
$(CC) $(CFLAGS) -o $@ macosx_joystick.c
|
|
164
|
+
|
|
165
|
+
macosx_thread.o: macosx_thread.c ../internal.h platform.h
|
|
166
|
+
$(CC) $(CFLAGS) -o $@ macosx_thread.c
|
|
167
|
+
|
|
168
|
+
macosx_time.o: macosx_time.c ../internal.h platform.h
|
|
169
|
+
$(CC) $(CFLAGS) -o $@ macosx_time.c
|
|
170
|
+
|
|
171
|
+
macosx_window.o: macosx_window.c ../internal.h platform.h
|
|
172
|
+
$(CC) $(CFLAGS) -o $@ macosx_window.c
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
##########################################################################
|
|
2
|
+
# Makefile for GLFW on Mac OS X using GCC (Apple SDK).
|
|
3
|
+
#-------------------------------------------------------------------------
|
|
4
|
+
# To compile GLFW using this makefile, run:
|
|
5
|
+
# make -f Makefile.macosx.gcc
|
|
6
|
+
##########################################################################
|
|
7
|
+
|
|
8
|
+
##########################################################################
|
|
9
|
+
# Installation prefix (default to /usr/local)
|
|
10
|
+
##########################################################################
|
|
11
|
+
PREFIX ?= /usr/local
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
##########################################################################
|
|
15
|
+
# Default: Build GLFW static library
|
|
16
|
+
##########################################################################
|
|
17
|
+
default: libglfw.a
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
##########################################################################
|
|
21
|
+
# Compiler settings
|
|
22
|
+
##########################################################################
|
|
23
|
+
CC = gcc
|
|
24
|
+
FATFLAGS = -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386
|
|
25
|
+
CFLAGS = -c -I. -I.. -Wall -Os -fno-common $(FATFLAGS)
|
|
26
|
+
|
|
27
|
+
# Some modules should be optimized for speed (e.g. image decoding)
|
|
28
|
+
CFLAGS_SPEED = -c -I. -I.. -Wall -O3 -ffast-math -fno-common $(FATFLAGS)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
##########################################################################
|
|
32
|
+
# Library builder settings
|
|
33
|
+
##########################################################################
|
|
34
|
+
# Static library
|
|
35
|
+
SED = sed
|
|
36
|
+
INSTALL = install
|
|
37
|
+
MKLIB = ar
|
|
38
|
+
LIBFLAGS = -rcs
|
|
39
|
+
RANLIB = ranlib
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
##########################################################################
|
|
43
|
+
# Install GLFW header and static library
|
|
44
|
+
##########################################################################
|
|
45
|
+
install: libglfw.a libglfw.pc
|
|
46
|
+
$(INSTALL) -d $(PREFIX)/lib
|
|
47
|
+
$(INSTALL) -c -m 644 libglfw.a $(PREFIX)/lib/libglfw.a
|
|
48
|
+
$(RANLIB) $(PREFIX)/lib/libglfw.a
|
|
49
|
+
$(INSTALL) -d $(PREFIX)/include/GL
|
|
50
|
+
$(INSTALL) -c -m 644 ../../include/GL/glfw.h $(PREFIX)/include/GL/glfw.h
|
|
51
|
+
$(INSTALL) -d $(PREFIX)/lib/pkgconfig
|
|
52
|
+
$(INSTALL) -c -m 644 libglfw.pc $(PREFIX)/lib/pkgconfig/libglfw.pc
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
##########################################################################
|
|
56
|
+
# Rule for cleaning up generated files
|
|
57
|
+
##########################################################################
|
|
58
|
+
clean:
|
|
59
|
+
@rm -f *.o libglfw.a libglfw.pc
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
##########################################################################
|
|
63
|
+
# Object files which are part of the GLFW library
|
|
64
|
+
##########################################################################
|
|
65
|
+
OBJS = \
|
|
66
|
+
enable.o \
|
|
67
|
+
fullscreen.o \
|
|
68
|
+
glext.o \
|
|
69
|
+
image.o \
|
|
70
|
+
init.o \
|
|
71
|
+
input.o \
|
|
72
|
+
joystick.o \
|
|
73
|
+
stream.o \
|
|
74
|
+
tga.o \
|
|
75
|
+
thread.o \
|
|
76
|
+
time.o \
|
|
77
|
+
window.o \
|
|
78
|
+
macosx_enable.o \
|
|
79
|
+
macosx_fullscreen.o \
|
|
80
|
+
macosx_glext.o \
|
|
81
|
+
macosx_init.o \
|
|
82
|
+
macosx_joystick.o \
|
|
83
|
+
macosx_thread.o \
|
|
84
|
+
macosx_time.o \
|
|
85
|
+
macosx_window.o
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
##########################################################################
|
|
89
|
+
# Rule for building libglfw.pc
|
|
90
|
+
##########################################################################
|
|
91
|
+
libglfw.pc: libglfw.pc.in
|
|
92
|
+
$(SED) -e 's,\@PREFIX\@,$(PREFIX),' libglfw.pc.in > libglfw.pc
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
##########################################################################
|
|
96
|
+
# Rule for building library
|
|
97
|
+
##########################################################################
|
|
98
|
+
libglfw.a: $(OBJS)
|
|
99
|
+
rm -f $@
|
|
100
|
+
$(MKLIB) $(LIBFLAGS) $@ $(OBJS)
|
|
101
|
+
$(RANLIB) $@
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
##########################################################################
|
|
105
|
+
# Rules for building library object files
|
|
106
|
+
##########################################################################
|
|
107
|
+
enable.o: ../enable.c ../internal.h platform.h
|
|
108
|
+
$(CC) $(CFLAGS) -o $@ ../enable.c
|
|
109
|
+
|
|
110
|
+
fullscreen.o: ../fullscreen.c ../internal.h platform.h
|
|
111
|
+
$(CC) $(CFLAGS) -o $@ ../fullscreen.c
|
|
112
|
+
|
|
113
|
+
glext.o: ../glext.c ../internal.h platform.h
|
|
114
|
+
$(CC) $(CFLAGS) -o $@ ../glext.c
|
|
115
|
+
|
|
116
|
+
image.o: ../image.c ../internal.h platform.h
|
|
117
|
+
$(CC) $(CFLAGS_SPEED) -o $@ ../image.c
|
|
118
|
+
|
|
119
|
+
init.o: ../init.c ../internal.h platform.h
|
|
120
|
+
$(CC) $(CFLAGS) -o $@ ../init.c
|
|
121
|
+
|
|
122
|
+
input.o: ../input.c ../internal.h platform.h
|
|
123
|
+
$(CC) $(CFLAGS) -o $@ ../input.c
|
|
124
|
+
|
|
125
|
+
joystick.o: ../joystick.c ../internal.h platform.h
|
|
126
|
+
$(CC) $(CFLAGS) -o $@ ../joystick.c
|
|
127
|
+
|
|
128
|
+
stream.o: ../stream.c ../internal.h platform.h
|
|
129
|
+
$(CC) $(CFLAGS) -o $@ ../stream.c
|
|
130
|
+
|
|
131
|
+
tga.o: ../tga.c ../internal.h platform.h
|
|
132
|
+
$(CC) $(CFLAGS_SPEED) -o $@ ../tga.c
|
|
133
|
+
|
|
134
|
+
thread.o: ../thread.c ../internal.h platform.h
|
|
135
|
+
$(CC) $(CFLAGS) -o $@ ../thread.c
|
|
136
|
+
|
|
137
|
+
time.o: ../time.c ../internal.h platform.h
|
|
138
|
+
$(CC) $(CFLAGS) -o $@ ../time.c
|
|
139
|
+
|
|
140
|
+
window.o: ../window.c ../internal.h platform.h
|
|
141
|
+
$(CC) $(CFLAGS) -o $@ ../window.c
|
|
142
|
+
|
|
143
|
+
macosx_enable.o: macosx_enable.c ../internal.h platform.h
|
|
144
|
+
$(CC) $(CFLAGS) -o $@ macosx_enable.c
|
|
145
|
+
|
|
146
|
+
macosx_fullscreen.o: macosx_fullscreen.c ../internal.h platform.h
|
|
147
|
+
$(CC) $(CFLAGS) -o $@ macosx_fullscreen.c
|
|
148
|
+
|
|
149
|
+
macosx_glext.o: macosx_glext.c ../internal.h platform.h
|
|
150
|
+
$(CC) $(CFLAGS) -o $@ macosx_glext.c
|
|
151
|
+
|
|
152
|
+
macosx_init.o: macosx_init.c ../internal.h platform.h
|
|
153
|
+
$(CC) $(CFLAGS) -o $@ macosx_init.c
|
|
154
|
+
|
|
155
|
+
macosx_joystick.o: macosx_joystick.c ../internal.h platform.h
|
|
156
|
+
$(CC) $(CFLAGS) -o $@ macosx_joystick.c
|
|
157
|
+
|
|
158
|
+
macosx_thread.o: macosx_thread.c ../internal.h platform.h
|
|
159
|
+
$(CC) $(CFLAGS) -o $@ macosx_thread.c
|
|
160
|
+
|
|
161
|
+
macosx_time.o: macosx_time.c ../internal.h platform.h
|
|
162
|
+
$(CC) $(CFLAGS) -o $@ macosx_time.c
|
|
163
|
+
|
|
164
|
+
macosx_window.o: macosx_window.c ../internal.h platform.h
|
|
165
|
+
$(CC) $(CFLAGS) -o $@ macosx_window.c
|
|
166
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
prefix=@PREFIX@
|
|
2
|
+
exec_prefix=@PREFIX@
|
|
3
|
+
libdir=@PREFIX@/lib
|
|
4
|
+
includedir=@PREFIX@/include
|
|
5
|
+
|
|
6
|
+
Name: GLFW
|
|
7
|
+
Description: A portable framework for OpenGL development
|
|
8
|
+
Version: 2.6.0
|
|
9
|
+
URL: http://glfw.sourceforge.net/
|
|
10
|
+
Libs: -L${libdir} -lglfw -framework AGL -framework OpenGL -framework Carbon
|
|
11
|
+
Cflags: -I${includedir}
|