Makefile 13.9 KB
Newer Older
ikits's avatar
ikits committed
1
2
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
ikits's avatar
ikits committed
3
4
5
6
##
## This program is distributed under the terms and conditions of the GNU
## General Public License Version 2 as published by the Free Software
## Foundation or, at your option, any later version.
mem's avatar
mem committed
7

mem's avatar
mem committed
8
include ../config/version
mem's avatar
mem committed
9

10
11
#GLEW_SPLIT_SOURCE = yes

12
SHELL = bash
13
PYTHON ?= python
14
15
16
17

EXT          = extensions/gl
CORE         = core/gl

18
19
20
BIN = bin
SRC = src
BLACKLIST = blacklist
mem's avatar
mem committed
21

ikits's avatar
ikits committed
22
23
GL_CORE_SPEC := $(CORE)/GL_VERSION*
GLX_CORE_SPEC := $(CORE)/GLX_VERSION*
24
EGL_CORE_SPEC := $(CORE)/EGL_VERSION*
ikits's avatar
ikits committed
25
ifeq (custom,$(MAKECMDGOALS))
26
27
28
29
30
#GL_CORE_SPEC  := $(shell grep GL_VERSION custom.txt    |                       perl -pi -e "s=^=$(CORE)/=g;")
GL_EXT_SPEC    := $(shell grep "^[ \t]*GL_" custom.txt  | grep -v GL_VERSION  | perl -pi -e "s=^=$(EXT)/=g;")
WGL_EXT_SPEC   := $(shell grep "^[ \t]*WGL_" custom.txt |                       perl -pi -e "s=^=$(EXT)/=g;")
#GLX_CORE_SPEC := $(shell grep GLX_VERSION custom.txt   |                       perl -pi -e "s=^=$(CORE)/=g;")
GLX_EXT_SPEC   := $(shell grep "^[ \t]*GLX_" custom.txt | grep -v GLX_VERSION | perl -pi -e "s=^=$(EXT)/=g;")
31
EGL_EXT_SPEC   := $(shell grep "^[ \t]*EGL_" custom.txt | grep -v EGL_VERSION | perl -pi -e "s=^=$(EXT)/=g;")
ikits's avatar
ikits committed
32
33
34
else
GL_EXT_SPEC := $(EXT)/GL_*
WGL_EXT_SPEC := $(EXT)/WGL_*
ikits's avatar
ikits committed
35
GLX_EXT_SPEC := $(EXT)/GLX_*
36
EGL_EXT_SPEC := $(EXT)/EGL_*
ikits's avatar
ikits committed
37
38
endif

39
PARSE_SPEC = parse_spec.pl
ikits's avatar
ikits committed
40
SYSTEM = $(strip $(shell uname -s))
41
42
43
44
45

TOP = ..
I.DEST = $(TOP)/include/GL
S.DEST = $(TOP)/src
D.DEST = $(TOP)/doc
46
B.DEST = $(TOP)/build
mem's avatar
mem committed
47

48
49
50
I.TARGETS = \
	$(I.DEST)/glew.h \
	$(I.DEST)/wglew.h \
51
52
	$(I.DEST)/glxew.h \
	$(I.DEST)/eglew.h
mem's avatar
mem committed
53

54
55
56
57
58
59
60
ifeq (yes,$(GLEW_SPLIT_SOURCE))
S.TARGETS = \
	$(S.DEST)/glew_def.c \
	$(S.DEST)/glew_init.c \
	$(S.DEST)/glew_str.c \
	$(S.DEST)/glewinfo.c
else
61
62
63
S.TARGETS = \
	$(S.DEST)/glew.c \
	$(S.DEST)/glewinfo.c
64
endif
65
66

D.TARGETS = \
67
68
69
70
	$(D.DEST)/index.html \
	$(D.DEST)/install.html \
	$(D.DEST)/basic.html \
	$(D.DEST)/advanced.html \
71
	$(D.DEST)/build.html \
72
73
	$(D.DEST)/credits.html \
	$(D.DEST)/log.html \
74
75
76
77
	$(D.DEST)/glew.html \
	$(D.DEST)/wglew.html \
	$(D.DEST)/glxew.html

