Add GLAPIENTRY function decorations for correct operation on Windows.
[mesa.git] / src / mesa / main / Makefile.BeOS-R5
1 # Mesa 3-D graphics library
2 # Version: 5.1
3 #
4 # Copyright (C) 1995-2003 Brian Paul All Rights Reserved.
5 #
6 # Permission is hereby granted, free of charge, to any person obtaining a
7 # copy of this software and associated documentation files (the "Software"),
8 # to deal in the Software without restriction, including without limitation
9 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 # and/or sell copies of the Software, and to permit persons to whom the
11 # Software is furnished to do so, subject to the following conditions:
12 #
13 # The above copyright notice and this permission notice shall be included
14 # in all copies or substantial portions of the Software.
15 #
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 # BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20 # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 #
23 # BeOS driver makefile v1.0 for Mesa 4.1
24 #
25 # Copyright (C) 2002 - Philippe Houdoin
26 # Email : philippe.houdoin@free.fr
27 # Web : http://philippe.houdoin.free.fr/phil/beos/index-en.html
28 #
29 # -------------------------------------------------------------------
30
31 ## BeOS Generic Makefile v2.0 ##
32
33 ## Fill in this file to specify the project being created, and the referenced
34 ## makefile-engine will do all of the hard work for you. This handles both
35 ## Intel and PowerPC builds of the BeOS.
36
37 ## Application Specific Settings ---------------------------------------------
38
39 # specify the name of the binary
40 NAME= libGL.so
41
42 # specify the type of binary
43 # APP: Application
44 # SHARED: Shared library or add-on
45 # STATIC: Static library archive
46 # DRIVER: Kernel Driver
47 TYPE= SHARED
48
49 # specify the source files to use
50 # full paths or paths relative to the makefile can be included
51 # all files, regardless of directory, will have their object
52 # files created in the common object directory.
53 # Note that this means this makefile will not work correctly
54 # if two source files with the same name (source.c or source.cpp)
55 # are included from different directories. Also note that spaces
56 # in folder names do not work well with this makefile.
57
58 MESA_CORE_SRCS = \
59 api_arrayelt.c \
60 api_loopback.c \
61 api_noop.c \
62 api_validate.c \
63 accum.c \
64 arbprogram.c \
65 attrib.c \
66 blend.c \
67 bufferobj.c \
68 buffers.c \
69 clip.c \
70 colortab.c \
71 context.c \
72 convolve.c \
73 debug.c \
74 depth.c \
75 dispatch.c \
76 dlist.c \
77 drawpix.c \
78 enable.c \
79 enums.c \
80 eval.c \
81 extensions.c \
82 feedback.c \
83 fog.c \
84 get.c \
85 glapi.c \
86 glthread.c \
87 hash.c \
88 hint.c \
89 histogram.c \
90 image.c \
91 imports.c \
92 light.c \
93 lines.c \
94 matrix.c \
95 pixel.c \
96 points.c \
97 polygon.c \
98 rastpos.c \
99 state.c \
100 stencil.c \
101 texcompress.c \
102 texformat.c \
103 teximage.c \
104 texobj.c \
105 texstate.c \
106 texstore.c \
107 texutil.c \
108 varray.c \
109 vpexec.c \
110 vpparse.c \
111 vpstate.c \
112 vtxfmt.c \
113 math/m_debug_clip.c \
114 math/m_debug_norm.c \
115 math/m_debug_xform.c \
116 math/m_eval.c \
117 math/m_matrix.c \
118 math/m_translate.c \
119 math/m_vector.c \
120 math/m_xform.c \
121 array_cache/ac_context.c \
122 array_cache/ac_import.c \
123 swrast/s_aaline.c \
124 swrast/s_aatriangle.c \
125 swrast/s_accum.c \
126 swrast/s_alpha.c \
127 swrast/s_alphabuf.c \
128 swrast/s_bitmap.c \
129 swrast/s_blend.c \
130 swrast/s_buffers.c \
131 swrast/s_copypix.c \
132 swrast/s_context.c \
133 swrast/s_depth.c \
134 swrast/s_drawpix.c \
135 swrast/s_feedback.c \
136 swrast/s_fog.c \
137 swrast/s_imaging.c \
138 swrast/s_lines.c \
139 swrast/s_logic.c \
140 swrast/s_masking.c \
141 swrast/s_pixeltex.c \
142 swrast/s_points.c \
143 swrast/s_readpix.c \
144 swrast/s_span.c \
145 swrast/s_stencil.c \
146 swrast/s_texture.c \
147 swrast/s_texstore.c \
148 swrast/s_triangle.c \
149 swrast/s_zoom.c \
150 swrast_setup/ss_context.c \
151 swrast_setup/ss_triangle.c \
152 swrast_setup/ss_vb.c \
153 tnl/t_array_api.c \
154 tnl/t_array_import.c \
155 tnl/t_context.c \
156 tnl/t_eval_api.c \
157 tnl/t_imm_alloc.c \
158 tnl/t_imm_api.c \
159 tnl/t_imm_debug.c \
160 tnl/t_imm_dlist.c \
161 tnl/t_imm_elt.c \
162 tnl/t_imm_eval.c \
163 tnl/t_imm_exec.c \
164 tnl/t_imm_fixup.c \
165 tnl/t_pipeline.c \
166 tnl/t_vb_fog.c \
167 tnl/t_vb_light.c \
168 tnl/t_vb_normals.c \
169 tnl/t_vb_points.c \
170 tnl/t_vb_program.c \
171 tnl/t_vb_render.c \
172 tnl/t_vb_texgen.c \
173 tnl/t_vb_texmat.c \
174 tnl/t_vb_vertex.c
175
176 MESA_BEOS_DRIVER_SRCS = \
177 BeOS/GLView.cpp
178
179 MESA_X86_SRCS = \
180 X86/x86.c \
181 X86/glapi_x86.S \
182 X86/common_x86.c \
183 X86/common_x86_asm.S \
184 X86/x86_xform2.S \
185 X86/x86_xform3.S \
186 X86/x86_xform4.S \
187 X86/x86_cliptest.S
188
189 MESA_MMX_SRCS = \
190 X86/mmx_blend.S
191
192 MESA_SSE_SRCS = \
193 X86/sse.c \
194 X86/sse_xform2.S \
195 X86/sse_xform3.S \
196 X86/sse_xform4.S \
197 X86/sse_normal.S
198
199 MESA_3DNOW_SRCS = \
200 X86/3dnow.c \
201 X86/3dnow_normal.S \
202 X86/3dnow_xform1.S \
203 X86/3dnow_xform2.S \
204 X86/3dnow_xform3.S \
205 X86/3dnow_xform4.S
206
207 MESA_DEFINES =
208 # To use GAS assembler, uncomment this line instead:
209 MESA_DEFINES += GNU_ASSEMBLER
210 # To use NASM assembler, uncomment this line instead:
211 # MESA_DEFINES += NASM_ASSEMBLER
212 # To build a DEBUG version of Mesa, uncomment this line instead:
213 # MESA_DEFINES += DEBUG
214
215 # x86-optimized code
216 MACHINE=$(shell uname -m)
217 ifeq ($(MACHINE), BePC)
218 HAVE_MMX = 1
219 HAVE_SSE = 1
220 HAVE_3DNOW = 1
221 else
222 # No assembly optimization for PowerPC...
223 # HAVE_ALTIVEC=1
224 endif
225
226 ifdef HAVE_MMX
227 MESA_X86_SRCS += $(MESA_MMX_SRCS)
228 MESA_DEFINES += USE_MMX_ASM
229 HAVE_X86 = 1
230 endif
231 ifdef HAVE_SSE
232 MESA_X86_SRCS += $(MESA_SSE_SRCS)
233 MESA_DEFINES += USE_SSE_ASM
234 HAVE_X86 = 1
235 endif
236 ifdef HAVE_3DNOW
237 MESA_X86_SRCS += $(MESA_3DNOW_SRCS)
238 MESA_DEFINES += USE_3DNOW_ASM
239 HAVE_X86 = 1
240 endif
241 ifdef HAVE_X86
242 MESA_DEFINES += USE_X86_ASM
243 else
244 MESA_X86_SRCS =
245 endif
246
247 # FIXME: SI-GLU version support currently broken
248 # USE_SI_GLU=1
249 ifdef USE_SI_GLU
250 GLU_SRCS = \
251 ../si-glu/libutil/error.c \
252 ../si-glu/libutil/glue.c \
253 ../si-glu/libutil/mipmap.c \
254 ../si-glu/libutil/project.c \
255 ../si-glu/libutil/quad.c \
256 ../si-glu/libutil/registry.c \
257 ../si-glu/libtess/dict.c \
258 ../si-glu/libtess/geom.c \
259 ../si-glu/libtess/memalloc.c \
260 ../si-glu/libtess/mesh.c \
261 ../si-glu/libtess/normal.c \
262 ../si-glu/libtess/priorityq.c \
263 ../si-glu/libtess/render.c \
264 ../si-glu/libtess/sweep.c \
265 ../si-glu/libtess/tess.c \
266 ../si-glu/libtess/tessmono.c \
267 ../si-glu/libnurbs/interface/bezierEval.cc \
268 ../si-glu/libnurbs/interface/bezierPatch.cc \
269 ../si-glu/libnurbs/interface/bezierPatchMesh.cc \
270 ../si-glu/libnurbs/interface/glcurveval.cc \
271 ../si-glu/libnurbs/interface/glinterface.cc \
272 ../si-glu/libnurbs/interface/glrenderer.cc \
273 ../si-glu/libnurbs/interface/glsurfeval.cc \
274 ../si-glu/libnurbs/interface/incurveeval.cc \
275 ../si-glu/libnurbs/interface/insurfeval.cc \
276 ../si-glu/libnurbs/internals/arc.cc \
277 ../si-glu/libnurbs/internals/arcsorter.cc \
278 ../si-glu/libnurbs/internals/arctess.cc \
279 ../si-glu/libnurbs/internals/backend.cc \
280 ../si-glu/libnurbs/internals/basiccrveval.cc \
281 ../si-glu/libnurbs/internals/basicsurfeval.cc \
282 ../si-glu/libnurbs/internals/bin.cc \
283 ../si-glu/libnurbs/internals/bufpool.cc \
284 ../si-glu/libnurbs/internals/cachingeval.cc \
285 ../si-glu/libnurbs/internals/ccw.cc \
286 ../si-glu/libnurbs/internals/coveandtiler.cc \
287 ../si-glu/libnurbs/internals/curve.cc \
288 ../si-glu/libnurbs/internals/curvelist.cc \
289 ../si-glu/libnurbs/internals/curvesub.cc \
290 ../si-glu/libnurbs/internals/dataTransform.cc \
291 ../si-glu/libnurbs/internals/displaylist.cc \
292 ../si-glu/libnurbs/internals/flist.cc \
293 ../si-glu/libnurbs/internals/flistsorter.cc \
294 ../si-glu/libnurbs/internals/hull.cc \
295 ../si-glu/libnurbs/internals/intersect.cc \
296 ../si-glu/libnurbs/internals/knotvector.cc \
297 ../si-glu/libnurbs/internals/mapdesc.cc \
298 ../si-glu/libnurbs/internals/mapdescv.cc \
299 ../si-glu/libnurbs/internals/maplist.cc \
300 ../si-glu/libnurbs/internals/mesher.cc \
301 ../si-glu/libnurbs/internals/monoTriangulationBackend.cc \
302 ../si-glu/libnurbs/internals/monotonizer.cc \
303 ../si-glu/libnurbs/internals/mycode.cc \
304 ../si-glu/libnurbs/internals/nurbsinterfac.cc \
305 ../si-glu/libnurbs/internals/nurbstess.cc \
306 ../si-glu/libnurbs/internals/patch.cc \
307 ../si-glu/libnurbs/internals/patchlist.cc \
308 ../si-glu/libnurbs/internals/quilt.cc \
309 ../si-glu/libnurbs/internals/reader.cc \
310 ../si-glu/libnurbs/internals/renderhints.cc \
311 ../si-glu/libnurbs/internals/slicer.cc \
312 ../si-glu/libnurbs/internals/sorter.cc \
313 ../si-glu/libnurbs/internals/splitarcs.cc \
314 ../si-glu/libnurbs/internals/subdivider.cc \
315 ../si-glu/libnurbs/internals/tobezier.cc \
316 ../si-glu/libnurbs/internals/trimline.cc \
317 ../si-glu/libnurbs/internals/trimregion.cc \
318 ../si-glu/libnurbs/internals/trimvertpool.cc \
319 ../si-glu/libnurbs/internals/uarray.cc \
320 ../si-glu/libnurbs/internals/varray.cc \
321 ../si-glu/libnurbs/nurbtess/directedLine.cc \
322 ../si-glu/libnurbs/nurbtess/gridWrap.cc \
323 ../si-glu/libnurbs/nurbtess/monoChain.cc \
324 ../si-glu/libnurbs/nurbtess/monoPolyPart.cc \
325 ../si-glu/libnurbs/nurbtess/monoTriangulation.cc \
326 ../si-glu/libnurbs/nurbtess/partitionX.cc \
327 ../si-glu/libnurbs/nurbtess/partitionY.cc \
328 ../si-glu/libnurbs/nurbtess/polyDBG.cc \
329 ../si-glu/libnurbs/nurbtess/polyUtil.cc \
330 ../si-glu/libnurbs/nurbtess/primitiveStream.cc \
331 ../si-glu/libnurbs/nurbtess/quicksort.cc \
332 ../si-glu/libnurbs/nurbtess/rectBlock.cc \
333 ../si-glu/libnurbs/nurbtess/sampleComp.cc \
334 ../si-glu/libnurbs/nurbtess/sampleCompBot.cc \
335 ../si-glu/libnurbs/nurbtess/sampleCompRight.cc \
336 ../si-glu/libnurbs/nurbtess/sampleCompTop.cc \
337 ../si-glu/libnurbs/nurbtess/sampleMonoPoly.cc \
338 ../si-glu/libnurbs/nurbtess/sampledLine.cc \
339 ../si-glu/libnurbs/nurbtess/searchTree.cc
340 else
341 GLU_SRCS = \
342 ../src-glu/glu.c \
343 ../src-glu/mipmap.c \
344 ../src-glu/project.c \
345 ../src-glu/quadric.c \
346 ../src-glu/tess.c \
347 ../src-glu/tesselat.c \
348 ../src-glu/polytest.c \
349 ../src-glu/nurbs.c \
350 ../src-glu/nurbscrv.c \
351 ../src-glu/nurbssrf.c \
352 ../src-glu/nurbsutl.c
353 endif
354
355 SRCS = $(MESA_CORE_SRCS) $(MESA_X86_SRCS) $(GLU_SRCS) $(MESA_BEOS_DRIVER_SRCS)
356
357 # specify the resource files to use
358 # full path or a relative path to the resource file can be used.
359 RSRCS =
360
361 # specify additional libraries to link against
362 # there are two acceptable forms of library specifications
363 # - if your library follows the naming pattern of:
364 # libXXX.so or libXXX.a you can simply specify XXX
365 # library: libbe.so entry: be
366 #
367 # - if your library does not follow the standard library
368 # naming scheme you need to specify the path to the library
369 # and it's name
370 # library: my_lib.a entry: my_lib.a or path/my_lib.a
371 LIBS = be
372
373 # specify additional paths to directories following the standard
374 # libXXX.so or libXXX.a naming scheme. You can specify full paths
375 # or paths relative to the makefile. The paths included may not
376 # be recursive, so include all of the paths where libraries can
377 # be found. Directories where source files are found are
378 # automatically included.
379 LIBPATHS =
380
381 # additional paths to look for system headers
382 # thes use the form: #include <header>
383 # source file directories are NOT auto-included here
384 SYSTEM_INCLUDE_PATHS = ../include
385 ifdef USE_SI_GLU
386 SYSTEM_INCLUDE_PATHS += ../si-glu/include
387 endif
388
389 # additional paths to look for local headers
390 # thes use the form: #include "header"
391 # source file directories are automatically included
392 LOCAL_INCLUDE_PATHS =
393
394 # specify the level of optimization that you desire
395 # NONE, SOME, FULL
396 OPTIMIZE = FULL
397
398 # specify any preprocessor symbols to be defined. The symbols
399 # will be set to a value of 1. For example specify DEBUG if you want
400 # DEBUG=1 to be set when compiling.
401 DEFINES = $(MESA_DEFINES)
402
403 # specify special warning levels
404 # if unspecified default warnings will be used
405 # NONE = suppress all warnings
406 # ALL = enable all warnings
407 WARNINGS = ALL
408
409 # specify whether image symbols will be created
410 # so that stack crawls in the debugger are meaningful
411 # if TRUE symbols will be created
412 SYMBOLS = TRUE
413
414 # specify debug settings
415 # if TRUE will allow application to be run from
416 # a source-level debugger
417 # DEBUGGER = TRUE
418 DEBUGGER = FALSE
419
420 # specify additional compiler flags for all files
421 COMPILER_FLAGS =
422
423 # specify additional linker flags
424 LINKER_FLAGS =
425
426
427
428 ## include the makefile-engine
429 include /boot/develop/etc/makefile-engine
430
431
432
433 # X86/matypes.h include file is *generated*!
434 # Rules to (re)generate it as needed:
435
436 X86/common_x86_asm.S : X86/matypes.h
437
438 X86/matypes.h : X86/gen_matypes.c
439 @echo "(Re-)Generating $@ ..."
440 $(CC) $< $(INCLUDES) $(CFLAGS) -o X86/gen_matypes
441 X86/gen_matypes > $@
442 rm -f X86/gen_matypes
443
444 ## Add NASM support for assembly code compilation...
445 # $(OBJ_DIR)/%.o : %.nasm
446 # nasm -f elf $(MESA_DEFINES) -o $@ $<
447
448 $(OBJ_DIR)/%.o : %.S
449 gcc -c $< $(INCLUDES) $(CFLAGS) -o $@
450 # gcc $(INCLUDES) $(CFLAGS) -E $< | grep -v '^$$' > $(addsuffix .nasm, $(basename $<))
451 # nasm -f elf $(MESA_DEFINES) -o $@ $(addsuffix .nasm, $(basename $<))
452