summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2003-06-10 21:47:59 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2003-06-10 21:47:59 +0000
commitde5496d2a6a3138ec5924026de5ef5afe92419cc (patch)
treefaf304157d760742b0e94188068e5ae40a59d5eb
parent5f3439916b74ed792ad12d1e614a2a5bc0a94b3a (diff)
Further makefile clean-up, concentrated on the x86 assembly files.
-rw-r--r--Make-config64
-rw-r--r--src/mesa/Makefile.X11117
-rw-r--r--src/mesa/sparc/sparc.c12
3 files changed, 84 insertions, 109 deletions
diff --git a/Make-config b/Make-config
index 963e4e6187..8da27c591a 100644
--- a/Make-config
+++ b/Make-config
@@ -150,9 +150,7 @@ freebsd-386:
"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:
@@ -414,16 +412,7 @@ linux-x86:
"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 \
@@ -439,16 +428,7 @@ linux-x86-sse:
"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 \
@@ -464,16 +444,7 @@ linux-icc:
"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:
@@ -508,9 +479,7 @@ linux-x86-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 \
@@ -543,17 +512,7 @@ linux-x86-glide:
"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 \
@@ -1011,16 +970,7 @@ linux-x86-debug:
"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 \
diff --git a/src/mesa/Makefile.X11 b/src/mesa/Makefile.X11
index 33b888095c..aaff4bb255 100644
--- a/src/mesa/Makefile.X11
+++ b/src/mesa/Makefile.X11
@@ -1,8 +1,4 @@
-# Mesa 3-D graphics library
-# Version: 5.1
-# Copyright (C) 1995-2003 Brian Paul
-
-# Makefile for core library
+# Makefile for core Mesa library
##### MACROS #####
@@ -78,10 +74,6 @@ CORE_SOURCES = \
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 \
@@ -144,8 +136,12 @@ CORE_SOURCES = \
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 \
@@ -172,20 +168,48 @@ DRIVER_SOURCES = \
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 \
@@ -198,7 +222,6 @@ INCLUDE_DIRS = \
-I$(TOP)/src/mesa/swrast_setup
-
##### RULES #####
.c.o:
@@ -208,36 +231,24 @@ INCLUDE_DIRS = \
$(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) \
@@ -253,26 +264,32 @@ $(LIBDIR)/$(OSMESA_LIB): $(OSMESA_OBJECTS)
$(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
diff --git a/src/mesa/sparc/sparc.c b/src/mesa/sparc/sparc.c
index 043b8fb31d..1eb4b922e5 100644
--- a/src/mesa/sparc/sparc.c
+++ b/src/mesa/sparc/sparc.c
@@ -1,5 +1,3 @@
-/* $Id: sparc.c,v 1.9 2003/02/08 15:43:39 brianp Exp $ */
-
/*
* Mesa 3-D graphics library
* Version: 5.1
@@ -29,6 +27,8 @@
*/
+#ifdef USE_SPARC_ASM
+
#include "context.h"
#include "math/m_xform.h"
#include "tnl/t_context.h"
@@ -151,8 +151,12 @@ extern unsigned int _mesa_sparc_glapi_begin;
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;
@@ -176,4 +180,8 @@ void _mesa_init_sparc_glapi_relocs(void)
insn_ptr += 5;
#endif
}
+#endif /* USE_SPARC_ASM */
}
+
+
+