summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/Makefile.template1
-rw-r--r--src/gallium/auxiliary/Makefile6
-rw-r--r--src/gallium/auxiliary/cso_cache/Makefile18
-rw-r--r--src/gallium/auxiliary/draw/Makefile41
-rw-r--r--src/gallium/auxiliary/tgsi/Makefile24
-rw-r--r--src/gallium/auxiliary/tgsi/exec/Makefile3
-rw-r--r--src/gallium/auxiliary/util/Makefile20
-rw-r--r--src/gallium/drivers/Makefile6
-rw-r--r--src/gallium/winsys/Makefile20
-rw-r--r--src/gallium/winsys/dri/Makefile.template6
-rw-r--r--src/gallium/winsys/xlib/Makefile113
-rw-r--r--src/mesa/Makefile74
-rw-r--r--src/mesa/sources56
13 files changed, 247 insertions, 141 deletions
diff --git a/src/gallium/Makefile.template b/src/gallium/Makefile.template
index 83b25f9b47c..6ad58c205c2 100644
--- a/src/gallium/Makefile.template
+++ b/src/gallium/Makefile.template
@@ -20,6 +20,7 @@ INCLUDES = \
-I$(TOP)/src/gallium/auxiliary \
-I$(TOP)/src/gallium/drivers \
-I$(TOP)/src/mesa \
+ -I$(TOP)/src/mesa/main \
-I$(TOP)/include \
$(DRIVER_INCLUDES)
diff --git a/src/gallium/auxiliary/Makefile b/src/gallium/auxiliary/Makefile
index da68498aa1f..eaa0f2fe4e8 100644
--- a/src/gallium/auxiliary/Makefile
+++ b/src/gallium/auxiliary/Makefile
@@ -2,11 +2,7 @@ TOP = ../../..
include $(TOP)/configs/current
-ifeq ($(CONFIG_NAME), linux-llvm)
-LLVM_DIR = llvm
-endif
-
-SUBDIRS = pipebuffer $(LLVM_DIR)
+SUBDIRS = $(GALLIUM_AUXILIARY_DIRS)
default: subdirs
diff --git a/src/gallium/auxiliary/cso_cache/Makefile b/src/gallium/auxiliary/cso_cache/Makefile
new file mode 100644
index 00000000000..8248b097fde
--- /dev/null
+++ b/src/gallium/auxiliary/cso_cache/Makefile
@@ -0,0 +1,18 @@
+TOP = ../../../..
+include $(TOP)/configs/current
+
+LIBNAME = cso_cache
+
+DRIVER_SOURCES = \
+ cso_cache.c \
+ cso_hash.c
+
+C_SOURCES = \
+ $(DRIVER_SOURCES)
+
+ASM_SOURCES =
+
+include ../../Makefile.template
+
+symlinks:
+
diff --git a/src/gallium/auxiliary/draw/Makefile b/src/gallium/auxiliary/draw/Makefile
index fe9b150f304..c56b63d85b8 100644
--- a/src/gallium/auxiliary/draw/Makefile
+++ b/src/gallium/auxiliary/draw/Makefile
@@ -1,2 +1,39 @@
-default:
- cd ../../../mesa ; make
+TOP = ../../../..
+include $(TOP)/configs/current
+
+LIBNAME = draw
+
+DRIVER_SOURCES = \
+ draw_clip.c \
+ draw_vs_exec.c \
+ draw_vs_sse.c \
+ draw_vs_llvm.c \
+ draw_context.c\
+ draw_cull.c \
+ draw_debug.c \
+ draw_flatshade.c \
+ draw_offset.c \
+ draw_prim.c \
+ draw_stipple.c \
+ draw_twoside.c \
+ draw_unfilled.c \
+ draw_validate.c \
+ draw_vbuf.c \
+ draw_vertex.c \
+ draw_vertex_cache.c \
+ draw_vertex_fetch.c \
+ draw_vertex_shader.c \
+ draw_vf.c \
+ draw_vf_generic.c \
+ draw_vf_sse.c \
+ draw_wide_prims.c
+
+C_SOURCES = \
+ $(DRIVER_SOURCES)
+
+ASM_SOURCES =
+
+include ../../Makefile.template
+
+symlinks:
+
diff --git a/src/gallium/auxiliary/tgsi/Makefile b/src/gallium/auxiliary/tgsi/Makefile
index 12a8bd0409e..c10ab396d8d 100644
--- a/src/gallium/auxiliary/tgsi/Makefile
+++ b/src/gallium/auxiliary/tgsi/Makefile
@@ -1,3 +1,23 @@
-default:
- cd ../.. ; make
+
+TOP = ../../../..
+include $(TOP)/configs/current
+
+LIBNAME = tgsi
+
+DRIVER_SOURCES = \
+ exec/tgsi_exec.c \
+ exec/tgsi_sse2.c \
+ util/tgsi_build.c \
+ util/tgsi_dump.c \
+ util/tgsi_parse.c \
+ util/tgsi_util.c
+
+C_SOURCES = \
+ $(DRIVER_SOURCES)
+
+ASM_SOURCES =
+
+include ../../Makefile.template
+
+symlinks:
diff --git a/src/gallium/auxiliary/tgsi/exec/Makefile b/src/gallium/auxiliary/tgsi/exec/Makefile
deleted file mode 100644
index eb8b14e0e89..00000000000
--- a/src/gallium/auxiliary/tgsi/exec/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-default:
- cd ../../.. ; make
-
diff --git a/src/gallium/auxiliary/util/Makefile b/src/gallium/auxiliary/util/Makefile
new file mode 100644
index 00000000000..b8cb148c4f5
--- /dev/null
+++ b/src/gallium/auxiliary/util/Makefile
@@ -0,0 +1,20 @@
+
+TOP = ../../../..
+include $(TOP)/configs/current
+
+LIBNAME = util
+
+DRIVER_SOURCES = \
+ p_debug.c \
+ p_tile.c \
+ p_util.c
+
+C_SOURCES = \
+ $(DRIVER_SOURCES)
+
+ASM_SOURCES =
+
+include ../../Makefile.template
+
+symlinks:
+
diff --git a/src/gallium/drivers/Makefile b/src/gallium/drivers/Makefile
index c0345a9cb54..8dcfb18a16f 100644
--- a/src/gallium/drivers/Makefile
+++ b/src/gallium/drivers/Makefile
@@ -2,11 +2,7 @@ TOP = ../../..
include $(TOP)/configs/current
-ifeq ($(CONFIG_NAME), linux-cell)
-CELL_DIR = cell
-endif
-
-SUBDIRS = softpipe i915simple i965simple failover pipebuffer $(CELL_DIR)
+SUBDIRS = softpipe i915simple i965simple failover
default: subdirs
diff --git a/src/gallium/winsys/Makefile b/src/gallium/winsys/Makefile
new file mode 100644
index 00000000000..3dc5ea57441
--- /dev/null
+++ b/src/gallium/winsys/Makefile
@@ -0,0 +1,20 @@
+TOP = ../../..
+include $(TOP)/configs/current
+
+
+SUBDIRS = $(GALLIUM_WINSYS_DIRS)
+
+
+default: subdirs
+
+
+subdirs:
+ @for dir in $(SUBDIRS) ; do \
+ if [ -d $$dir ] ; then \
+ (cd $$dir && $(MAKE)) || exit 1 ; \
+ fi \
+ done
+
+
+clean:
+ rm -f `find . -name \*.[oa]`
diff --git a/src/gallium/winsys/dri/Makefile.template b/src/gallium/winsys/dri/Makefile.template
index 2a261ed6694..65a93bd53e3 100644
--- a/src/gallium/winsys/dri/Makefile.template
+++ b/src/gallium/winsys/dri/Makefile.template
@@ -1,7 +1,9 @@
# -*-makefile-*-
-MESA_MODULES = $(TOP)/src/mesa/libmesa.a
-
+MESA_MODULES = \
+ $(TOP)/src/mesa/libmesa.a \
+ $(GALLIUM_AUXILIARIES)
+
COMMON_GALLIUM_SOURCES = \
$(TOP)/src/mesa/drivers/dri/common/utils.c \
$(TOP)/src/mesa/drivers/dri/common/vblank.c \
diff --git a/src/gallium/winsys/xlib/Makefile b/src/gallium/winsys/xlib/Makefile
new file mode 100644
index 00000000000..2664ac47ceb
--- /dev/null
+++ b/src/gallium/winsys/xlib/Makefile
@@ -0,0 +1,113 @@
+# src/mesa/Makefile
+
+TOP = ../../../..
+include $(TOP)/configs/current
+
+
+INCLUDE_DIRS = \
+ -I$(TOP)/include \
+ -I$(TOP)/src/mesa \
+ -I$(TOP)/src/mesa/main \
+ -I$(TOP)/src/gallium/include \
+ -I$(TOP)/src/gallium/drivers \
+ -I$(TOP)/src/gallium/auxiliary
+
+X11_DRIVER_SOURCES = \
+ glxapi.c \
+ fakeglx.c \
+ xfonts.c \
+ xm_api.c \
+ xm_winsys.c \
+ xm_winsys_aub.c \
+ brw_aub.c
+
+
+GL_MAJOR = 1
+GL_MINOR = 5
+GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY)
+
+
+PIPE_LIB = \
+ $(GALLIUM_DRIVERS) \
+ $(TOP)/src/mesa/libglapi.a \
+ $(TOP)/src/mesa/libmesa.a \
+ $(GALLIUM_AUXILIARIES)
+
+ifeq ($(CONFIG_NAME), linux-cell)
+CELL_LIB = $(TOP)/src/gallium/drivers/cell/ppu/libcell.a
+CELL_LIB_SPU = $(TOP)/src/gallium/drivers/cell/spu/g3d_spu.a
+endif
+
+ifeq ($(CONFIG_NAME), linux-llvm)
+LLVM_LIB = $(TOP)/src/gallium/auxiliary/llvm/libgallivm.a
+endif
+
+
+.SUFFIXES : .cpp
+
+.c.o:
+ $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
+
+.cpp.o:
+ $(CXX) -c $(INCLUDE_DIRS) $(CXXFLAGS) $< -o $@
+
+.S.o:
+ $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
+
+
+default: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
+
+
+######################################################################
+# Stand-alone Mesa libGL and libOSMesa
+STAND_ALONE_DRIVER_SOURCES = \
+ $(X11_DRIVER_SOURCES)
+
+STAND_ALONE_DRIVER_OBJECTS = $(STAND_ALONE_DRIVER_SOURCES:.c=.o)
+
+STAND_ALONE_OBJECTS = \
+ $(STAND_ALONE_DRIVER_OBJECTS)
+
+# Make the GL library
+$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS) $(LLVM_LIB) $(PIPE_LIB) $(CELL_LIB) $(CELL_LIB_SPU)
+ $(TOP)/bin/mklib -o $(GL_LIB) \
+ -linker "$(CC)" \
+ -major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \
+ -install $(TOP)/$(LIB_DIR) \
+ $(MKLIB_OPTIONS) $(STAND_ALONE_OBJECTS) \
+ --start-group $(PIPE_LIB) $(LLVM_LIB) --end-group $(CELL_LIB) $(CELL_LIB_SPU) $(GL_LIB_DEPS)
+
+
+######################################################################
+# Generic stuff
+
+depend: $(ALL_SOURCES)
+ @ echo "running $(MKDEP)"
+ @ rm -f depend # workaround oops on gutsy?!?
+ @ touch depend
+ @ $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(ALL_SOURCES) \
+ > /dev/null 2>/dev/null
+
+
+install: default
+ $(INSTALL) -d $(INSTALL_DIR)/include/GL
+ $(INSTALL) -d $(INSTALL_DIR)/$(LIB_DIR)
+ $(INSTALL) -m 644 $(TOP)/include/GL/*.h $(INSTALL_DIR)/include/GL
+ @if [ -e $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) ]; then \
+ $(INSTALL) $(TOP)/$(LIB_DIR)/libGL* $(INSTALL_DIR)/$(LIB_DIR); \
+ fi
+
+## NOT INSTALLED YET:
+## $(INSTALL) -d $(INSTALL_DIR)/include/GLES
+## $(INSTALL) -m 644 include/GLES/*.h $(INSTALL_DIR)/include/GLES
+
+
+# Emacs tags
+tags:
+ etags `find . -name \*.[ch]` $(TOP)/include/GL/*.h
+
+clean:
+ -rm -f *.o
+
+
+include depend
diff --git a/src/mesa/Makefile b/src/mesa/Makefile
index c8cb2b592fe..86a9cf0b88c 100644
--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
@@ -11,19 +11,6 @@ GL_MINOR = 5
GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY)
-PIPE_LIB = \
- $(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \
- $(TOP)/src/gallium/drivers/i965simple/libi965simple.a
-
-ifeq ($(CONFIG_NAME), linux-cell)
-CELL_LIB = $(TOP)/src/gallium/drivers/cell/ppu/libcell.a
-CELL_LIB_SPU = $(TOP)/src/gallium/drivers/cell/spu/g3d_spu.a
-endif
-
-ifeq ($(CONFIG_NAME), linux-llvm)
-LLVM_LIB = $(TOP)/src/gallium/auxiliary/llvm/libgallivm.a
-endif
-
.SUFFIXES : .cpp
.c.o:
@@ -36,33 +23,14 @@ endif
$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
-# Figure out what to make here
-default:
- @if [ "${DRIVER_DIRS}" = "dri" ] ; then \
- $(MAKE) linux-solo ; \
- elif [ "${DRIVER_DIRS}" = "osmesa" ] ; then \
- $(MAKE) osmesa-only ; \
- elif [ "$(DRIVER_DIRS)" = "beos" ]; then \
- $(MAKE) beos ; \
- elif [ "$(DRIVER_DIRS)" = "directfb" ]; then \
- $(MAKE) directfb ; \
- elif [ "$(DRIVER_DIRS)" = "fbdev osmesa" ]; then \
- $(MAKE) fbdev ; $(MAKE) osmesa-only ; \
- else \
- $(MAKE) stand-alone ; \
- fi
-
+default: depend subdirs libmesa.a
-######################################################################
-# BeOS driver target
-
-beos: depend subdirs libmesa.a
- cd drivers/beos; $(MAKE)
+ifneq ($(DRIVER_DIRS),dri)
+default: libglapi.a
+endif
######################################################################
-# Linux DRI drivers
-
# Make archive of core object files
libmesa.a: $(SOLO_OBJECTS)
@ $(TOP)/bin/mklib -o mesa -static $(SOLO_OBJECTS);
@@ -70,32 +38,8 @@ libmesa.a: $(SOLO_OBJECTS)
mimeset -f "$@" ; \
fi
-linux-solo: depend subdirs libmesa.a
- cd $(TOP)/src/gallium/winsys/dri ; $(MAKE)
-
-
-#####################################################################
-# Stand-alone Mesa libGL, no built-in drivers (DirectFB)
-
-libgl-core: $(CORE_OBJECTS)
- @ $(TOP)/bin/mklib -o $(GL_LIB) \
- -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
- -install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) $(CORE_OBJECTS) \
- $(GL_LIB_DEPS)
-
-directfb: depend subdirs libgl-core
- cd drivers/directfb ; $(MAKE)
-
-
-#####################################################################
-# fbdev Mesa driver (libGL.so)
-
-fbdev: $(CORE_OBJECTS) $(FBDEV_DRIVER_OBJECTS) $(COMMON_DRIVER_OBJECTS)
- @ $(TOP)/bin/mklib -o $(GL_LIB) \
- -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
- -install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
- $(CORE_OBJECTS) $(FBDEV_DRIVER_OBJECTS) \
- $(COMMON_DRIVER_OBJECTS) $(GL_LIB_DEPS)
+libglapi.a: $(GLAPI_OBJECTS)
+ @ $(TOP)/bin/mklib -o glapi -static $(GLAPI_OBJECTS)
######################################################################
@@ -176,9 +120,6 @@ install: default
@if [ -e $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME) ]; then \
$(INSTALL) $(TOP)/$(LIB_DIR)/libOSMesa* $(INSTALL_DIR)/$(LIB_DIR); \
fi
- @if [ "${DRIVER_DIRS}" = "dri" ] ; then \
- cd $(TOP)/gallium/winsys/dri ; $(MAKE) install ; \
- fi
## NOT INSTALLED YET:
## $(INSTALL) -d $(INSTALL_DIR)/include/GLES
@@ -192,9 +133,8 @@ tags:
clean:
-rm -f */*.o
-rm -f */*/*.o
- -rm -f depend depend.bak libmesa.a
+ -rm -f depend depend.bak libmesa.a libglapi.a
-rm -f drivers/*/*.o
- (cd drivers/dri && $(MAKE) clean)
(cd x86 && $(MAKE) clean)
(cd x86-64 && $(MAKE) clean)
diff --git a/src/mesa/sources b/src/mesa/sources
index f83d247a1e2..0d185fd5f3f 100644
--- a/src/mesa/sources
+++ b/src/mesa/sources
@@ -156,51 +156,6 @@ VF_SOURCES = \
vf/vf_generic.c \
vf/vf_sse.c
-
-DRAW_SOURCES = \
- $(TOP)/src/gallium/auxiliary/draw/draw_clip.c \
- $(TOP)/src/gallium/auxiliary/draw/draw_vs_exec.c \
- $(TOP)/src/gallium/auxiliary/draw/draw_vs_sse.c \
- $(TOP)/src/gallium/auxiliary/draw/draw_vs_llvm.c \
- $(TOP)/src/gallium/auxiliary/draw/draw_context.c\
- $(TOP)/src/gallium/auxiliary/draw/draw_cull.c \
- $(TOP)/src/gallium/auxiliary/draw/draw_debug.c \
- $(TOP)/src/gallium/auxiliary/draw/draw_flatshade.c \
- $(TOP)/src/gallium/auxiliary/draw/draw_offset.c \
- $(TOP)/src/gallium/auxiliary/draw/draw_prim.c \
- $(TOP)/src/gallium/auxiliary/draw/draw_stipple.c \
- $(TOP)/src/gallium/auxiliary/draw/draw_twoside.c \
- $(TOP)/src/gallium/auxiliary/draw/draw_unfilled.c \
- $(TOP)/src/gallium/auxiliary/draw/draw_validate.c \
- $(TOP)/src/gallium/auxiliary/draw/draw_vbuf.c \
- $(TOP)/src/gallium/auxiliary/draw/draw_vertex.c \
- $(TOP)/src/gallium/auxiliary/draw/draw_vertex_cache.c \
- $(TOP)/src/gallium/auxiliary/draw/draw_vertex_fetch.c \
- $(TOP)/src/gallium/auxiliary/draw/draw_vertex_shader.c \
- $(TOP)/src/gallium/auxiliary/draw/draw_vf.c \
- $(TOP)/src/gallium/auxiliary/draw/draw_vf_generic.c \
- $(TOP)/src/gallium/auxiliary/draw/draw_vf_sse.c \
- $(TOP)/src/gallium/auxiliary/draw/draw_wide_prims.c
-
-TGSIEXEC_SOURCES = \
- $(TOP)/src/gallium/auxiliary/tgsi/exec/tgsi_exec.c \
- $(TOP)/src/gallium/auxiliary/tgsi/exec/tgsi_sse2.c
-
-TGSIUTIL_SOURCES = \
- $(TOP)/src/gallium/auxiliary/tgsi/util/tgsi_build.c \
- $(TOP)/src/gallium/auxiliary/tgsi/util/tgsi_dump.c \
- $(TOP)/src/gallium/auxiliary/tgsi/util/tgsi_parse.c \
- $(TOP)/src/gallium/auxiliary/tgsi/util/tgsi_util.c
-
-STATECACHE_SOURCES = \
- $(TOP)/src/gallium/auxiliary/cso_cache/cso_hash.c \
- $(TOP)/src/gallium/auxiliary/cso_cache/cso_cache.c
-
-PIPEUTIL_SOURCES = \
- $(TOP)/src/gallium/auxiliary/util/p_debug.c \
- $(TOP)/src/gallium/auxiliary/util/p_tile.c \
- $(TOP)/src/gallium/auxiliary/util/p_util.c
-
STATETRACKER_SOURCES = \
state_tracker/st_atom.c \
state_tracker/st_atom_blend.c \
@@ -229,7 +184,7 @@ STATETRACKER_SOURCES = \
state_tracker/st_cb_readpixels.c \
state_tracker/st_cb_strings.c \
state_tracker/st_cb_texture.c \
- state_tracker/st_cache.c \
+ state_tracker/st_cache.c \
state_tracker/st_context.c \
state_tracker/st_debug.c \
state_tracker/st_draw.c \
@@ -333,15 +288,6 @@ SPARC_API = \
__COMMON_DRIVER_SOURCES = \
drivers/common/driverfuncs.c
-X11_DRIVER_SOURCES = \
- $(TOP)/src/gallium/winsys/xlib/glxapi.c \
- $(TOP)/src/gallium/winsys/xlib/fakeglx.c \
- $(TOP)/src/gallium/winsys/xlib/xfonts.c \
- $(TOP)/src/gallium/winsys/xlib/xm_api.c \
- $(TOP)/src/gallium/winsys/xlib/xm_winsys.c \
- $(TOP)/src/gallium/winsys/xlib/xm_winsys_aub.c \
- $(TOP)/src/gallium/winsys/xlib/brw_aub.c
-
OSMESA_DRIVER_SOURCES = \
drivers/osmesa/osmesa.c