This should make most linux-solo drivers work again. Mainly a fix
[mesa.git] / src / mesa / Makefile.BeOS
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 5.1.x
24 #
25 # Copyright (C) 2002-2003 - 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
59 include sources
60
61
62 BEOS_DRIVER_SOURCES = \
63 drivers/beos/GLView.cpp
64
65 MESA_DEFINES =
66 ASM_SOURCES =
67
68 # To use GAS assembler, uncomment this line instead:
69 MESA_DEFINES += GNU_ASSEMBLER
70 # To use NASM assembler, uncomment this line instead:
71 # MESA_DEFINES += NASM_ASSEMBLER
72 # To build a DEBUG version of Mesa, uncomment this line instead:
73 # MESA_DEFINES += DEBUG
74
75 # x86-optimized code
76 MACHINE=$(shell uname -m)
77 ifeq ($(MACHINE), BePC)
78 MESA_DEFINES += USE_X86_ASM USE_SSE_ASM USE_MMX_ASM
79 MESA_DEFINES += USE_3DNOW_ASM
80 ASM_SOURCES = $(X86_SOURCES)
81 else
82 # No assembly optimization for PowerPC...
83 # HAVE_ALTIVEC=1
84 endif
85
86 # FIXME: SI-GLU version support currently broken
87 # USE_SI_GLU=1
88 ifdef USE_SI_GLU
89 GLU_SOURCES = \
90 ../si-glu/libutil/error.c \
91 ../si-glu/libutil/glue.c \
92 ../si-glu/libutil/mipmap.c \
93 ../si-glu/libutil/project.c \
94 ../si-glu/libutil/quad.c \
95 ../si-glu/libutil/registry.c \
96 ../si-glu/libtess/dict.c \
97 ../si-glu/libtess/geom.c \
98 ../si-glu/libtess/memalloc.c \
99 ../si-glu/libtess/mesh.c \
100 ../si-glu/libtess/normal.c \
101 ../si-glu/libtess/priorityq.c \
102 ../si-glu/libtess/render.c \
103 ../si-glu/libtess/sweep.c \
104 ../si-glu/libtess/tess.c \
105 ../si-glu/libtess/tessmono.c \
106 ../si-glu/libnurbs/interface/bezierEval.cc \
107 ../si-glu/libnurbs/interface/bezierPatch.cc \
108 ../si-glu/libnurbs/interface/bezierPatchMesh.cc \
109 ../si-glu/libnurbs/interface/glcurveval.cc \
110 ../si-glu/libnurbs/interface/glinterface.cc \
111 ../si-glu/libnurbs/interface/glrenderer.cc \
112 ../si-glu/libnurbs/interface/glsurfeval.cc \
113 ../si-glu/libnurbs/interface/incurveeval.cc \
114 ../si-glu/libnurbs/interface/insurfeval.cc \
115 ../si-glu/libnurbs/internals/arc.cc \
116 ../si-glu/libnurbs/internals/arcsorter.cc \
117 ../si-glu/libnurbs/internals/arctess.cc \
118 ../si-glu/libnurbs/internals/backend.cc \
119 ../si-glu/libnurbs/internals/basiccrveval.cc \
120 ../si-glu/libnurbs/internals/basicsurfeval.cc \
121 ../si-glu/libnurbs/internals/bin.cc \
122 ../si-glu/libnurbs/internals/bufpool.cc \
123 ../si-glu/libnurbs/internals/cachingeval.cc \
124 ../si-glu/libnurbs/internals/ccw.cc \
125 ../si-glu/libnurbs/internals/coveandtiler.cc \
126 ../si-glu/libnurbs/internals/curve.cc \
127 ../si-glu/libnurbs/internals/curvelist.cc \
128 ../si-glu/libnurbs/internals/curvesub.cc \
129 ../si-glu/libnurbs/internals/dataTransform.cc \
130 ../si-glu/libnurbs/internals/displaylist.cc \
131 ../si-glu/libnurbs/internals/flist.cc \
132 ../si-glu/libnurbs/internals/flistsorter.cc \
133 ../si-glu/libnurbs/internals/hull.cc \
134 ../si-glu/libnurbs/internals/intersect.cc \
135 ../si-glu/libnurbs/internals/knotvector.cc \
136 ../si-glu/libnurbs/internals/mapdesc.cc \
137 ../si-glu/libnurbs/internals/mapdescv.cc \
138 ../si-glu/libnurbs/internals/maplist.cc \
139 ../si-glu/libnurbs/internals/mesher.cc \
140 ../si-glu/libnurbs/internals/monoTriangulationBackend.cc \
141 ../si-glu/libnurbs/internals/monotonizer.cc \
142 ../si-glu/libnurbs/internals/mycode.cc \
143 ../si-glu/libnurbs/internals/nurbsinterfac.cc \
144 ../si-glu/libnurbs/internals/nurbstess.cc \
145 ../si-glu/libnurbs/internals/patch.cc \
146 ../si-glu/libnurbs/internals/patchlist.cc \
147 ../si-glu/libnurbs/internals/quilt.cc \
148 ../si-glu/libnurbs/internals/reader.cc \
149 ../si-glu/libnurbs/internals/renderhints.cc \
150 ../si-glu/libnurbs/internals/slicer.cc \
151 ../si-glu/libnurbs/internals/sorter.cc \
152 ../si-glu/libnurbs/internals/splitarcs.cc \
153 ../si-glu/libnurbs/internals/subdivider.cc \
154 ../si-glu/libnurbs/internals/tobezier.cc \
155 ../si-glu/libnurbs/internals/trimline.cc \
156 ../si-glu/libnurbs/internals/trimregion.cc \
157 ../si-glu/libnurbs/internals/trimvertpool.cc \
158 ../si-glu/libnurbs/internals/uarray.cc \
159 ../si-glu/libnurbs/internals/varray.cc \
160 ../si-glu/libnurbs/nurbtess/directedLine.cc \
161 ../si-glu/libnurbs/nurbtess/gridWrap.cc \
162 ../si-glu/libnurbs/nurbtess/monoChain.cc \
163 ../si-glu/libnurbs/nurbtess/monoPolyPart.cc \
164 ../si-glu/libnurbs/nurbtess/monoTriangulation.cc \
165 ../si-glu/libnurbs/nurbtess/partitionX.cc \
166 ../si-glu/libnurbs/nurbtess/partitionY.cc \
167 ../si-glu/libnurbs/nurbtess/polyDBG.cc \
168 ../si-glu/libnurbs/nurbtess/polyUtil.cc \
169 ../si-glu/libnurbs/nurbtess/primitiveStream.cc \
170 ../si-glu/libnurbs/nurbtess/quicksort.cc \
171 ../si-glu/libnurbs/nurbtess/rectBlock.cc \
172 ../si-glu/libnurbs/nurbtess/sampleComp.cc \
173 ../si-glu/libnurbs/nurbtess/sampleCompBot.cc \
174 ../si-glu/libnurbs/nurbtess/sampleCompRight.cc \
175 ../si-glu/libnurbs/nurbtess/sampleCompTop.cc \
176 ../si-glu/libnurbs/nurbtess/sampleMonoPoly.cc \
177 ../si-glu/libnurbs/nurbtess/sampledLine.cc \
178 ../si-glu/libnurbs/nurbtess/searchTree.cc
179 else
180 GLU_SOURCES = \
181 ../glu/mesa/glu.c \
182 ../glu/mesa/mipmap.c \
183 ../glu/mesa/project.c \
184 ../glu/mesa/quadric.c \
185 ../glu/mesa/tess.c \
186 ../glu/mesa/tesselat.c \
187 ../glu/mesa/polytest.c \
188 ../glu/mesa/nurbs.c \
189 ../glu/mesa/nurbscrv.c \
190 ../glu/mesa/nurbssrf.c \
191 ../glu/mesa/nurbsutl.c
192 endif
193
194 MESA_SOURCES = $(CORE_SOURCES) $(ASM_SOURCES)
195
196 SRCS = $(MESA_SOURCES) $(GLU_SOURCES) $(BEOS_DRIVER_SOURCES)
197
198 # specify the resource files to use
199 # full path or a relative path to the resource file can be used.
200 RSRCS =
201
202 # specify additional libraries to link against
203 # there are two acceptable forms of library specifications
204 # - if your library follows the naming pattern of:
205 # libXXX.so or libXXX.a you can simply specify XXX
206 # library: libbe.so entry: be
207 #
208 # - if your library does not follow the standard library
209 # naming scheme you need to specify the path to the library
210 # and it's name
211 # library: my_lib.a entry: my_lib.a or path/my_lib.a
212 LIBS = be
213
214 # specify additional paths to directories following the standard
215 # libXXX.so or libXXX.a naming scheme. You can specify full paths
216 # or paths relative to the makefile. The paths included may not
217 # be recursive, so include all of the paths where libraries can
218 # be found. Directories where source files are found are
219 # automatically included.
220 LIBPATHS =
221
222 # additional paths to look for system headers
223 # thes use the form: #include <header>
224 # source file directories are NOT auto-included here
225 SYSTEM_INCLUDE_PATHS = ../../include
226
227 ifdef USE_SI_GLU
228 SYSTEM_INCLUDE_PATHS += ../glu/sgi/include
229 endif
230
231 # additional paths to look for local headers
232 # thes use the form: #include "header"
233 # source file directories are automatically included
234 LOCAL_INCLUDE_PATHS = \
235 . \
236 ./main \
237 ./glapi \
238 ./math \
239 ./transform \
240 ./swrast \
241 ./swrast_setup \
242 ./tnl \
243 ./tnl_dd
244
245 # specify the level of optimization that you desire
246 # NONE, SOME, FULL
247 OPTIMIZE = FULL
248
249 # specify any preprocessor symbols to be defined. The symbols
250 # will be set to a value of 1. For example specify DEBUG if you want
251 # DEBUG=1 to be set when compiling.
252 DEFINES = $(MESA_DEFINES)
253
254 # specify special warning levels
255 # if unspecified default warnings will be used
256 # NONE = suppress all warnings
257 # ALL = enable all warnings
258 WARNINGS = ALL
259
260 # specify whether image symbols will be created
261 # so that stack crawls in the debugger are meaningful
262 # if TRUE symbols will be created
263 SYMBOLS = TRUE
264
265 # specify debug settings
266 # if TRUE will allow application to be run from
267 # a source-level debugger
268 # DEBUGGER = TRUE
269 DEBUGGER = FALSE
270
271 # specify additional compiler flags for all files
272 COMPILER_FLAGS =
273
274 # specify additional linker flags
275 LINKER_FLAGS =
276
277
278
279 ## include the makefile-engine
280 include /boot/develop/etc/makefile-engine
281
282
283
284 # x86/matypes.h include file is *generated*!
285 # Rules to (re)generate it as needed:
286
287 x86/common_x86_asm.S : x86/matypes.h
288
289 x86/matypes.h : x86/gen_matypes.c
290 @echo "(Re-)Generating $@ ..."
291 $(CC) $< $(INCLUDES) $(CFLAGS) -o x86/gen_matypes
292 x86/gen_matypes > $@
293 rm -f x86/gen_matypes
294
295 ## Add NASM support for assembly code compilation...
296 # $(OBJ_DIR)/%.o : %.nasm
297 # nasm -f elf $(MESA_DEFINES) -o $@ $<
298
299 $(OBJ_DIR)/%.o : %.S
300 gcc -c $< $(INCLUDES) $(CFLAGS) -o $@
301 # gcc $(INCLUDES) $(CFLAGS) -E $< | grep -v '^$$' > $(addsuffix .nasm, $(basename $<))
302 # nasm -f elf $(MESA_DEFINES) -o $@ $(addsuffix .nasm, $(basename $<))
303