new X86 CPU detection code (Petr Sebor)
[mesa.git] / src / mesa / main / Makefile.OSMesa16
1 # $Id: Makefile.OSMesa16,v 1.11 2003/01/14 04:55:45 brianp Exp $
2
3 # Mesa 3-D graphics library
4 # Version: 5.0
5 # Copyright (C) 1995-2002 Brian Paul
6
7 # Makefile for building Mesa for 16/32-bit/channel rendering with the OSMesa
8 # driver.
9
10
11 ##### MACROS #####
12
13 GL_MAJOR = 1
14 GL_MINOR = 4
15 GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY)
16
17 VPATH = RCS
18
19 INCDIR = ../include
20 LIBDIR = ../lib
21
22
23
24 CORE_SOURCES = \
25 api_arrayelt.c \
26 api_loopback.c \
27 api_noop.c \
28 api_validate.c \
29 accum.c \
30 attrib.c \
31 blend.c \
32 buffers.c \
33 clip.c \
34 colortab.c \
35 context.c \
36 convolve.c \
37 debug.c \
38 depth.c \
39 dispatch.c \
40 dlist.c \
41 drawpix.c \
42 enable.c \
43 enums.c \
44 eval.c \
45 extensions.c \
46 feedback.c \
47 fog.c \
48 get.c \
49 glapi.c \
50 glthread.c \
51 hash.c \
52 hint.c \
53 histogram.c \
54 image.c \
55 imports.c \
56 light.c \
57 lines.c \
58 matrix.c \
59 mmath.c \
60 nvprogram.c \
61 nvfragparse.c \
62 nvvertexec.c \
63 nvvertparse.c \
64 pixel.c \
65 points.c \
66 polygon.c \
67 rastpos.c \
68 state.c \
69 stencil.c \
70 texcompress.c \
71 texformat.c \
72 teximage.c \
73 texobj.c \
74 texstate.c \
75 texstore.c \
76 texutil.c \
77 varray.c \
78 vtxfmt.c \
79 X86/x86.c \
80 X86/common_x86.c \
81 X86/3dnow.c \
82 X86/sse.c \
83 math/m_debug_clip.c \
84 math/m_debug_norm.c \
85 math/m_debug_xform.c \
86 math/m_eval.c \
87 math/m_matrix.c \
88 math/m_translate.c \
89 math/m_vector.c \
90 math/m_xform.c \
91 array_cache/ac_context.c \
92 array_cache/ac_import.c \
93 swrast/s_aaline.c \
94 swrast/s_aatriangle.c \
95 swrast/s_accum.c \
96 swrast/s_alpha.c \
97 swrast/s_alphabuf.c \
98 swrast/s_bitmap.c \
99 swrast/s_blend.c \
100 swrast/s_buffers.c \
101 swrast/s_copypix.c \
102 swrast/s_context.c \
103 swrast/s_depth.c \
104 swrast/s_drawpix.c \
105 swrast/s_feedback.c \
106 swrast/s_fog.c \
107 swrast/s_histogram.c \
108 swrast/s_imaging.c \
109 swrast/s_lines.c \
110 swrast/s_logic.c \
111 swrast/s_masking.c \
112 swrast/s_nvfragprog.c \
113 swrast/s_pixeltex.c \
114 swrast/s_points.c \
115 swrast/s_readpix.c \
116 swrast/s_span.c \
117 swrast/s_stencil.c \
118 swrast/s_texture.c \
119 swrast/s_texstore.c \
120 swrast/s_triangle.c \
121 swrast/s_zoom.c \
122 swrast_setup/ss_context.c \
123 swrast_setup/ss_triangle.c \
124 swrast_setup/ss_vb.c \
125 tnl/t_array_api.c \
126 tnl/t_array_import.c \
127 tnl/t_context.c \
128 tnl/t_eval_api.c \
129 tnl/t_imm_alloc.c \
130 tnl/t_imm_api.c \
131 tnl/t_imm_debug.c \
132 tnl/t_imm_dlist.c \
133 tnl/t_imm_elt.c \
134 tnl/t_imm_eval.c \
135 tnl/t_imm_exec.c \
136 tnl/t_imm_fixup.c \
137 tnl/t_pipeline.c \
138 tnl/t_vb_fog.c \
139 tnl/t_vb_light.c \
140 tnl/t_vb_normals.c \
141 tnl/t_vb_points.c \
142 tnl/t_vb_program.c \
143 tnl/t_vb_render.c \
144 tnl/t_vb_texgen.c \
145 tnl/t_vb_texmat.c \
146 tnl/t_vb_vertex.c \
147 OSmesa/osmesa.c
148
149 ASM_SOURCES =
150
151 ADDITIONAL_OBJ =
152
153 OBJECTS = $(ASM_SOURCES:.S=.o) \
154 $(CORE_SOURCES:.c=.o) \
155 $(ADDITIONAL_OBJ)
156
157
158
159 ##### RULES #####
160
161 .c.o:
162 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
163
164 .S.o:
165 $(CC) -c -I. $(CFLAGS) $< -o $@
166
167
168 OSmesa/osmesa.o: OSmesa/osmesa.c
169 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
170
171 X86/x86.o: X86/x86.c
172 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
173 X86/common_x86.o: X86/common_x86.c
174 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
175 X86/common_x86_asm.o: X86/common_x86_asm.S X86/matypes.h
176 X86/3dnow.o: X86/3dnow.c
177 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
178 X86/sse.o: X86/sse.c
179 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
180 X86/matypes.h: mtypes.h tnl/t_context.h X86/gen_matypes.c
181 $(CC) -I. -I$(INCDIR) $(CFLAGS) X86/gen_matypes.c -o X86/gen_matypes
182 ./X86/gen_matypes > X86/matypes.h
183 rm -f X86/gen_matypes X86/*.o
184
185 # We have X86/matypes.h depend on X86/matypes.h so that if ASM_SOURCES
186 # is empty we don't get an invalid Makefile.
187 $(ASM_SOURCES) X86/matypes.h: X86/matypes.h
188
189
190 ##### TARGETS #####
191
192 #default:
193 # @echo "Specify a target configuration"
194
195 clean:
196 -rm -f *.o *~ */*.o */*~ *.lo *.la
197 -rm -rf .libs
198
199 targets: $(LIBDIR)/$(OSMESA16_LIB)
200
201 # Make the 16-bit/channel OSMesa library
202 $(LIBDIR)/$(OSMESA16_LIB): $(OBJECTS)
203 $(MAKELIB) $(OSMESA16_LIB) $(GL_MAJOR) $(GL_MINOR) $(GL_TINY) $(OBJECTS)
204 rm -f $(LIBDIR)/$(OSMESA16_LIB)*
205 mv $(OSMESA16_LIB)* $(LIBDIR)
206
207
208 include ../Make-config
209
210 include depend
211
212
213
214 #
215 # Run 'make dep' to update the dependencies if you change what's included
216 # by any source file.
217 #
218 dep: $(CORE_SOURCES)
219 makedepend -fdepend -Y -I../include $(CORE_SOURCES)
220
221 tags:
222 etags `find . -name \*.[ch]` `find ../include`