More clean-ups and re-org
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 13 Jun 2003 02:32:28 +0000 (02:32 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 13 Jun 2003 02:32:28 +0000 (02:32 +0000)
src/mesa/Makefile.X11

index aaff4bb..ae9f89c 100644 (file)
@@ -17,10 +17,9 @@ VPATH = RCS
 LIBDIR = $(TOP)/lib
 
 
+### Lists of source files
 
-CORE_SOURCES = \
-       glapi/glapi.c \
-       glapi/glthread.c \
+MAIN_SOURCES = \
        main/api_arrayelt.c \
        main/api_loopback.c \
        main/api_noop.c \
@@ -73,7 +72,13 @@ CORE_SOURCES = \
        main/texstore.c \
        main/texutil.c \
        main/varray.c \
-       main/vtxfmt.c \
+       main/vtxfmt.c
+
+GLAPI_SOURCES = \
+       glapi/glapi.c \
+       glapi/glthread.c
+
+MATH_SOURCES = \
        math/m_debug_clip.c \
        math/m_debug_norm.c \
        math/m_debug_xform.c \
@@ -81,9 +86,13 @@ CORE_SOURCES = \
        math/m_matrix.c \
        math/m_translate.c \
        math/m_vector.c \
-       math/m_xform.c \
+       math/m_xform.c
+
+ARRAY_CACHE_SOURCES = \
        array_cache/ac_context.c \
-       array_cache/ac_import.c \
+       array_cache/ac_import.c
+
+SWRAST_SOURCES = \
        swrast/s_aaline.c \
        swrast/s_aatriangle.c \
        swrast/s_accum.c \
@@ -111,10 +120,14 @@ CORE_SOURCES = \
        swrast/s_texture.c \
        swrast/s_texstore.c \
        swrast/s_triangle.c \
-       swrast/s_zoom.c \
+       swrast/s_zoom.c
+
+SWRAST_SETUP_SOURCES = \
        swrast_setup/ss_context.c \
        swrast_setup/ss_triangle.c \
-       swrast_setup/ss_vb.c \
+       swrast_setup/ss_vb.c
+
+TNL_SOURCES = \
        tnl/t_array_api.c \
        tnl/t_array_import.c \
        tnl/t_context.c \
@@ -136,39 +149,16 @@ CORE_SOURCES = \
        tnl/t_vb_render.c \
        tnl/t_vb_texgen.c \
        tnl/t_vb_texmat.c \
-       tnl/t_vb_vertex.c \
-       x86/common_x86.c        \
-       x86/x86.c               \
-       x86/3dnow.c             \
-       x86/sse.c               \
-       sparc/sparc.c
+       tnl/t_vb_vertex.c
 
-DRIVER_SOURCES = \
-       drivers/glide/fxapi.c \
-       drivers/glide/fxdd.c \
-       drivers/glide/fxddspan.c \
-       drivers/glide/fxddtex.c \
-       drivers/glide/fxsetup.c \
-       drivers/glide/fxtexman.c \
-       drivers/glide/fxtris.c \
-       drivers/glide/fxvb.c \
-       drivers/glide/fxglidew.c \
-       drivers/x11/glxapi.c \
-       drivers/x11/fakeglx.c \
-       drivers/x11/xfonts.c \
-       drivers/x11/xm_api.c \
-       drivers/x11/xm_dd.c \
-       drivers/x11/xm_line.c \
-       drivers/x11/xm_span.c \
-       drivers/x11/xm_tri.c \
-       drivers/svga/svgamesa.c \
-       drivers/svga/svgamesa8.c \
-       drivers/svga/svgamesa15.c \
-       drivers/svga/svgamesa16.c \
-       drivers/svga/svgamesa24.c \
-       drivers/svga/svgamesa32.c
+ASM_C_SOURCES =        \
+       x86/common_x86.c \
+       x86/x86.c \
+       x86/3dnow.c \
+       x86/sse.c \
+       sparc/sparc.c
 
-X86_SOURCES = \
+X86_SOURCES =                  \
        x86/common_x86_asm.S    \
        x86/glapi_x86.S         \
        x86/x86_xform2.S        \
@@ -187,29 +177,85 @@ X86_SOURCES = \
        x86/sse_xform4.S        \
        x86/sse_normal.S
 
-SPARC_SOURCES = \
+SPARC_SOURCES =                        \
        sparc/clip.S            \
        sparc/glapi_sparc.S     \
        sparc/norm.S            \
        sparc/xform.S
 
-OSMESA_SOURCES = \
+X11_DRIVER_SOURCES =           \
+       drivers/x11/glxapi.c    \
+       drivers/x11/fakeglx.c   \
+       drivers/x11/xfonts.c    \
+       drivers/x11/xm_api.c    \
+       drivers/x11/xm_dd.c     \
+       drivers/x11/xm_line.c   \
+       drivers/x11/xm_span.c   \
+       drivers/x11/xm_tri.c
+
+OSMESA_DRIVER_SOURCES = \
        drivers/osmesa/osmesa.c
 
+GLIDE_DRIVER_SOURCES =                 \
+       drivers/glide/fxapi.c           \
+       drivers/glide/fxdd.c            \
+       drivers/glide/fxddspan.c        \
+       drivers/glide/fxddtex.c         \
+       drivers/glide/fxsetup.c         \
+       drivers/glide/fxtexman.c        \
+       drivers/glide/fxtris.c          \
+       drivers/glide/fxvb.c            \
+       drivers/glide/fxglidew.c
+
+SVGA_DRIVER_SOURCES =                  \
+       drivers/svga/svgamesa.c         \
+       drivers/svga/svgamesa8.c        \
+       drivers/svga/svgamesa15.c       \
+       drivers/svga/svgamesa16.c       \
+       drivers/svga/svgamesa24.c       \
+       drivers/svga/svgamesa32.c
+
+
 
+### Groups of files
+
+CORE_SOURCES = \
+       $(MAIN_SOURCES)         \
+       $(GLAPI_SOURCES)        \
+       $(MATH_SOURCES)         \
+       $(ARRAY_CACHE_SOURCES)  \
+       $(SWRAST_SOURCES)       \
+       $(SWRAST_SETUP_SOURCES) \
+       $(TNL_SOURCES)          \
+       $(ASM_C_SOURCES)
 
 # This will probably get set to $(X86_SOURCES) in Make-config:
 ASM_SOURCES =
 
-OBJECTS = \
-       $(CORE_SOURCES:.c=.o)   \
-       $(ASM_SOURCES:.S=.o)    \
-       $(DRIVER_SOURCES:.c=.o)
+# This should get set in Make-config someday:
+DRIVER_SOURCES = \
+       $(X11_DRIVER_SOURCES) \
+       $(GLIDE_DRIVER_SOURCES) \
+       $(SVGA_DRIVER_SOURCES)
+
+
+### Object files
 
 CORE_OBJECTS = $(CORE_SOURCES:.c=.o)
 
-OSMESA_OBJECTS = $(OSMESA_SOURCES:.c=.o)
+DRIVER_OBJECTS = $(DRIVER_SOURCES:.c=.o)
+
+ASM_OBJECTS = $(ASM_SOURCES:.S=.o)
 
+OSMESA_OBJECTS = $(OSMESA_DRIVER_SOURCES:.c=.o)
+
+OBJECTS = \
+       $(CORE_OBJECTS) \
+       $(ASM_OBJECTS) \
+       $(DRIVER_OBJECTS)
+
+
+### Include directories
 
 INCLUDE_DIRS = \
        -I$(TOP)/include \
@@ -222,6 +268,7 @@ INCLUDE_DIRS = \
        -I$(TOP)/src/mesa/swrast_setup
 
 
+
 ##### RULES #####
 
 .c.o:
@@ -274,8 +321,9 @@ $(LIBDIR)/$(MESA_LIB):      $(CORE_OBJECTS)
 
 # 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)
+dep: $(CORE_SOURCES) $(DRIVER_SOURCES) $(OSMESA_DRIVER_SOURCES) $(ASM_SOURCES)
+       makedepend -fdepend -Y -I../include -DGGI -DSVGA -DFX $(CORE_SOURCES) \
+               $(DRIVER_SOURCES) $(OSMESA_DRIVER_SOURCES) $(ASM_SOURCES)
 
 
 # Emacs tags
@@ -283,7 +331,7 @@ tags:
        etags `find . -name \*.[ch]` `find ../include`
 
 
-# Clean up .o and backup files
+# Remove .o and backup files
 clean:
        -rm -f */*.o */*~ */*.o */*~
        -rm -f drivers/*/*.o