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.1 for Mesa 4.0
25 # Copyright (C) 2002 - Borca Daniel
26 # Email : dborca@yahoo.com
27 # Web : http://www.geocities.com/dborca
33 # Environment variables:
36 # GLIDE absolute path to Glide SDK; used with FX.
37 # default = $(TOP)/include/glide3
38 # FX=1 build for 3dfx Glide3; use it if you have the glide
39 # SDK (designed for your platform), and, of course, a
40 # 3dfx card... Note that this disables compilation of
41 # actual DMesa code, as Glide does all the stuff!
43 # HAVE_X86=1 optimize for i386.
45 # HAVE_MMX=1 MMX instructions; use only if you assembler/compiler
46 # supports MMX instruction set; backwards compatibility
47 # with older processors is still preserved.
49 # HAVE_SSE=1 (see HAVE_MMX)
51 # HAVE_3DNOW=1 (see HAVE_MMX)
56 # clean: remove object files
64 GLIDE ?= $(TOP)/include/glide3
71 CFLAGS += -I$(TOP)/include -I.
73 CFLAGS += -D__DOS__ -I$(GLIDE) -DFX -DFX_GLIDE3 -DFXMESA_USE_ARGB
79 ifneq ($(wildcard $(DJDIR)/lib/dxe2.ld),)
80 DXE2GEN = $(wildcard $(addsuffix /dxe2gen.exe,$(subst ;, ,$(PATH))))
86 swrast_setup/ss_context.c \
87 swrast_setup/ss_triangle.c \
88 swrast_setup/ss_vb.c \
140 math/m_debug_clip.c \
141 math/m_debug_norm.c \
142 math/m_debug_vertex.c \
143 math/m_debug_xform.c \
150 array_cache/ac_context.c \
151 array_cache/ac_import.c \
153 swrast/s_aatriangle.c \
156 swrast/s_alphabuf.c \
164 swrast/s_feedback.c \
166 swrast/s_histogram.c \
172 swrast/s_pixeltex.c \
179 swrast/s_texstore.c \
180 swrast/s_triangle.c \
183 tnl/t_array_import.c \
208 X86/common_x86_asm.S \
234 X86_SOURCES += $(MMX_SOURCES)
235 CFLAGS += -DUSE_MMX_ASM
239 X86_SOURCES += $(SSE_SOURCES)
240 CFLAGS += -DUSE_SSE_ASM
244 X86_SOURCES += $(K3D_SOURCES)
245 CFLAGS += -DUSE_3DNOW_ASM
249 CFLAGS += -DUSE_X86_ASM
274 SOURCES = $(CORE_SOURCES) $(X86_SOURCES) $(DRIVER_SOURCES)
276 OBJECTS = $(addsuffix .o,$(basename $(SOURCES)))
279 $(CC) -o $@ -c $(CFLAGS) $<
281 $(CC) -o $@ -c $(CFLAGS) $<
283 $(CC) -o $@ -c $(CFLAGS) -x assembler-with-cpp $<
285 all: $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(GL_DXE) $(LIBDIR)/$(GL_IMP)
287 $(LIBDIR)/$(GL_LIB): $(OBJECTS)
288 $(AR) $(ARFLAGS) $(LIBDIR)/$(GL_LIB) $(OBJECTS)
290 $(LIBDIR)/$(GL_DXE) $(LIBDIR)/$(GL_IMP): $(OBJECTS)
292 $(warning Missing DXE2GEN and/or DXE2.LD! You must have DXE2GEN)
293 $(warning somewhere in PATH, and DXE2.LD in DJGPP/LIB directory.)
295 -dxe2gen -o $(LIBDIR)/$(GL_DXE) -I $(LIBDIR)/$(GL_IMP) $(OBJECTS) -E djgpp_ -E gl -E DMesa -E fxMesa -D "Mesa DJGPP GL" -U
299 -$(RM) $(subst /,\,*.o)
300 -$(RM) $(subst /,\,array_cache/*.o)
301 -$(RM) $(subst /,\,math/*.o)
302 -$(RM) $(subst /,\,swrast/*.o)
303 -$(RM) $(subst /,\,swrast_setup/*.o)
304 -$(RM) $(subst /,\,tnl/*.o)
305 -$(RM) $(subst /,\,X86/*.o)
306 -$(RM) $(subst /,\,DOS/*.o)
307 -$(RM) $(subst /,\,DOS/vesa/*.o)
308 -$(RM) $(subst /,\,FX/*.o)