"CFLAGS = -O3 -ffast-math -fPIC -pedantic -I/usr/X11R6/include -DUSE_XSHM -DHZ=100 -DUSE_X86_ASM -DFREEBSD" \
"CXXFLAGS = $(CFLAGS)" \
"APP_LIB_DEPS = -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11 -lm" \
- "ASM_SOURCES = x86/common_x86_asm.S x86/glapi_x86.S \
- x86/x86_xform2.S x86/x86_xform3.S x86/x86_xform4.S \
- x86/x86_cliptest.S"
+ "ASM_SOURCES = $(X86_SOURCES)"
#special hidden target, to make a shared lib for ONLY Mesa "core"
gcc-mesa-sl:
"GLUT_LIB_DEPS = -L$(TOP)/lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \
"GLW_LIB_DEPS = -L$(TOP)/lib -lGL -L/usr/X11R6/lib -lXt -lX11" \
"APP_LIB_DEPS = -lglut -lGLU -lGL -lm" \
- "ASM_SOURCES = x86/common_x86_asm.S x86/glapi_x86.S \
- x86/x86_xform2.S x86/x86_xform3.S x86/x86_xform4.S \
- x86/x86_cliptest.S \
- x86/mmx_blend.S \
- x86/3dnow_xform1.S x86/3dnow_xform2.S \
- x86/3dnow_xform3.S x86/3dnow_xform4.S \
- x86/3dnow_normal.S \
- x86/sse_xform1.S x86/sse_xform2.S \
- x86/sse_xform3.S x86/sse_xform4.S \
- x86/sse_normal.S"
+ "ASM_SOURCES = $(X86_SOURCES)"
linux-x86-sse:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
"GLU_LIB_DEPS = -L$(TOP)/lib -lGL -lm" \
"GLUT_LIB_DEPS = -L$(TOP)/lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \
"APP_LIB_DEPS = -lm" \
- "ASM_SOURCES = x86/common_x86_asm.S x86/glapi_x86.S \
- x86/x86_xform2.S x86/x86_xform3.S x86/x86_xform4.S \
- x86/x86_cliptest.S \
- x86/mmx_blend.S \
- x86/3dnow_xform1.S x86/3dnow_xform2.S \
- x86/3dnow_xform3.S x86/3dnow_xform4.S \
- x86/3dnow_normal.S \
- x86/sse_xform1.S x86/sse_xform2.S \
- x86/sse_xform3.S x86/sse_xform4.S \
- x86/sse_normal.S"
+ "ASM_SOURCES = $(X86_SOURCES)"
linux-icc:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
"GLU_LIB_DEPS = -L$(TOP)/lib -lGL -lm" \
"GLUT_LIB_DEPS = -L$(TOP)/lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \
"APP_LIB_DEPS = -lm" \
- "ASM_SOURCES = x86/common_x86_asm.S x86/glapi_x86.S \
- x86/x86_xform2.S x86/x86_xform3.S x86/x86_xform4.S \
- x86/x86_cliptest.S \
- x86/mmx_blend.S \
- x86/3dnow_xform1.S x86/3dnow_xform2.S \
- x86/3dnow_xform3.S x86/3dnow_xform4.S \
- x86/3dnow_normal.S \
- x86/sse_xform1.S x86/sse_xform2.S \
- x86/sse_xform3.S x86/sse_xform4.S \
- x86/sse_normal.S"
+ "ASM_SOURCES = $(X86_SOURCES)"
# Contributed by Uwe_Maurer@t-online.de
linux-ggi:
"GLU_LIB_DEPS = -L$(TOP)/lib -lGL -lm" \
"GLUT_LIB_DEPS = -L$(TOP)/lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \
"APP_LIB_DEPS = -lm" \
- "ASM_SOURCES = x86/common_x86_asm.S x86/glapi_x86.S \
- x86/x86_xform2.S x86/x86_xform3.S x86/x86_xform4.S \
- x86/x86_cliptest.S"
+ "ASM_SOURCES = $(X86_SOURCES)"
linux-glide:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
"GLUT_LIB_DEPS = -L$(TOP)/lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \
"GLW_LIB_DEPS = -L$(TOP)/lib -lGL -L/usr/X11R6/lib -lXt -lX11" \
"APP_LIB_DEPS = -lglut -lGLU -lGL -lm" \
- "ASM_SOURCES = x86/common_x86_asm.S x86/glapi_x86.S \
- x86/x86_xform2.S x86/x86_xform3.S x86/x86_xform4.S \
- x86/x86_cliptest.S \
- x86/mmx_blend.S \
- x86/3dnow_xform1.S x86/3dnow_xform2.S \
- x86/3dnow_xform3.S x86/3dnow_xform4.S \
- x86/3dnow_normal.S \
- FX/x86/fx_3dnow_fastpath.S \
- x86/sse_xform1.S x86/sse_xform2.S \
- x86/sse_xform3.S x86/sse_xform4.S \
- x86/sse_normal.S "
+ "ASM_SOURCES = $(X86_SOURCES)"
linux-alpha:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
"GLU_LIB_DEPS = -L$(TOP)/lib -lGL -lm" \
"GLUT_LIB_DEPS = -L$(TOP)/lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \
"APP_LIB_DEPS = -lm" \
- "ASM_SOURCES = x86/common_x86_asm.S x86/glapi_x86.S \
- x86/x86_xform2.S x86/x86_xform3.S x86/x86_xform4.S \
- x86/x86_cliptest.S \
- x86/mmx_blend.S \
- x86/3dnow_xform1.S x86/3dnow_xform2.S \
- x86/3dnow_xform3.S x86/3dnow_xform4.S \
- x86/3dnow_normal.S \
- x86/sse_xform1.S x86/sse_xform2.S \
- x86/sse_xform3.S x86/sse_xform4.S \
- x86/sse_normal.S"
+ "ASM_SOURCES = $(X86_SOURCES)"
linux-glide-debug:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
-# Mesa 3-D graphics library
-# Version: 5.1
-# Copyright (C) 1995-2003 Brian Paul
-
-# Makefile for core library
+# Makefile for core Mesa library
##### MACROS #####
main/texutil.c \
main/varray.c \
main/vtxfmt.c \
- x86/x86.c \
- x86/common_x86.c \
- x86/3dnow.c \
- x86/sse.c \
math/m_debug_clip.c \
math/m_debug_norm.c \
math/m_debug_xform.c \
tnl/t_vb_render.c \
tnl/t_vb_texgen.c \
tnl/t_vb_texmat.c \
- tnl/t_vb_vertex.c
-
+ tnl/t_vb_vertex.c \
+ x86/common_x86.c \
+ x86/x86.c \
+ x86/3dnow.c \
+ x86/sse.c \
+ sparc/sparc.c
DRIVER_SOURCES = \
drivers/glide/fxapi.c \
drivers/svga/svgamesa24.c \
drivers/svga/svgamesa32.c
-
+X86_SOURCES = \
+ x86/common_x86_asm.S \
+ x86/glapi_x86.S \
+ x86/x86_xform2.S \
+ x86/x86_xform3.S \
+ x86/x86_xform4.S \
+ x86/x86_cliptest.S \
+ x86/mmx_blend.S \
+ x86/3dnow_xform1.S \
+ x86/3dnow_xform2.S \
+ x86/3dnow_xform3.S \
+ x86/3dnow_xform4.S \
+ x86/3dnow_normal.S \
+ x86/sse_xform1.S \
+ x86/sse_xform2.S \
+ x86/sse_xform3.S \
+ x86/sse_xform4.S \
+ x86/sse_normal.S
+
+SPARC_SOURCES = \
+ sparc/clip.S \
+ sparc/glapi_sparc.S \
+ sparc/norm.S \
+ sparc/xform.S
+
+OSMESA_SOURCES = \
+ drivers/osmesa/osmesa.c
+
+
+
+# This will probably get set to $(X86_SOURCES) in Make-config:
ASM_SOURCES =
-ADDITIONAL_OBJ =
-
-OBJECTS = $(ASM_SOURCES:.S=.o) \
- $(CORE_SOURCES:.c=.o) \
- $(DRIVER_SOURCES:.c=.o) \
- $(ADDITIONAL_OBJ)
+OBJECTS = \
+ $(CORE_SOURCES:.c=.o) \
+ $(ASM_SOURCES:.S=.o) \
+ $(DRIVER_SOURCES:.c=.o)
CORE_OBJECTS = $(CORE_SOURCES:.c=.o)
-OSMESA_SOURCES = drivers/osmesa/osmesa.c
-OSMESA_OBJECTS = drivers/osmesa/osmesa.o
+OSMESA_OBJECTS = $(OSMESA_SOURCES:.c=.o)
+
INCLUDE_DIRS = \
-I$(TOP)/include \
-I$(TOP)/src/mesa/swrast_setup
-
##### RULES #####
.c.o:
$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
-x86/x86.o: x86/x86.c
- $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
-x86/common_x86.o: x86/common_x86.c
- $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
-x86/common_x86_asm.o: x86/common_x86_asm.S x86/matypes.h
-x86/3dnow.o: x86/3dnow.c
- $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
-x86/sse.o: x86/sse.c
- $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
x86/matypes.h: main/mtypes.h tnl/t_context.h x86/gen_matypes.c
$(CC) $(INCLUDE_DIRS) $(CFLAGS) x86/gen_matypes.c -o x86/gen_matypes
./x86/gen_matypes > x86/matypes.h
rm -f x86/gen_matypes x86/*.o
-# We have x86/matypes.h depend on x86/matypes.h so that if ASM_SOURCES
-# is empty we don't get an invalid Makefile.
-$(ASM_SOURCES) x86/matypes.h: x86/matypes.h
+x86/common_x86_asm.o: x86/matypes.h
+
##### TARGETS #####
-#default:
-# @echo "Specify a target configuration"
+default:
+ @echo "Specify a target configuration"
-clean:
- -rm -f *.o *~ */*.o */*~ *.lo *.la
- -rm -rf .libs
targets: $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(OSMESA_LIB)
+
# Make the GL library
$(LIBDIR)/$(GL_LIB): $(OBJECTS)
$(TOP)/bin/mklib -o $(GL_LIB_NAME) -major $(GL_MAJOR) \
$(OSMESA_OBJECTS) ; fi
# Make an optional library with _just_ core objects
-libmesa: $(LIBDIR)/$(MESA_LIB)
+libmesa: $(LIBDIR)/$(MESA_LIB)
if [ ${MESA_LIB} ] ; then $(MAKELIB) $(MESA_LIB) $(MESA_MAJOR) $(MESA_MINOR) $(GL_TINY) $(CORE_OBJECTS) ; fi
if [ ${MESA_LIB} ] ; then rm -f $(LIBDIR)/$(MESA_LIB)* ; fi
if [ ${MESA_LIB} ] ; then mv $(MESA_LIB)* $(LIBDIR) ; fi
-
$(LIBDIR)/$(MESA_LIB): $(CORE_OBJECTS)
-include $(TOP)/Make-config
-
-include depend
+# Run 'make -f Makefile.X11 dep' to update the dependencies if you change
+# what's included by any source file.
+dep: $(CORE_SOURCES) $(DRIVER_SOURCES) $(OSMESA_SOURCES) $(ASM_SOURCES)
+ makedepend -fdepend -Y -I../include -DGGI -DSVGA -DFX $(CORE_SOURCES) $(DRIVER_SOURCES) $(OSMESA_SOURCES) $(ASM_SOURCES)
-#
-# Run 'make dep' to update the dependencies if you change what's included
-# by any source file.
-#
-dep: $(CORE_SOURCES) $(DRIVER_SOURCES) $(OSMESA_SOURCES)
- makedepend -fdepend -Y -I../include -DGGI -DSVGA -DFX $(CORE_SOURCES) $(DRIVER_SOURCES) $(OSMESA_SOURCES)
-
+# Emacs tags
tags:
etags `find . -name \*.[ch]` `find ../include`
+
+
+# Clean up .o and backup files
+clean:
+ -rm -f */*.o */*~ */*.o */*~
+ -rm -f drivers/*/*.o
+ -rm -f drivers/dri/*/*.o
+
+
+include $(TOP)/Make-config
+
+include depend
-/* $Id: sparc.c,v 1.9 2003/02/08 15:43:39 brianp Exp $ */
-
/*
* Mesa 3-D graphics library
* Version: 5.1
*/
+#ifdef USE_SPARC_ASM
+
#include "context.h"
#include "math/m_xform.h"
#include "tnl/t_context.h"
extern unsigned int _mesa_sparc_glapi_end;
extern void __glapi_sparc_icache_flush(unsigned int *);
+#endif /* USE_SPARC_ASM */
+
+
void _mesa_init_sparc_glapi_relocs(void)
{
+#ifdef USE_SPARC_ASM
unsigned int *insn_ptr, *end_ptr;
unsigned long disp_addr;
insn_ptr += 5;
#endif
}
+#endif /* USE_SPARC_ASM */
}
+
+
+