78
79
80
81
82
B.TARGETS = \
	$(B.DEST)/glew.rc \
	$(B.DEST)/glewinfo.rc \
	$(B.DEST)/visualinfo.rc

ikits's avatar
ikits committed
83
all custom: $(I.TARGETS) $(S.TARGETS) $(D.TARGETS) $(B.TARGETS)
84

85
registry: OpenGL-Registry/.dummy
mem's avatar
mem committed
86
87
ext: $(EXT)/.dummy

88
OpenGL-Registry/.dummy:
89
	@echo "--------------------------------------------------------------------"
90
	@echo "Downloading OpenGL-Registry"
91
	@echo "--------------------------------------------------------------------"
92
93
	git clone https://github.com/KhronosGroup/OpenGL-Registry.git OpenGL-Registry
	git clone --branch glew https://github.com/nigels-com/glfixes glfixes
mem's avatar
mem committed
94
95
	touch $@

96
$(EXT)/.dummy: OpenGL-Registry/.dummy
97
98
99
	@echo "--------------------------------------------------------------------"
	@echo "Creating descriptors"
	@echo "--------------------------------------------------------------------"
100
	rm -rf $(EXT)
101
102
103
	cp -r glfixes/gl/specs/ANGLE OpenGL-Registry/extensions
	cp -r glfixes/gl/specs/REGAL OpenGL-Registry/extensions
	$(BIN)/update_ext.sh $(EXT) OpenGL-Registry/extensions $(BLACKLIST)
104
	$(PYTHON) $(BIN)/parse_xml.py registry/xml/egl.xml --core core/gl --extensions extensions/gl
105
	$(BIN)/filter_gl_ext.sh $(EXT)
ikits's avatar
ikits committed
106
ifeq ($(patsubst Darwin%,Darwin,$(SYSTEM)), Darwin)
ikits's avatar
ikits committed
107
108
	find $(CORE) -maxdepth 1 -type f | grep -v VERSION | grep -v "~" | \
	xargs -J % cp % $(EXT)
ikits's avatar
ikits committed
109
else
ikits's avatar
ikits committed
110
111
	find $(CORE) -maxdepth 1 -type f | grep -v VERSION | grep -v "~" | \
	xargs cp --target-directory=$(EXT)
ikits's avatar
ikits committed
112
endif
mem's avatar
mem committed
113
114
115
	touch $@

$(I.DEST)/glew.h: $(EXT)/.dummy
116
117
118
	@echo "--------------------------------------------------------------------"
	@echo "Creating glew.h"
	@echo "--------------------------------------------------------------------"
119
	test -d $(I.DEST) || mkdir -p $(I.DEST)
120
	cp -f $(SRC)/glew_license.h $@
ikits's avatar
ikits committed
121
122
	cat $(SRC)/mesa_license.h >> $@
	cat $(SRC)/khronos_license.h >> $@
123
	cat $(SRC)/glew_head.h >> $@
ikits's avatar
ikits committed
124
125
	$(BIN)/make_header.pl GLAPIENTRY GL $(GL_CORE_SPEC) >> $@
	$(BIN)/make_header.pl GLAPIENTRY GL $(GL_EXT_SPEC) >> $@
Nigel Stewart's avatar
Nigel Stewart committed
126
	echo -e "/* ------------------------------------------------------------------------- */\n\n" >> $@
ikits's avatar
ikits committed
127
128
	$(BIN)/make_struct_fun.pl GLEW_FUN_EXPORT $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@
	$(BIN)/make_struct_var.pl GLEW_VAR_EXPORT $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@
129
	perl -e "s/GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_2;/GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_1;\nGLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_2;/" -pi $@
130
	cat $(SRC)/glew_tail.h >> $@
131
132
133
134
135
	perl -e "s/GLEW_VERSION_STRING/$(GLEW_VERSION)/g" -pi $@
	perl -e "s/GLEW_VERSION_MAJOR_STRING/$(GLEW_MAJOR)/g" -pi $@
	perl -e "s/GLEW_VERSION_MINOR_STRING/$(GLEW_MINOR)/g" -pi $@
	perl -e "s/GLEW_VERSION_MICRO_STRING/$(GLEW_MICRO)/g" -pi $@
	rm -f $@.bak
mem's avatar
mem committed
136
137

