fix a comment
[mesa.git] / src / mesa / main / Makefile.DJ
1 # Mesa 3-D graphics library
2 # Version: 4.0
3 #
4 # Copyright (C) 1999 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 # DOS/DJGPP core makefile v1.0 for Mesa 4.0
24 #
25 # Copyright (C) 2002 - Borca Daniel
26 # Email : dborca@yahoo.com
27 # Web : http://www.geocities.com/dborca
28
29
30 .PHONY: all clean
31
32 TOP = ..
33 CC = gcc
34 CFLAGS = -I$(TOP)/include -I. -Wall -W -Wno-unused -mcpu=$(CPU) -ffast-math -O2
35 AR = ar
36 ARFLAGS = ruv
37 LIBDIR = $(TOP)/lib
38
39 ifeq ($(wildcard $(DJDIR)/lib/dxe2.ld),)
40 DXE2GEN =
41 else
42 DXE2GEN = $(wildcard $(addsuffix /dxe2gen.exe,$(subst ;, ,$(PATH))))
43 endif
44
45 GL_LIB = libgl.a
46 GL_DXE = gl.dxe
47 GL_IMP = libigl.a
48
49 CORE_SOURCES = \
50 swrast_setup/ss_context.c \
51 swrast_setup/ss_triangle.c \
52 swrast_setup/ss_vb.c \
53 api_arrayelt.c \
54 api_loopback.c \
55 api_noop.c \
56 api_validate.c \
57 accum.c \
58 attrib.c \
59 blend.c \
60 buffers.c \
61 clip.c \
62 colortab.c \
63 context.c \
64 convolve.c \
65 debug.c \
66 depth.c \
67 dispatch.c \
68 dlist.c \
69 drawpix.c \
70 enable.c \
71 enums.c \
72 eval.c \
73 extensions.c \
74 feedback.c \
75 fog.c \
76 get.c \
77 glapi.c \
78 glthread.c \
79 hash.c \
80 hint.c \
81 histogram.c \
82 image.c \
83 imports.c \
84 light.c \
85 lines.c \
86 matrix.c \
87 mem.c \
88 mmath.c \
89 pixel.c \
90 points.c \
91 polygon.c \
92 rastpos.c \
93 state.c \
94 stencil.c \
95 texformat.c \
96 teximage.c \
97 texobj.c \
98 texstate.c \
99 texstore.c \
100 texutil.c \
101 varray.c \
102 vtxfmt.c \
103 math/m_debug_clip.c \
104 math/m_debug_norm.c \
105 math/m_debug_vertex.c \
106 math/m_debug_xform.c \
107 math/m_eval.c \
108 math/m_matrix.c \
109 math/m_translate.c \
110 math/m_vector.c \
111 math/m_vertices.c \
112 math/m_xform.c \
113 array_cache/ac_context.c \
114 array_cache/ac_import.c \
115 swrast/s_aaline.c \
116 swrast/s_aatriangle.c \
117 swrast/s_accum.c \
118 swrast/s_alpha.c \
119 swrast/s_alphabuf.c \
120 swrast/s_bitmap.c \
121 swrast/s_blend.c \
122 swrast/s_buffers.c \
123 swrast/s_copypix.c \
124 swrast/s_context.c \
125 swrast/s_depth.c \
126 swrast/s_drawpix.c \
127 swrast/s_feedback.c \
128 swrast/s_fog.c \
129 swrast/s_histogram.c \
130 swrast/s_imaging.c \
131 swrast/s_lines.c \
132 swrast/s_logic.c \
133 swrast/s_masking.c \
134 swrast/s_pb.c \
135 swrast/s_pixeltex.c \
136 swrast/s_points.c \
137 swrast/s_readpix.c \
138 swrast/s_scissor.c \
139 swrast/s_span.c \
140 swrast/s_stencil.c \
141 swrast/s_texture.c \
142 swrast/s_texstore.c \
143 swrast/s_triangle.c \
144 swrast/s_zoom.c \
145 tnl/t_array_api.c \
146 tnl/t_array_import.c \
147 tnl/t_context.c \
148 tnl/t_eval_api.c \
149 tnl/t_imm_alloc.c \
150 tnl/t_imm_api.c \
151 tnl/t_imm_debug.c \
152 tnl/t_imm_dlist.c \
153 tnl/t_imm_elt.c \
154 tnl/t_imm_eval.c \
155 tnl/t_imm_exec.c \
156 tnl/t_imm_fixup.c \
157 tnl/t_pipeline.c \
158 tnl/t_vb_fog.c \
159 tnl/t_vb_light.c \
160 tnl/t_vb_normals.c \
161 tnl/t_vb_points.c \
162 tnl/t_vb_render.c \
163 tnl/t_vb_texgen.c \
164 tnl/t_vb_texmat.c \
165 tnl/t_vb_vertex.c
166
167 X86_SOURCES = \
168 X86/x86.c \
169 X86/glapi_x86.S \
170 X86/common_x86.c \
171 X86/common_x86_asm.S \
172 X86/x86_xform2.S \
173 X86/x86_xform3.S \
174 X86/x86_xform4.S \
175 X86/x86_vertex.S \
176 X86/x86_cliptest.S
177
178 MMX_SOURCES =
179
180 SSE_SOURCES = \
181 X86/sse.c \
182 X86/sse_xform2.S \
183 X86/sse_xform3.S \
184 X86/sse_xform4.S \
185 X86/sse_vertex.S \
186 X86/sse_normal.S
187
188 D3NOW_SOURCES = \
189 X86/3dnow.c \
190 X86/3dnow_xform2.S \
191 X86/3dnow_xform3.S \
192 X86/3dnow_xform4.S \
193 X86/3dnow_vertex.S
194
195 ifdef HAVE_MMX
196 X86_SOURCES += $(MMX_SOURCES)
197 CFLAGS += -DUSE_MMX_ASM
198 HAVE_X86 = 1
199 endif
200 ifdef HAVE_SSE
201 X86_SOURCES += $(SSE_SOURCES)
202 CFLAGS += -DUSE_SSE_ASM
203 HAVE_X86 = 1
204 endif
205 ifdef HAVE_3DNOW
206 X86_SOURCES += $(D3NOW_SOURCES)
207 CFLAGS += -DUSE_3DNOW_ASM
208 HAVE_X86 = 1
209 endif
210 ifdef HAVE_X86
211 CFLAGS += -DUSE_X86_ASM
212 else
213 X86_SOURCES =
214 endif
215
216 DRIVER_SOURCES = DOS/dmesa.c DOS/video.c DOS/dpmi.c
217
218 SOURCES = $(CORE_SOURCES) $(X86_SOURCES) $(DRIVER_SOURCES)
219
220 OBJECTS = $(addsuffix .o,$(basename $(SOURCES)))
221
222 .c.o:
223 gcc -o $@ -c $(CFLAGS) $<
224 .S.o:
225 gcc -o $@ -c $(CFLAGS) $<
226
227 all: $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(GL_DXE) $(LIBDIR)/$(GL_IMP)
228
229 $(LIBDIR)/$(GL_LIB): $(OBJECTS)
230 $(AR) $(ARFLAGS) $(LIBDIR)/$(GL_LIB) $(OBJECTS)
231
232 $(LIBDIR)/$(GL_DXE) $(LIBDIR)/$(GL_IMP): $(OBJECTS)
233 ifeq ($(DXE2GEN),)
234 $(warning Missing DXE2GEN and/or DXE2.LD! You must have DXE2GEN)
235 $(warning somewhere in PATH, and DXE2.LD in DJGPP/LIB directory.)
236 else
237 dxe2gen -o $(LIBDIR)/$(GL_DXE) -I $(LIBDIR)/$(GL_IMP) $(OBJECTS) -D "Mesa DOS GL" -U
238 endif
239
240 clean:
241 -$(RM) *.o
242 ifdef HAVE_X86
243 -$(RM) X86\*.o
244 endif
245 -$(RM) DOS\*.o
246
247 include depend
248
249 DOS/dmesa.o: DOS/dmesa.c glheader.h ../include/GL/gl.h context.h glapi.h \
250 mtypes.h config.h glapitable.h glthread.h math/m_matrix.h dd.h macros.h \
251 ../include/GL/dmesa.h extensions.h matrix.h mmath.h texformat.h \
252 texstore.h array_cache/acache.h swrast/s_context.h swrast/swrast.h \
253 swrast/s_depth.h swrast/s_lines.h swrast/s_triangle.h swrast/s_trispan.h \
254 swrast_setup/swrast_setup.h tnl/tnl.h tnl/t_context.h math/m_vector.h \
255 math/m_xform.h tnl/t_pipeline.h DOS/video.h swrast/s_tritemp.h
256 DOS/dpmi.o: DOS/dpmi.c DOS/dpmiint.h
257 DOS/video.o: DOS/video.c DOS/video.h DOS/dpmiint.h