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.
Files changed (206) hide show
  1. data/README +1 -0
  2. data/README.API +73 -0
  3. data/Rakefile +120 -0
  4. data/examples/boing.rb +519 -0
  5. data/examples/gears.rb +327 -0
  6. data/examples/keytest.rb +117 -0
  7. data/examples/listmodes.rb +20 -0
  8. data/examples/mipmaps.rb +104 -0
  9. data/examples/mipmaps.tga +0 -0
  10. data/examples/particles.rb +837 -0
  11. data/examples/pong3d.rb +741 -0
  12. data/examples/pong3d_field.tga +0 -0
  13. data/examples/pong3d_instr.tga +0 -0
  14. data/examples/pong3d_menu.tga +0 -0
  15. data/examples/pong3d_title.tga +0 -0
  16. data/examples/pong3d_winner1.tga +0 -0
  17. data/examples/pong3d_winner2.tga +0 -0
  18. data/examples/splitview.rb +432 -0
  19. data/examples/triangle.rb +89 -0
  20. data/examples/wave.rb +294 -0
  21. data/ext/glfw/glfw.c +1094 -0
  22. data/ext/glfw/mkrf_conf.rb +70 -0
  23. data/glfw-src/Makefile +220 -0
  24. data/glfw-src/compile.ami +61 -0
  25. data/glfw-src/compile.bat +217 -0
  26. data/glfw-src/compile.sh +607 -0
  27. data/glfw-src/docs/Makefile +57 -0
  28. data/glfw-src/docs/Reference.pdf +0 -0
  29. data/glfw-src/docs/UsersGuide.pdf +0 -0
  30. data/glfw-src/docs/cleanup.bat +22 -0
  31. data/glfw-src/docs/glfwdoc.sty +80 -0
  32. data/glfw-src/docs/glfwrm.tex +3034 -0
  33. data/glfw-src/docs/glfwug.tex +2024 -0
  34. data/glfw-src/docs/readme.txt +80 -0
  35. data/glfw-src/examples/Makefile.amigaos.gcc +70 -0
  36. data/glfw-src/examples/Makefile.amigaos.vbcc +70 -0
  37. data/glfw-src/examples/Makefile.dos.djgpp +71 -0
  38. data/glfw-src/examples/Makefile.macosx.gcc +96 -0
  39. data/glfw-src/examples/Makefile.win32.bcc +75 -0
  40. data/glfw-src/examples/Makefile.win32.cross-mgw +79 -0
  41. data/glfw-src/examples/Makefile.win32.cygwin +79 -0
  42. data/glfw-src/examples/Makefile.win32.lcc +74 -0
  43. data/glfw-src/examples/Makefile.win32.mgw +75 -0
  44. data/glfw-src/examples/Makefile.win32.msvc +74 -0
  45. data/glfw-src/examples/Makefile.win32.ow +74 -0
  46. data/glfw-src/examples/Makefile.win32.pellesc +74 -0
  47. data/glfw-src/examples/Makefile.x11.in +54 -0
  48. data/glfw-src/examples/boing.c +606 -0
  49. data/glfw-src/examples/bundle.sh +46 -0
  50. data/glfw-src/examples/gears.c +382 -0
  51. data/glfw-src/examples/keytest.c +264 -0
  52. data/glfw-src/examples/listmodes.c +48 -0
  53. data/glfw-src/examples/mipmaps.c +126 -0
  54. data/glfw-src/examples/mipmaps.tga +0 -0
  55. data/glfw-src/examples/mtbench.c +301 -0
  56. data/glfw-src/examples/mthello.c +48 -0
  57. data/glfw-src/examples/particles.c +1148 -0
  58. data/glfw-src/examples/pong3d.c +839 -0
  59. data/glfw-src/examples/pong3d_field.tga +0 -0
  60. data/glfw-src/examples/pong3d_instr.tga +0 -0
  61. data/glfw-src/examples/pong3d_menu.tga +0 -0
  62. data/glfw-src/examples/pong3d_title.tga +0 -0
  63. data/glfw-src/examples/pong3d_winner1.tga +0 -0
  64. data/glfw-src/examples/pong3d_winner2.tga +0 -0
  65. data/glfw-src/examples/splitview.c +506 -0
  66. data/glfw-src/examples/triangle.c +108 -0
  67. data/glfw-src/examples/wave.c +397 -0
  68. data/glfw-src/images/opengl.gif +0 -0
  69. data/glfw-src/images/osicert.gif +0 -0
  70. data/glfw-src/include/GL/glfw.h +486 -0
  71. data/glfw-src/lib/amigaos/Makefile.amigaos.gcc +128 -0
  72. data/glfw-src/lib/amigaos/Makefile.amigaos.vbcc +128 -0
  73. data/glfw-src/lib/amigaos/SDI_compiler.h +94 -0
  74. data/glfw-src/lib/amigaos/amigaos_enable.c +51 -0
  75. data/glfw-src/lib/amigaos/amigaos_fullscreen.c +319 -0
  76. data/glfw-src/lib/amigaos/amigaos_glext.c +61 -0
  77. data/glfw-src/lib/amigaos/amigaos_init.c +284 -0
  78. data/glfw-src/lib/amigaos/amigaos_joystick.c +359 -0
  79. data/glfw-src/lib/amigaos/amigaos_thread.c +494 -0
  80. data/glfw-src/lib/amigaos/amigaos_time.c +206 -0
  81. data/glfw-src/lib/amigaos/amigaos_window.c +830 -0
  82. data/glfw-src/lib/amigaos/platform.h +337 -0
  83. data/glfw-src/lib/dos/Makefile.dos.djgpp +146 -0
  84. data/glfw-src/lib/dos/dos_enable.c +51 -0
  85. data/glfw-src/lib/dos/dos_events.c +173 -0
  86. data/glfw-src/lib/dos/dos_fullscreen.c +101 -0
  87. data/glfw-src/lib/dos/dos_glext.c +59 -0
  88. data/glfw-src/lib/dos/dos_init.c +105 -0
  89. data/glfw-src/lib/dos/dos_irq.s +246 -0
  90. data/glfw-src/lib/dos/dos_joystick.c +94 -0
  91. data/glfw-src/lib/dos/dos_keyboard.c +694 -0
  92. data/glfw-src/lib/dos/dos_mouse.c +337 -0
  93. data/glfw-src/lib/dos/dos_thread.c +267 -0
  94. data/glfw-src/lib/dos/dos_time.c +309 -0
  95. data/glfw-src/lib/dos/dos_window.c +563 -0
  96. data/glfw-src/lib/dos/platform.h +341 -0
  97. data/glfw-src/lib/enable.c +295 -0
  98. data/glfw-src/lib/fullscreen.c +95 -0
  99. data/glfw-src/lib/glext.c +201 -0
  100. data/glfw-src/lib/image.c +629 -0
  101. data/glfw-src/lib/init.c +108 -0
  102. data/glfw-src/lib/input.c +280 -0
  103. data/glfw-src/lib/internal.h +210 -0
  104. data/glfw-src/lib/joystick.c +101 -0
  105. data/glfw-src/lib/macosx/Makefile.macosx.gcc +172 -0
  106. data/glfw-src/lib/macosx/Makefile.macosx.gcc.universal +166 -0
  107. data/glfw-src/lib/macosx/libglfw.pc.in +11 -0
  108. data/glfw-src/lib/macosx/macosx_enable.c +42 -0
  109. data/glfw-src/lib/macosx/macosx_fullscreen.c +126 -0
  110. data/glfw-src/lib/macosx/macosx_glext.c +52 -0
  111. data/glfw-src/lib/macosx/macosx_init.c +194 -0
  112. data/glfw-src/lib/macosx/macosx_joystick.c +50 -0
  113. data/glfw-src/lib/macosx/macosx_thread.c +414 -0
  114. data/glfw-src/lib/macosx/macosx_time.c +112 -0
  115. data/glfw-src/lib/macosx/macosx_window.c +1279 -0
  116. data/glfw-src/lib/macosx/platform.h +349 -0
  117. data/glfw-src/lib/stream.c +194 -0
  118. data/glfw-src/lib/tga.c +405 -0
  119. data/glfw-src/lib/thread.c +340 -0
  120. data/glfw-src/lib/time.c +83 -0
  121. data/glfw-src/lib/win32/Makefile.win32.bcc +265 -0
  122. data/glfw-src/lib/win32/Makefile.win32.cross-mgw +274 -0
  123. data/glfw-src/lib/win32/Makefile.win32.cygwin +279 -0
  124. data/glfw-src/lib/win32/Makefile.win32.lcc +246 -0
  125. data/glfw-src/lib/win32/Makefile.win32.mgw +243 -0
  126. data/glfw-src/lib/win32/Makefile.win32.msvc +242 -0
  127. data/glfw-src/lib/win32/Makefile.win32.ow +242 -0
  128. data/glfw-src/lib/win32/Makefile.win32.pellesc +242 -0
  129. data/glfw-src/lib/win32/glfwdll.def +67 -0
  130. data/glfw-src/lib/win32/glfwdll_mgw1.def +67 -0
  131. data/glfw-src/lib/win32/glfwdll_mgw2.def +67 -0
  132. data/glfw-src/lib/win32/glfwdll_pellesc.def +65 -0
  133. data/glfw-src/lib/win32/libglfw.pc.in +11 -0
  134. data/glfw-src/lib/win32/platform.h +474 -0
  135. data/glfw-src/lib/win32/win32_dllmain.c +60 -0
  136. data/glfw-src/lib/win32/win32_enable.c +155 -0
  137. data/glfw-src/lib/win32/win32_fullscreen.c +317 -0
  138. data/glfw-src/lib/win32/win32_glext.c +85 -0
  139. data/glfw-src/lib/win32/win32_init.c +356 -0
  140. data/glfw-src/lib/win32/win32_joystick.c +234 -0
  141. data/glfw-src/lib/win32/win32_thread.c +511 -0
  142. data/glfw-src/lib/win32/win32_time.c +146 -0
  143. data/glfw-src/lib/win32/win32_window.c +1714 -0
  144. data/glfw-src/lib/window.c +727 -0
  145. data/glfw-src/lib/x11/Makefile.x11.in +243 -0
  146. data/glfw-src/lib/x11/platform.h +415 -0
  147. data/glfw-src/lib/x11/x11_enable.c +51 -0
  148. data/glfw-src/lib/x11/x11_fullscreen.c +524 -0
  149. data/glfw-src/lib/x11/x11_glext.c +69 -0
  150. data/glfw-src/lib/x11/x11_init.c +275 -0
  151. data/glfw-src/lib/x11/x11_joystick.c +371 -0
  152. data/glfw-src/lib/x11/x11_keysym2unicode.c +902 -0
  153. data/glfw-src/lib/x11/x11_thread.c +507 -0
  154. data/glfw-src/lib/x11/x11_time.c +154 -0
  155. data/glfw-src/lib/x11/x11_window.c +1746 -0
  156. data/glfw-src/license.txt +21 -0
  157. data/glfw-src/readme.html +927 -0
  158. data/glfw-src/support/d/examples/Makefile +59 -0
  159. data/glfw-src/support/d/examples/boing.d +610 -0
  160. data/glfw-src/support/d/examples/gears.d +379 -0
  161. data/glfw-src/support/d/examples/keytest.d +272 -0
  162. data/glfw-src/support/d/examples/listmodes.d +48 -0
  163. data/glfw-src/support/d/examples/mipmaps.d +126 -0
  164. data/glfw-src/support/d/examples/mtbench.d +304 -0
  165. data/glfw-src/support/d/examples/mthello.d +54 -0
  166. data/glfw-src/support/d/examples/particles.d +1150 -0
  167. data/glfw-src/support/d/examples/pong3d.d +840 -0
  168. data/glfw-src/support/d/examples/splitview.d +486 -0
  169. data/glfw-src/support/d/examples/triangle.d +108 -0
  170. data/glfw-src/support/d/examples/wave.d +400 -0
  171. data/glfw-src/support/d/imports/gl.d +4539 -0
  172. data/glfw-src/support/d/imports/glfw.d +349 -0
  173. data/glfw-src/support/d/imports/glu.d +328 -0
  174. data/glfw-src/support/d/lib/glfwdll.def +64 -0
  175. data/glfw-src/support/d/lib/glu32.def +56 -0
  176. data/glfw-src/support/d/lib/makefile +12 -0
  177. data/glfw-src/support/d/lib/opengl32.def +372 -0
  178. data/glfw-src/support/d/readme.html +83 -0
  179. data/glfw-src/support/delphi/examples/Triangle.dpr +105 -0
  180. data/glfw-src/support/delphi/lib/glfw.pas +437 -0
  181. data/glfw-src/support/delphi/readme.html +97 -0
  182. data/glfw-src/support/lua/examples/gears.lua +383 -0
  183. data/glfw-src/support/lua/examples/test1.lua +68 -0
  184. data/glfw-src/support/lua/readme.html +128 -0
  185. data/glfw-src/support/lua/src/luaglfw.c +1179 -0
  186. data/glfw-src/support/lua/src/luaglfw.h +48 -0
  187. data/glfw-src/support/lua/src/runlua.c +82 -0
  188. data/glfw-src/support/masm/examples/fpc.mac +47 -0
  189. data/glfw-src/support/masm/examples/makeit.bat +66 -0
  190. data/glfw-src/support/masm/examples/triangle.asm +232 -0
  191. data/glfw-src/support/masm/include/glfw.inc +326 -0
  192. data/glfw-src/support/masm/include/glu32.inc +55 -0
  193. data/glfw-src/support/masm/include/opengl32.inc +372 -0
  194. data/glfw-src/support/masm/lib/glfwdll.lib +0 -0
  195. data/glfw-src/support/masm/readme.html +170 -0
  196. data/glfw-src/support/msvc80/GLFW.sln +26 -0
  197. data/glfw-src/support/msvc80/GLFW.vcproj +257 -0
  198. data/glfw-src/support/msvc80/GLFWDLL.vcproj +287 -0
  199. data/glfw-src/support/visualbasic/bindings/glfw.bas +320 -0
  200. data/glfw-src/support/visualbasic/bindings/glu32.bas +284 -0
  201. data/glfw-src/support/visualbasic/bindings/opengl32.bas +999 -0
  202. data/glfw-src/support/visualbasic/examples/Triangle.bas +101 -0
  203. data/glfw-src/support/visualbasic/readme.html +164 -0
  204. data/website/index.html +84 -0
  205. data/website/style.css +110 -0
  206. metadata +301 -0