$(I.DEST)/wglew.h: $(EXT)/.dummy
138
139
140
141
	@echo "--------------------------------------------------------------------"
	@echo "Creating wglew.h"
	@echo "--------------------------------------------------------------------"
	cp -f $(SRC)/glew_license.h $@
ikits's avatar
ikits committed
142
	cat $(SRC)/khronos_license.h >> $@
143
	cat $(SRC)/wglew_head.h >> $@
ikits's avatar
ikits committed
144
	$(BIN)/make_header.pl WINAPI WGL $(WGL_EXT_SPEC) >> $@
145
	cat $(SRC)/wglew_mid.h >> $@
146
147
	$(BIN)/make_struct_fun.pl WGLEW_FUN_EXPORT $(WGL_EXT_SPEC) >> $@
	$(BIN)/make_struct_var.pl WGLEW_VAR_EXPORT $(WGL_EXT_SPEC) >> $@
148
	cat $(SRC)/wglew_tail.h >> $@
mem's avatar
mem committed
149
150

$(I.DEST)/glxew.h: $(EXT)/.dummy
151
152
153
154
	@echo "--------------------------------------------------------------------"
	@echo "Creating glxew.h"
	@echo "--------------------------------------------------------------------"
	cp -f $(SRC)/glew_license.h $@
ikits's avatar
ikits committed
155
156
	cat $(SRC)/mesa_license.h >> $@
	cat $(SRC)/khronos_license.h >> $@
157
	cat $(SRC)/glxew_head.h >> $@
158
159
	$(BIN)/make_header.pl "" GLX $(GLX_CORE_SPEC) >> $@
	$(BIN)/make_header.pl "" GLX $(GLX_EXT_SPEC) >> $@
160
	cat $(SRC)/glxew_mid.h >> $@
161
162
	$(BIN)/make_struct_fun.pl GLXEW_FUN_EXPORT $(GLX_CORE_SPEC) $(GLX_EXT_SPEC) >> $@
	$(BIN)/make_struct_var.pl GLXEW_VAR_EXPORT $(GLX_CORE_SPEC) $(GLX_EXT_SPEC) >> $@
163
	perl -e "s/GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_2;/GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_0;\nGLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_1;\nGLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_2;/" -pi $@
164
	cat $(SRC)/glxew_tail.h >> $@
mem's avatar
mem committed
165

166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
$(I.DEST)/eglew.h: $(EXT)/.dummy
	@echo "--------------------------------------------------------------------"
	@echo "Creating eglew.h"
	@echo "--------------------------------------------------------------------"
	cp -f $(SRC)/glew_license.h $@
	cat $(SRC)/mesa_license.h >> $@
	cat $(SRC)/khronos_license.h >> $@
	cat $(SRC)/eglew_head.h >> $@
	$(BIN)/make_header.pl "" EGL $(EGL_CORE_SPEC) >> $@
	$(BIN)/make_header.pl "" EGL $(EGL_EXT_SPEC) >> $@
	cat $(SRC)/eglew_mid.h >> $@
	$(BIN)/make_struct_fun.pl EGLEW_FUN_EXPORT $(EGL_CORE_SPEC) $(EGL_EXT_SPEC) >> $@
	$(BIN)/make_struct_var.pl EGLEW_VAR_EXPORT $(EGL_CORE_SPEC) $(EGL_EXT_SPEC) >> $@
	cat $(SRC)/eglew_tail.h >> $@

181
182
183
184
185
186
$(S.DEST)/glew.c: $(EXT)/.dummy
	@echo "--------------------------------------------------------------------"
	@echo "Creating glew.c"
	@echo "--------------------------------------------------------------------"
	cp -f $(SRC)/glew_license.h $@
	cat $(SRC)/glew_head.c >> $@
ikits's avatar
ikits committed
187
188
	$(BIN)/make_def_fun.pl GL $(GL_CORE_SPEC) >> $@
	$(BIN)/make_def_fun.pl GL $(GL_EXT_SPEC) >> $@
189
	echo -e "\nGLboolean __GLEW_VERSION_1_1 = GL_FALSE;" >> $@
