1 # Mesa 3-D graphics library
4 # Copyright (C) 1999 Brian Paul All Rights Reserved.
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:
13 # The above copyright notice and this permission notice shall be included
14 # in all copies or substantial portions of the Software.
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.
23 # DOS/DJGPP core makefile v1.0 for Mesa 4.0
25 # Copyright (C) 2002 - Borca Daniel
26 # Email : dborca@yahoo.com
27 # Web : http://www.geocities.com/dborca
34 CFLAGS = -I$(TOP)/include -I. -Wall -W -Wno-unused -mcpu=$(CPU) -ffast-math -O2
39 ifeq ($(wildcard $(DJDIR)/lib/dxe2.ld),)
42 DXE2GEN = $(wildcard $(addsuffix /dxe2gen.exe,$(subst ;, ,$(PATH))))
50 swrast_setup/ss_context.c \
51 swrast_setup/ss_triangle.c \
52 swrast_setup/ss_vb.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 \
113 array_cache/ac_context.c \
114 array_cache/ac_import.c \
116 swrast/s_aatriangle.c \
119 swrast/s_alphabuf.c \
127 swrast/s_feedback.c \
129 swrast/s_histogram.c \
135 swrast/s_pixeltex.c \
142 swrast/s_texstore.c \
143 swrast/s_triangle.c \
146 tnl/t_array_import.c \
171 X86/common_x86_asm.S \
196 X86_SOURCES += $(MMX_SOURCES)
197 CFLAGS += -DUSE_MMX_ASM
201 X86_SOURCES += $(SSE_SOURCES)
202 CFLAGS += -DUSE_SSE_ASM
206 X86_SOURCES += $(D3NOW_SOURCES)
207 CFLAGS += -DUSE_3DNOW_ASM
211 CFLAGS += -DUSE_X86_ASM
216 DRIVER_SOURCES = DOS/dmesa.c DOS/video.c DOS/dpmi.c
218 SOURCES = $(CORE_SOURCES) $(X86_SOURCES) $(DRIVER_SOURCES)
220 OBJECTS = $(addsuffix .o,$(basename $(SOURCES)))
223 gcc -o $@ -c $(CFLAGS) $<
225 gcc -o $@ -c $(CFLAGS) $<
227 all: $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(GL_DXE) $(LIBDIR)/$(GL_IMP)
229 $(LIBDIR)/$(GL_LIB): $(OBJECTS)
230 $(AR) $(ARFLAGS) $(LIBDIR)/$(GL_LIB) $(OBJECTS)
232 $(LIBDIR)/$(GL_DXE) $(LIBDIR)/$(GL_IMP): $(OBJECTS)
234 $(warning Missing DXE2GEN and/or DXE2.LD! You must have DXE2GEN)
235 $(warning somewhere in PATH, and DXE2.LD in DJGPP/LIB directory.)
237 dxe2gen -o $(LIBDIR)/$(GL_DXE) -I $(LIBDIR)/$(GL_IMP) $(OBJECTS) -D "Mesa DOS GL" -U
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