@@ -0,0 +1,70 @@
1
+ # Copyright (C) 2007 Jan Dvorak <jan.dvorak@kraxnet.cz>
2
+ #
3
+ # This software is provided 'as-is', without any express or implied
4
+ # warranty. In no event will the authors be held liable for any damages
5
+ # arising from the use of this software.
6
+ # Permission is granted to anyone to use this software for any purpose,
7
+ # including commercial applications, and to alter it and redistribute it
8
+ # freely, subject to the following restrictions:
9
+ #
10
+ # 1. The origin of this software must not be misrepresented; you must not
11
+ # claim that you wrote the original software. If you use this software
12
+ # in a product, an acknowledgment in the product documentation would be
13
+ # appreciated but is not required.
14
+ #
15
+ # 2. Altered source versions must be plainly marked as such, and must not be
16
+ # misrepresented as being the original software.
17
+ #
18
+ # 3. This notice may not be removed or altered from any source distribution.
19
+
20
+ require 'rubygems'
21
+ require 'mkrf'
22
+ require 'rbconfig'
23
+
24
+ # where are the GLFW sources, relative to build directory
25
+ $glfw_dir = "../../glfw-src"
26
+ $glfw_dir_lib = $glfw_dir + "/lib"
27
+ $glfw_dir_inc = $glfw_dir + "/include"
28
+
29
+ # parses options for compiler and linker from will-be-pkgconfig file
30
+ # created after compiling the bundled GLFW library itself
31
+ def parse_libglfwpcin(path)
32
+ libs = cflags = ""
33
+ f = File.open(path)
34
+ f.each do |line|
35
+ case line
36
+ when /Libs/
37
+ tmp = line.chop.split("-lglfw")
38
+ if tmp and tmp.size>=2
39
+ libs = tmp[1]
40
+ end
41
+ when /Cflags/
42
+ tmp = line.chop.split("}")
43
+ if tmp and tmp.size>=2
44
+ cflags = tmp[1]
45
+ end
46
+ end
47
+ end
48
+ [cflags,libs]
49
+ end
50
+
51
+ Mkrf::Generator.new( 'glfw' ) do |g|
52
+ case RUBY_PLATFORM
53
+ when /darwin/
54
+ cf,lib = parse_libglfwpcin($glfw_dir_lib + "/macosx/libglfw.pc.in")
55
+ g.objects << $glfw_dir_lib + "/macosx/libglfw.a"
56
+ g.cflags << ' -Wall -I' + $glfw_dir_inc + ' ' + cf
57
+ g.ldshared << ' -L' + $glfw_dir_lib + '/macosx/ ' + lib
58
+ when /mswin32/
59
+ g.objects << $glfw_dir_lib + "/win32/glfw.lib"
60
+ g.cflags << ' -DWIN32 -I' + $glfw_dir_inc + ' '
61
+ g.ldshared << ' /NODEFAULTLIB:LIBC '
62
+ g.include_library( 'glu32.lib', '')
63
+ g.include_library( 'opengl32.lib', '')
64
+ else # general posix-x11
65
+ cf,lib = parse_libglfwpcin($glfw_dir_lib + "/x11/libglfw.pc.in")
66
+ g.objects << $glfw_dir_lib + "/x11/libglfw.a"
67
+ g.cflags << ' -Wall -I' + $glfw_dir_inc + ' ' + cf
68
+ g.ldshared << ' -L' + $glfw_dir_lib + '/x11/ ' + lib
69
+ end
70
+ end
@@ -0,0 +1,220 @@
1
+ ###########################################################################
2
+ # GLFW top level Makefile
3
+ # $Date: 2007/03/30 20:17:42 $
4
+ # $Revision: 1.10 $
5
+ #
6
+ # This file works as a top level makefile for all supported systems and
7
+ # compilers. It builds both the GLFW link library and the supplied example
8
+ # programs.
9
+ ###########################################################################
10
+
11
+ ###########################################################################
12
+ # If your make program does not set the $(MAKE) variable correctly,
13
+ # uncomment the following line and make sure that the name of the make
14
+ # tool is correct.
15
+ ###########################################################################
16
+ # MAKE = make
17
+
18
+
19
+ ###########################################################################
20
+ # If no system/compiler is specified, display a list of available options
21
+ ###########################################################################
22
+ default:
23
+ @echo "This is the makefile for the GLFW link library and example programs."
24
+ @echo "Type one of the following:"
25
+ @echo "-----------------------------------------------------------------------------"
26
+ @echo " $(MAKE) win32-mgw for MinGW32 for Windows"
27
+ @echo " $(MAKE) cross-mgw for MinGW32 for Windows on a Unix machine"
28
+ @echo " $(MAKE) cross-mgw-install to install the GLFW library and header"
29
+ @echo " $(MAKE) cross-mgw-clean fo clean the GLFW library and header"
30
+ @echo " $(MAKE) win32-cygwin for Cygwin for Windows"
31
+ @echo " $(MAKE) win32-lcc for LCC-Win32 for Windows"
32
+ @echo " $(MAKE) win32-bcc for Borland C++ Builder 5.x for Windows"
33
+ @echo " $(MAKE) win32-msvc for MS Visual C++ 6.x for Windows"
34
+ @echo " $(MAKE) win32-ow for OpenWatcom for Windows"
35
+ @echo " $(MAKE) win32-pellesc for Pelles C for Windows"
36
+ @echo " $(MAKE) win32-clean to remove any compiled files for Windows"
37
+ @echo " $(MAKE) cygwin-clean to remove any compiled files for Cygwin/Windows"
38
+ @echo " $(MAKE) cygwin-install to install the GLFW library and header into Cygwin"
39
+ @echo "-----------------------------------------------------------------------------"
40
+ @echo " $(MAKE) x11 for Unix/X11 (auto-configuring)"
41
+ @echo " $(MAKE) x11-clean to remove any compiled files for Unix/X11"
42
+ @echo " $(MAKE) x11-install to install the GLFW library and header"
43
+ @echo "-----------------------------------------------------------------------------"
44
+ @echo " $(MAKE) macosx-gcc for GCC for Mac OS X (free Apple SDK)"
45
+ @echo " $(MAKE) macosx-clean to remove any compiled files for Mac OS X"
46
+ @echo " $(MAKE) macosx-install to install the GLFW library and header"
47
+ @echo "-----------------------------------------------------------------------------"
48
+ @echo " $(MAKE) amigaos-gcc for AmigaOS for GCC (Geek Gadgets)"
49
+ @echo " $(MAKE) amigaos-vbcc for AmigaOS for VBCC"
50
+ @echo " $(MAKE) amigaos-clean to remove any compiled files for AmigaOS"
51
+ @echo "-----------------------------------------------------------------------------"
52
+ @echo " $(MAKE) dos-djgpp for DOS for DJGPP"
53
+ @echo " $(MAKE) dos-clean to remove any compiled files for DOS"
54
+ @echo "-----------------------------------------------------------------------------"
55
+
56
+
57
+ ###########################################################################
58
+ # List of example programs (used for cleanup)
59
+ ###########################################################################
60
+ EXAMPLES = boing \
61
+ gears \
62
+ keytest \
63
+ listmodes \
64
+ mipmaps \
65
+ mtbench \
66
+ mthello \
67
+ particles \
68
+ pong3d \
69
+ splitview \
70
+ triangle \
71
+ wave
72
+
73
+
74
+ ###########################################################################
75
+ # Windows
76
+ ###########################################################################
77
+
78
+ # Cleanup for Windows
79
+ win32-clean:
80
+ @.\\compile.bat CLEAN
81
+
82
+ # Cleanup for Cygwin (Cygwin Make does not support local BAT-files)
83
+ cygwin-clean:
84
+ cd lib/win32 && $(MAKE) -f Makefile.win32.cygwin clean
85
+ cd examples && $(MAKE) -f Makefile.win32.cygwin clean
86
+
87
+ cygwin-install: win32-cygwin
88
+ cd lib/win32 && $(MAKE) -f Makefile.win32.cygwin install
89
+
90
+ # Cleanup for MinGW32 Cross compilation from Unix
91
+ cross-mgw-install: cross-mgw
92
+ cd lib/win32 && $(MAKE) -f Makefile.win32.cross-mgw install
93
+
94
+ cross-mgw-clean:
95
+ cd lib/win32 && $(MAKE) -f Makefile.win32.cross-mgw clean
96
+ cd examples && $(MAKE) -f Makefile.win32.cross-mgw clean
97
+
98
+
99
+ # Windows, MinGW32
100
+ win32-mgw:
101
+ @./compile.bat $(MAKE) mgw
102
+
103
+ # Cross compilation from unix to win32
104
+ cross-mgw:
105
+ cd lib/win32 && $(MAKE) -f Makefile.win32.cross-mgw
106
+ cd examples && $(MAKE) -f Makefile.win32.cross-mgw
107
+
108
+ # Windows, Cygwin (Cygwin Make does not support local BAT-files)
109
+ win32-cygwin:
110
+ cd lib/win32 && $(MAKE) -f Makefile.win32.cygwin
111
+ cd examples && $(MAKE) -f Makefile.win32.cygwin
112
+
113
+ # Windows, LCC-Win32
114
+ win32-lcc:
115
+ @.\\compile.bat $(MAKE) lcc
116
+
117
+ # Windows, Borland C++ Builder Compiler 5.x
118
+ win32-bcc:
119
+ @.\\compile.bat $(MAKE) bcc
120
+
121
+ # Windows, Microsoft Visual C++
122
+ win32-msvc:
123
+ @.\\compile.bat $(MAKE) msvc
124
+
125
+ # Windows, OpenWatcom
126
+ win32-ow:
127
+ @.\\compile.bat $(MAKE) ow
128
+
129
+ # Windows, Pelles C
130
+ win32-pellesc:
131
+ @.\\compile.bat $(MAKE) pellesc
132
+
133
+
134
+ ###########################################################################
135
+ # X11 (Unix and Unix-like systems)
136
+ ###########################################################################
137
+
138
+ MAKEFILES_X11_IN = lib/x11/Makefile.x11.in examples/Makefile.x11.in
139
+ MAKEFILES_X11 = lib/x11/Makefile.x11 examples/Makefile.x11
140
+
141
+ # Cleanup for X11 (must be here due to generated makefile)
142
+ x11-clean:
143
+ rm -f $(MAKEFILES_X11)
144
+ rm -f config.log
145
+ rm -f lib/x11/*.o
146
+ rm -f lib/x11/libglfw.a
147
+ rm -f lib/x11/libglfw.so
148
+ rm -f lib/x11/libglfw.pc
149
+ rm -f lib/x11/libglfw.pc.in
150
+ cd examples; rm -f $(EXAMPLES)
151
+
152
+ # Auto configuration for X11
153
+ $(MAKEFILES_X11) : compile.sh $(MAKEFILES_X11_IN)
154
+ @sh ./compile.sh
155
+
156
+ # X11
157
+ x11: $(MAKEFILES_X11)
158
+ cd lib/x11; $(MAKE) -f Makefile.x11
159
+ cd examples; $(MAKE) -f Makefile.x11
160
+
161
+ # X11 install
162
+ x11-install: x11
163
+ cd lib/x11; $(MAKE) -f Makefile.x11 install
164
+
165
+
166
+ ###########################################################################
167
+ # Mac OS X
168
+ ###########################################################################
169
+
170
+ # Cleanup for Mac OS X
171
+ macosx-clean:
172
+ cd lib/macosx; $(MAKE) -f Makefile.macosx.gcc clean
173
+ cd examples; $(MAKE) -f Makefile.macosx.gcc clean
174
+
175
+ # Mac OS X, GCC
176
+ macosx-gcc: macosx-gcc-library macosx-gcc-examples
177
+
178
+ macosx-gcc-library:
179
+ cd lib/macosx; $(MAKE) -f Makefile.macosx.gcc
180
+
181
+ macosx-gcc-examples:
182
+ cd examples; $(MAKE) -f Makefile.macosx.gcc
183
+
184
+ # Mac OS X, GCC install
185
+ macosx-install: macosx-gcc-library
186
+ cd lib/macosx; $(MAKE) -f Makefile.macosx.gcc install
187
+
188
+
189
+ ###########################################################################
190
+ # AmigaOS
191
+ ###########################################################################
192
+
193
+ # Cleanup for AmigaOS
194
+ amigaos-clean:
195
+ @execute compile.ami CLEAN
196
+
197
+ # AmigaOS, VBCC
198
+ amigaos-vbcc:
199
+ @execute compile.ami $(MAKE) vbcc
200
+
201
+ # AmigaOS, GCC
202
+ amigaos-gcc:
203
+ @execute compile.ami $(MAKE) gcc
204
+
205
+
206
+ ###########################################################################
207
+ # DOS
208
+ ###########################################################################
209
+
210
+ # Cleanup for DOS
211
+ dos-clean:
212
+ @rm -f lib/dos/*.o
213
+ @rm -f lib/dos/libglfw.a
214
+ @rm -f examples/*.exe
215
+
216
+ # DOS, DJGPP (GCC)
217
+ dos-djgpp:
218
+ @cd lib\dos; $(MAKE) -f Makefile.dos.djgpp
219
+ @cd examples; $(MAKE) -f Makefile.dos.djgpp
220
+
@@ -0,0 +1,61 @@
1
+ .key MAKE,COMPILER
2
+ .bra {
3
+ .ket }
4
+
5
+ ;*************************************************************************
6
+ ;* compile.ami - AmigaDOS compilation script
7
+ ;* $Date: 2003/02/02 20:51:40 $
8
+ ;* $Revision: 1.2 $
9
+ ;*
10
+ ;* This is a "helper" script for the top-level Makefile for GLFW.
11
+ ;*
12
+ ;* Usage 1: compile MAKEPROG SUFFIX
13
+ ;*
14
+ ;* MAKEPROG Name of make program (e.g. make or nmake)
15
+ ;* SUFFIX Makefile suffix for a specific compiler (e.g. msvc)
16
+ ;*
17
+ ;* Usage 2: compile CLEAN
18
+ ;*************************************************************************
19
+
20
+ ; Do we want to do a cleanup?
21
+ IF "{MAKE}" EQ "CLEAN"
22
+ Echo "Cleaning up..."
23
+ delete >NIL: lib/amigaos/#?.o QUIET
24
+ delete >NIL: lib/amigaos/glfw.lib QUIET
25
+ delete >NIL: lib/amigaos/libglfw.a QUIET
26
+ delete >NIL: examples/boing QUIET
27
+ delete >NIL: examples/gears QUIET
28
+ delete >NIL: examples/keytest QUIET
29
+ delete >NIL: examples/listmodes QUIET
30
+ delete >NIL: examples/mipmaps QUIET
31
+ delete >NIL: examples/mtbench QUIET
32
+ delete >NIL: examples/mthello QUIET
33
+ delete >NIL: examples/particles QUIET
34
+ delete >NIL: examples/pong3d QUIET
35
+ delete >NIL: examples/splitview QUIET
36
+ delete >NIL: examples/triangle QUIET
37
+ delete >NIL: examples/wave QUIET
38
+ Skip done
39
+ EndIF
40
+
41
+ ; Did we get a proper make program name?
42
+ IF "{COMPILER}" EQ ""
43
+ echo >T:mymake{$$} "make -f Makefile.amigaos.{MAKE}"
44
+ Else
45
+ echo >T:mymake{$$} "{MAKE} -f Makefile.amigaos.{COMPILER}"
46
+ EndIF
47
+ protect T:mymake{$$} SRWED add
48
+
49
+ ; Compile GLFW library
50
+ cd lib/amigaos
51
+ T:mymake{$$}
52
+
53
+ ; Compiler GLFW example programs
54
+ cd //examples
55
+ T:mymake{$$}
56
+ cd /
57
+
58
+ ; Remove temporary file
59
+ delete >NIL: T:mymake{$$} QUIET
60
+
61
+ Lab done
@@ -0,0 +1,217 @@
1
+ @echo off
2
+
3
+ REM **********************************************************************
4
+ REM * compile.bat - MS Windows compilation batch file
5
+ REM * $Date: 2007/03/15 03:20:18 $
6
+ REM * $Revision: 1.3 $
7
+ REM *
8
+ REM * This is a "helper" script for the top-level Makefile for GLFW.
9
+ REM * It was introduced to eliminate incompability issues between
10
+ REM * Windows NT, 2000 and 9x (it's easier to make a script/makefile
11
+ REM * run accross different unices from different vendors than to make
12
+ REM * a script/makefile run across different Windows versions from
13
+ REM * Microsoft!).
14
+ REM *
15
+ REM * This batch file has been tested under Windows 98, NT 4.0 and 2k.
16
+ REM *
17
+ REM * Usage 1: compile MAKEPROG SUFFIX
18
+ REM *
19
+ REM * MAKEPROG Name of make program (e.g. make or nmake)
20
+ REM * SUFFIX Makefile suffix for a specific compiler (e.g. msvc)
21
+ REM *
22
+ REM * Usage 2: compile CLEAN
23
+ REM **********************************************************************
24
+
25
+ REM ----------------------------------------------------------------------
26
+ REM Check input arguments
27
+ REM ----------------------------------------------------------------------
28
+
29
+ IF %1 == CLEAN GOTO Cleanup
30
+ IF %1 == "" GOTO Error1
31
+ IF "%2" == "" GOTO Error1
32
+ IF NOT EXIST .\lib\win32\Makefile.win32.%2 GOTO Error2
33
+ GOTO ArgsOK
34
+
35
+ :Error1
36
+ echo *************************************************************************
37
+ echo *** NOTE: THIS PROGRAM IS USED BY THE TOP LEVEL MAKEFILE. ***
38
+ echo *** PLEASE READ 'README.HTML' FOR INFORMATION ON HOW TO COMPILE GLFW! ***
39
+ echo *************************************************************************
40
+ echo Usage 1: %0 MAKEPROG SUFFIX
41
+ echo MAKEPROG - Name of make program (e.g. make or nmake)
42
+ echo SUFFIX - Makefile suffix for a specific compiler (e.g. mgw or msvc)
43
+ echo Usage 2: %0 CLEAN
44
+ goto End
45
+
46
+ :Error2
47
+ echo "%2" is not a vaild Makefile suffix
48
+ goto End
49
+
50
+ :ArgsOK
51
+
52
+ REM ----------------------------------------------------------------------
53
+ REM Build GLFW library (both static and dynamic, where supported)
54
+ REM ----------------------------------------------------------------------
55
+
56
+ cd .\lib\win32
57
+ %1 -f Makefile.win32.%2
58
+
59
+
60
+ REM ----------------------------------------------------------------------
61
+ REM Build example programs
62
+ REM ----------------------------------------------------------------------
63
+
64
+ cd ..\..\examples
65
+ %1 -f Makefile.win32.%2
66
+
67
+
68
+ REM ----------------------------------------------------------------------
69
+ REM Return to root directory
70
+ REM ----------------------------------------------------------------------
71
+
72
+ cd ..
73
+ GOTO End
74
+
75
+
76
+
77
+ REM ----------------------------------------------------------------------
78
+ REM Clean up compiled files
79
+ REM ----------------------------------------------------------------------
80
+
81
+ :Cleanup
82
+
83
+ REM Library object files
84
+ IF EXIST .\lib\win32\enable.o del .\lib\win32\enable.o
85
+ IF EXIST .\lib\win32\fullscreen.o del .\lib\win32\fullscreen.o
86
+ IF EXIST .\lib\win32\glext.o del .\lib\win32\glext.o
87
+ IF EXIST .\lib\win32\image.o del .\lib\win32\image.o
88
+ IF EXIST .\lib\win32\init.o del .\lib\win32\init.o
89
+ IF EXIST .\lib\win32\input.o del .\lib\win32\input.o
90
+ IF EXIST .\lib\win32\joystick.o del .\lib\win32\joystick.o
91
+ IF EXIST .\lib\win32\tga.o del .\lib\win32\tga.o
92
+ IF EXIST .\lib\win32\thread.o del .\lib\win32\thread.o
93
+ IF EXIST .\lib\win32\time.o del .\lib\win32\time.o
94
+ IF EXIST .\lib\win32\window.o del .\lib\win32\window.o
95
+ IF EXIST .\lib\win32\win32_enable.o del .\lib\win32\win32_enable.o
96
+ IF EXIST .\lib\win32\win32_fullscreen.o del .\lib\win32\win32_fullscreen.o
97
+ IF EXIST .\lib\win32\win32_glext.o del .\lib\win32\win32_glext.o
98
+ IF EXIST .\lib\win32\win32_init.o del .\lib\win32\win32_init.o
99
+ IF EXIST .\lib\win32\win32_joystick.o del .\lib\win32\win32_joystick.o
100
+ IF EXIST .\lib\win32\win32_thread.o del .\lib\win32\win32_thread.o
101
+ IF EXIST .\lib\win32\win32_time.o del .\lib\win32\win32_time.o
102
+ IF EXIST .\lib\win32\win32_window.o del .\lib\win32\win32_window.o
103
+
104
+ IF EXIST .\lib\win32\enable_dll.o del .\lib\win32\enable_dll.o
105
+ IF EXIST .\lib\win32\fullscreen_dll.o del .\lib\win32\fullscreen_dll.o
106
+ IF EXIST .\lib\win32\glext_dll.o del .\lib\win32\glext_dll.o
107
+ IF EXIST .\lib\win32\image_dll.o del .\lib\win32\image_dll.o
108
+ IF EXIST .\lib\win32\init_dll.o del .\lib\win32\init_dll.o
109
+ IF EXIST .\lib\win32\input_dll.o del .\lib\win32\input_dll.o
110
+ IF EXIST .\lib\win32\joystick_dll.o del .\lib\win32\joystick_dll.o
111
+ IF EXIST .\lib\win32\tga_dll.o del .\lib\win32\tga_dll.o
112
+ IF EXIST .\lib\win32\thread_dll.o del .\lib\win32\thread_dll.o
113
+ IF EXIST .\lib\win32\time_dll.o del .\lib\win32\time_dll.o
114
+ IF EXIST .\lib\win32\window_dll.o del .\lib\win32\window_dll.o
115
+ IF EXIST .\lib\win32\win32_dllmain_dll.o del .\lib\win32\win32_dllmain_dll.o
116
+ IF EXIST .\lib\win32\win32_enable_dll.o del .\lib\win32\win32_enable_dll.o
117
+ IF EXIST .\lib\win32\win32_fullscreen_dll.o del .\lib\win32\win32_fullscreen_dll.o
118
+ IF EXIST .\lib\win32\win32_glext_dll.o del .\lib\win32\win32_glext_dll.o
119
+ IF EXIST .\lib\win32\win32_init_dll.o del .\lib\win32\win32_init_dll.o
120
+ IF EXIST .\lib\win32\win32_joystick_dll.o del .\lib\win32\win32_joystick_dll.o
121
+ IF EXIST .\lib\win32\win32_thread_dll.o del .\lib\win32\win32_thread_dll.o
122
+ IF EXIST .\lib\win32\win32_time_dll.o del .\lib\win32\win32_time_dll.o
123
+ IF EXIST .\lib\win32\win32_window_dll.o del .\lib\win32\win32_window_dll.o
124
+
125
+ IF EXIST .\lib\win32\enable.obj del .\lib\win32\enable.obj
126
+ IF EXIST .\lib\win32\fullscreen.obj del .\lib\win32\fullscreen.obj
127
+ IF EXIST .\lib\win32\glext.obj del .\lib\win32\glext.obj
128
+ IF EXIST .\lib\win32\image.obj del .\lib\win32\image.obj
129
+ IF EXIST .\lib\win32\init.obj del .\lib\win32\init.obj
130
+ IF EXIST .\lib\win32\input.obj del .\lib\win32\input.obj
131
+ IF EXIST .\lib\win32\joystick.obj del .\lib\win32\joystick.obj
132
+ IF EXIST .\lib\win32\tga.obj del .\lib\win32\tga.obj
133
+ IF EXIST .\lib\win32\thread.obj del .\lib\win32\thread.obj
134
+ IF EXIST .\lib\win32\time.obj del .\lib\win32\time.obj
135
+ IF EXIST .\lib\win32\window.obj del .\lib\win32\window.obj
136
+ IF EXIST .\lib\win32\win32_enable.obj del .\lib\win32\win32_enable.obj
137
+ IF EXIST .\lib\win32\win32_fullscreen.obj del .\lib\win32\win32_fullscreen.obj
138
+ IF EXIST .\lib\win32\win32_glext.obj del .\lib\win32\win32_glext.obj
139
+ IF EXIST .\lib\win32\win32_init.obj del .\lib\win32\win32_init.obj
140
+ IF EXIST .\lib\win32\win32_joystick.obj del .\lib\win32\win32_joystick.obj
141
+ IF EXIST .\lib\win32\win32_thread.obj del .\lib\win32\win32_thread.obj
142
+ IF EXIST .\lib\win32\win32_time.obj del .\lib\win32\win32_time.obj
143
+ IF EXIST .\lib\win32\win32_window.obj del .\lib\win32\win32_window.obj
144
+
145
+ IF EXIST .\lib\win32\enable_dll.obj del .\lib\win32\enable_dll.obj
146
+ IF EXIST .\lib\win32\fullscreen_dll.obj del .\lib\win32\fullscreen_dll.obj
147
+ IF EXIST .\lib\win32\glext_dll.obj del .\lib\win32\glext_dll.obj
148
+ IF EXIST .\lib\win32\image_dll.obj del .\lib\win32\image_dll.obj
149
+ IF EXIST .\lib\win32\init_dll.obj del .\lib\win32\init_dll.obj
150
+ IF EXIST .\lib\win32\input_dll.obj del .\lib\win32\input_dll.obj
151
+ IF EXIST .\lib\win32\joystick_dll.obj del .\lib\win32\joystick_dll.obj
152
+ IF EXIST .\lib\win32\tga_dll.obj del .\lib\win32\tga_dll.obj
153
+ IF EXIST .\lib\win32\thread_dll.obj del .\lib\win32\thread_dll.obj
154
+ IF EXIST .\lib\win32\time_dll.obj del .\lib\win32\time_dll.obj
155
+ IF EXIST .\lib\win32\window_dll.obj del .\lib\win32\window_dll.obj
156
+ IF EXIST .\lib\win32\win32_dllmain_dll.obj del .\lib\win32\win32_dllmain_dll.obj
157
+ IF EXIST .\lib\win32\win32_enable_dll.obj del .\lib\win32\win32_enable_dll.obj
158
+ IF EXIST .\lib\win32\win32_fullscreen_dll.obj del .\lib\win32\win32_fullscreen_dll.obj
159
+ IF EXIST .\lib\win32\win32_glext_dll.obj del .\lib\win32\win32_glext_dll.obj
160
+ IF EXIST .\lib\win32\win32_init_dll.obj del .\lib\win32\win32_init_dll.obj
161
+ IF EXIST .\lib\win32\win32_joystick_dll.obj del .\lib\win32\win32_joystick_dll.obj
162
+ IF EXIST .\lib\win32\win32_thread_dll.obj del .\lib\win32\win32_thread_dll.obj
163
+ IF EXIST .\lib\win32\win32_time_dll.obj del .\lib\win32\win32_time_dll.obj
164
+ IF EXIST .\lib\win32\win32_window_dll.obj del .\lib\win32\win32_window_dll.obj
165
+
166
+ REM Library files
167
+ IF EXIST .\lib\win32\libglfw.a del .\lib\win32\libglfw.a
168
+ IF EXIST .\lib\win32\libglfwdll.a del .\lib\win32\libglfwdll.a
169
+ IF EXIST .\lib\win32\glfw.exp del .\lib\win32\glfw.exp
170
+ IF EXIST .\lib\win32\glfwdll.exp del .\lib\win32\glfwdll.exp
171
+ IF EXIST .\lib\win32\glfw.lib del .\lib\win32\glfw.lib
172
+ IF EXIST .\lib\win32\glfwdll.lib del .\lib\win32\glfwdll.lib
173
+ IF EXIST .\lib\win32\glfw.dll del .\lib\win32\glfw.dll
174
+ IF EXIST .\lib\win32\glfw.tds del .\lib\win32\glfw.tds
175
+ IF EXIST .\lib\win32\init.tds del .\lib\win32\init.tds
176
+
177
+ REM Executables and related files
178
+ IF EXIST .\examples\boing.exe del .\examples\boing.exe
179
+ IF EXIST .\examples\gears.exe del .\examples\gears.exe
180
+ IF EXIST .\examples\keytest.exe del .\examples\keytest.exe
181
+ IF EXIST .\examples\listmodes.exe del .\examples\listmodes.exe
182
+ IF EXIST .\examples\mipmaps.exe del .\examples\mipmaps.exe
183
+ IF EXIST .\examples\mtbench.exe del .\examples\mtbench.exe
184
+ IF EXIST .\examples\mthello.exe del .\examples\mthello.exe
185
+ IF EXIST .\examples\particles.exe del .\examples\particles.exe
186
+ IF EXIST .\examples\pong3d.exe del .\examples\pong3d.exe
187
+ IF EXIST .\examples\splitview.exe del .\examples\splitview.exe
188
+ IF EXIST .\examples\triangle.exe del .\examples\triangle.exe
189
+ IF EXIST .\examples\wave.exe del .\examples\wave.exe
190
+
191
+ IF EXIST .\examples\boing.obj del .\examples\boing.obj
192
+ IF EXIST .\examples\gears.obj del .\examples\gears.obj
193
+ IF EXIST .\examples\keytest.obj del .\examples\keytest.obj
194
+ IF EXIST .\examples\listmodes.obj del .\examples\listmodes.obj
195
+ IF EXIST .\examples\mipmaps.obj del .\examples\mipmaps.obj
196
+ IF EXIST .\examples\mtbench.obj del .\examples\mtbench.obj
197
+ IF EXIST .\examples\mthello.obj del .\examples\mthello.obj
198
+ IF EXIST .\examples\particles.obj del .\examples\particles.obj
199
+ IF EXIST .\examples\pong3d.obj del .\examples\pong3d.obj
200
+ IF EXIST .\examples\splitview.obj del .\examples\splitview.obj
201
+ IF EXIST .\examples\triangle.obj del .\examples\triangle.obj
202
+ IF EXIST .\examples\wave.obj del .\examples\wave.obj
203
+
204
+ IF EXIST .\examples\boing.tds del .\examples\boing.tds
205
+ IF EXIST .\examples\gears.tds del .\examples\gears.tds
206
+ IF EXIST .\examples\keytest.tds del .\examples\keytest.tds
207
+ IF EXIST .\examples\listmodes.tds del .\examples\listmodes.tds
208
+ IF EXIST .\examples\mipmaps.tds del .\examples\mipmaps.tds
209
+ IF EXIST .\examples\mtbench.tds del .\examples\mtbench.tds
210
+ IF EXIST .\examples\mthello.tds del .\examples\mthello.tds
211
+ IF EXIST .\examples\particles.tds del .\examples\particles.tds
212
+ IF EXIST .\examples\pong3d.tds del .\examples\pong3d.tds
213
+ IF EXIST .\examples\splitview.tds del .\examples\splitview.tds
214
+ IF EXIST .\examples\triangle.tds del .\examples\triangle.tds
215
+ IF EXIST .\examples\wave.tds del .\examples\wave.tds
216
+
217
+ :End