ikits's avatar
ikits committed
190
191
	$(BIN)/make_def_var.pl GL $(GL_CORE_SPEC) >> $@
	$(BIN)/make_def_var.pl GL $(GL_EXT_SPEC) >> $@
192
	echo -e "\nstatic const char * _glewExtensionLookup[] = {" >> $@;
193
	$(BIN)/make_index.pl $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@
194
195
	echo -e "  NULL\n};\n" >> $@;
	$(BIN)/make_enable_index.pl $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@
196
197
198
	$(BIN)/make_initd.pl GL $(GL_CORE_SPEC) >> $@
	$(BIN)/make_initd.pl GL $(GL_EXT_SPEC) >> $@
	echo -e "" >> $@;
ikits's avatar
ikits committed
199
200
	$(BIN)/make_init.pl GL $(GL_CORE_SPEC) >> $@
	$(BIN)/make_init.pl GL $(GL_EXT_SPEC) >> $@
201
	cat $(SRC)/glew_init_gl.c >> $@
202
203
	$(BIN)/make_list.pl $(GL_CORE_SPEC) | grep -v '\"GL_VERSION' >> $@
	$(BIN)/make_list.pl $(GL_EXT_SPEC) >> $@
204
	$(BIN)/make_list2.pl $(GL_EXT_SPEC) >> $@
205
	echo -e "\n  return GLEW_OK;\n}\n" >> $@
206
207
208
209
210
211
212
213
214
215
216
217
218
	echo -e "\n#if defined(GLEW_OSMESA)" >> $@
	echo -e "\n#elif defined(GLEW_EGL)" >> $@
	$(BIN)/make_def_fun.pl EGL $(EGL_CORE_SPEC) >> $@
	$(BIN)/make_def_fun.pl EGL $(EGL_EXT_SPEC) >> $@
	$(BIN)/make_def_var.pl EGL $(EGL_CORE_SPEC) >> $@
	$(BIN)/make_def_var.pl EGL $(EGL_EXT_SPEC) >> $@
	$(BIN)/make_init.pl EGL $(EGL_CORE_SPEC) >> $@
	$(BIN)/make_init.pl EGL $(EGL_EXT_SPEC) >> $@
	cat $(SRC)/glew_init_egl.c >> $@
	$(BIN)/make_list.pl $(EGL_CORE_SPEC) >> $@
	$(BIN)/make_list.pl $(EGL_EXT_SPEC) >> $@
	echo -e "\n  return GLEW_OK;\n}" >> $@
	echo -e "\n#elif defined(_WIN32)" >> $@
ikits's avatar
ikits committed
219
220
221
	$(BIN)/make_def_fun.pl WGL $(WGL_EXT_SPEC) >> $@
	$(BIN)/make_def_var.pl WGL $(WGL_EXT_SPEC) >> $@
	$(BIN)/make_init.pl WGL $(WGL_EXT_SPEC) >> $@
222
	cat $(SRC)/glew_init_wgl.c >> $@
ikits's avatar
ikits committed
223
	$(BIN)/make_list.pl $(WGL_EXT_SPEC) >> $@
224
	echo -e "\n  return GLEW_OK;\n}" >> $@;
225
	echo -e "\n#elif !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))" >> $@
226
227
228
229
230
231
232
233
234
235
236
237
	$(BIN)/make_def_fun.pl GLX $(GLX_CORE_SPEC) >> $@
	$(BIN)/make_def_fun.pl GLX $(GLX_EXT_SPEC) >> $@
	echo -e "\nGLboolean __GLXEW_VERSION_1_0 = GL_FALSE;" >> $@
	echo -e "GLboolean __GLXEW_VERSION_1_1 = GL_FALSE;" >> $@
	$(BIN)/make_def_var.pl GLX $(GLX_CORE_SPEC) >> $@
	$(BIN)/make_def_var.pl GLX $(GLX_EXT_SPEC) >> $@
	$(BIN)/make_init.pl GLX $(GLX_CORE_SPEC) >> $@
	$(BIN)/make_init.pl GLX $(GLX_EXT_SPEC) >> $@
	cat $(SRC)/glew_init_glx.c >> $@
	$(BIN)/make_list.pl $(CORE)/GLX_VERSION_1_3 | grep -v '\"GLX_VERSION' >> $@
	$(BIN)/make_list.pl $(GLX_EXT_SPEC) >> $@
	echo -e "\n  return GLEW_OK;\n}" >> $@
238
	echo -e "\n#endif /* !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) */\n" >> $@;
239
240
241
242
243
244
245
	cat $(SRC)/glew_init_tail.c >> $@
	cat $(SRC)/glew_str_head.c >> $@
	$(BIN)/make_str.pl $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@
	cat $(SRC)/glew_str_wgl.c >> $@
	$(BIN)/make_str.pl $(WGL_EXT_SPEC) >> $@
	cat $(SRC)/glew_str_glx.c >> $@
	$(BIN)/make_str.pl $(GLX_CORE_SPEC) $(GLX_EXT_SPEC) >> $@
246
247
	cat $(SRC)/glew_str_egl.c >> $@
	$(BIN)/make_str.pl $(EGL_CORE_SPEC) $(EGL_EXT_SPEC) >> $@
248
	cat $(SRC)/glew_str_tail.c >> $@
mem's avatar
mem committed
249
	perl -e "s/GLEW_VERSION_STRING/$(GLEW_VERSION)/g" -pi $@
250
251
252
	perl -e "s/GLEW_VERSION_MAJOR_STRING/$(GLEW_MAJOR)/g" -pi $@
	perl -e "s/GLEW_VERSION_MINOR_STRING/$(GLEW_MINOR)/g" -pi $@
	perl -e "s/GLEW_VERSION_MICRO_STRING/$(GLEW_MICRO)/g" -pi $@
253
	perl -e "s/GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader\(\);/{ GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader(); _glewInit_GL_ARB_vertex_program(); }/g" -pi $@
ikits's avatar
ikits committed
254
	perl -e "s/\(\(glColorSubTable = /((glBlendEquation = (PFNGLBLENDEQUATIONPROC)glewGetProcAddress((const GLubyte*)\"glBlendEquation\")) == NULL) || r;\n  r = ((glColorSubTable = /g" -pi $@
255
256
	rm -f $@.bak

mem's avatar
mem committed
257
$(S.DEST)/glewinfo.c: $(EXT)/.dummy
258
259
260
261
262
	@echo "--------------------------------------------------------------------"
	@echo "Creating glewinfo.c"
	@echo "--------------------------------------------------------------------"
	cp -f $(SRC)/glew_license.h $@
	cat $(SRC)/glewinfo_head.c >> $@
ikits's avatar
ikits committed
263
264
	$(BIN)/make_info.pl $(GL_CORE_SPEC) >> $@
	$(BIN)/make_info.pl $(GL_EXT_SPEC) >> $@
265
	echo -e "#if defined(GLEW_EGL)\n" >> $@
Nigel Stewart's avatar
Nigel Stewart committed
266
267
	$(BIN)/make_info.pl $(EGL_CORE_SPEC) >> $@
	$(BIN)/make_info.pl $(EGL_EXT_SPEC) >> $@
268
	echo -e "#elif _WIN32\n" >> $@
ikits's avatar
ikits committed
269
	$(BIN)/make_info.pl $(WGL_EXT_SPEC) >> $@
mem's avatar
mem committed
270
	echo -e "#else /* _UNIX */\n" >> $@
ikits's avatar
ikits committed
271
272
	$(BIN)/make_info.pl $(GLX_CORE_SPEC) >> $@
	$(BIN)/make_info.pl $(GLX_EXT_SPEC) >> $@
mem's avatar
mem committed
273
274
275
	echo -e "#endif /* _WIN32 */\n" >> $@

	cat $(SRC)/glewinfo_gl.c >> $@
ikits's avatar
ikits committed
276
277
	$(BIN)/make_info_list.pl $(GL_CORE_SPEC) >> $@
	$(BIN)/make_info_list.pl $(GL_EXT_SPEC) >> $@
mem's avatar
mem committed
278
	cat $(SRC)/glewinfo_wgl.c >> $@
ikits's avatar
ikits committed
279
	$(BIN)/make_info_list.pl $(WGL_EXT_SPEC) >> $@
mem's avatar
mem committed
280
	cat $(SRC)/glewinfo_glx.c >> $@
ikits's avatar
ikits committed
281
282
	$(BIN)/make_info_list.pl $(GLX_CORE_SPEC) >> $@
	$(BIN)/make_info_list.pl $(GLX_EXT_SPEC) >> $@
283
284
285
	cat $(SRC)/glewinfo_egl.c >> $@
	$(BIN)/make_info_list.pl $(EGL_CORE_SPEC) >> $@
	$(BIN)/make_info_list.pl $(EGL_EXT_SPEC) >> $@
286
	cat $(SRC)/glewinfo_tail.c >> $@
ikits's avatar
ikits committed
287
	perl -e 's/"glColorSubTable"/"glBlendEquation", glBlendEquation == NULL);\n  glewInfoFunc("glColorSubTable"/g' -pi $@
ikits's avatar
ikits committed
288
	rm -f $@.bak
mem's avatar
mem committed
289

290
291
292
293
294
295
296
# Update documentation

$(D.DEST)/%.html: doc/%.html
	@echo "--------------------------------------------------------------------"
	@echo "Creating $(@F)"
	@echo "--------------------------------------------------------------------"
	cat $(SRC)/header.html $< $(SRC)/footer.html | \
Nigel Stewart's avatar
Nigel Stewart committed
297
	perl -pe 's#<a href="$(@F)">(.*)</a>#\1#' > $@
298

ikits's avatar
ikits committed
299
$(D.DEST)/glew.html: $(EXT)/.dummy
300
301
302
	@echo "--------------------------------------------------------------------"
	@echo "Creating glew.html"
	@echo "--------------------------------------------------------------------"
303
	cp -f $(SRC)/header.html $@
304
	echo -e "<h2>Supported OpenGL Extensions</h2>\n" >> $@
ikits's avatar
ikits committed
305
	$(BIN)/make_html.pl $(GL_EXT_SPEC) >> $@
306
	cat $(SRC)/footer.html >> $@
Nigel Stewart's avatar
Nigel Stewart committed
307
	perl -i -pe 's#<a href="$(@F)">(.*)</a>#\1#' $@
ikits's avatar
ikits committed
308
309

$(D.DEST)/wglew.html: $(EXT)/.dummy
310
311
312
	@echo "--------------------------------------------------------------------"
	@echo "Creating wglew.html"
	@echo "--------------------------------------------------------------------"
313
	cp -f $(SRC)/header.html $@
314
	echo -e "<h2>Supported WGL Extensions</h2>\n" >> $@
ikits's avatar
ikits committed
315
	$(BIN)/make_html.pl $(WGL_EXT_SPEC) >> $@
316
	cat $(SRC)/footer.html >> $@
Nigel Stewart's avatar
Nigel Stewart committed
317
	perl -i -pe 's#<a href="$(@F)">(.*)</a>#\1#' $@
ikits's avatar
ikits committed
318
319

$(D.DEST)/glxew.html: $(EXT)/.dummy
320
321
322
	@echo "--------------------------------------------------------------------"
	@echo "Creating glxew.html"
	@echo "--------------------------------------------------------------------"
323
	cp -f $(SRC)/header.html $@
324
	echo -e "<h2>Supported GLX Extensions</h2>\n" >> $@
ikits's avatar
ikits committed
325
	$(BIN)/make_html.pl $(GLX_EXT_SPEC) >> $@
326
	cat $(SRC)/footer.html >> $@
Nigel Stewart's avatar
Nigel Stewart committed
327
	perl -i -pe 's#<a href="$(@F)">(.*)</a>#\1#' $@
ikits's avatar
ikits committed
328

329
330
331
$(B.DEST)/%.rc: src/%.rc $(EXT)/.dummy
	perl -e "s/GLEW_MAJOR/$(GLEW_MAJOR)/g;s/GLEW_MINOR/$(GLEW_MINOR)/g;s/GLEW_MICRO/$(GLEW_MICRO)/g;" -p $< > $@

mem's avatar
mem committed
332
clean:
ikits's avatar
ikits committed
333
	rm -rf $(I.TARGETS) $(S.TARGETS) $(D.TARGETS) $(B.TARGETS)
mem's avatar
mem committed
334
335

clobber: clean
336
337
338
	rm -rf $(EXT)

destroy: clobber
339
	rm -rf registry