diff options
author | Jon Smirl <[email protected]> | 2003-10-16 04:50:42 +0000 |
---|---|---|
committer | Jon Smirl <[email protected]> | 2003-10-16 04:50:42 +0000 |
commit | 3fc0db95e4b44fab108fd0495933f0d83c9b6336 (patch) | |
tree | 0404de2a23558337dc0390186cc68dea3a794e4a /src/mesa | |
parent | f62b8985d6f1a73b46aa4ccdd7ed8289352d9bc6 (diff) |
Minor changes to make linux-solo build again
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/Makefile.X11 | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/gamma/Makefile.X11 | 119 | ||||
-rw-r--r-- | src/mesa/drivers/dri/gamma/gamma_xmesa.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i810/i810screen.c | 17 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i830/i830_screen.c | 18 |
5 files changed, 140 insertions, 18 deletions
diff --git a/src/mesa/Makefile.X11 b/src/mesa/Makefile.X11 index 72e1499392a..dd4336e6d02 100644 --- a/src/mesa/Makefile.X11 +++ b/src/mesa/Makefile.X11 @@ -237,11 +237,13 @@ CORE_SOURCES = \ # This will probably get set to $(X86_SOURCES) in Make-config: ASM_SOURCES = +ifndef SOLO # This should get set in Make-config someday: DRIVER_SOURCES = \ $(X11_DRIVER_SOURCES) \ $(GLIDE_DRIVER_SOURCES) \ $(SVGA_DRIVER_SOURCES) +endif ### Object files diff --git a/src/mesa/drivers/dri/gamma/Makefile.X11 b/src/mesa/drivers/dri/gamma/Makefile.X11 new file mode 100644 index 00000000000..be0daceae72 --- /dev/null +++ b/src/mesa/drivers/dri/gamma/Makefile.X11 @@ -0,0 +1,119 @@ +# $Id: Makefile.X11,v 1.1 2003/10/16 04:50:42 jonsmirl Exp $ + +# Mesa 3-D graphics library +# Version: 5.0 +# Copyright (C) 1995-2002 Brian Paul + +TOP = ../../../../.. + +default: linux-solo + +SHARED_INCLUDES = $(INCLUDE_DIRS) -I. -I../common -Iserver +MINIGLX_INCLUDES = -I$(TOP)/src/glx/mini + +DEFINES += \ + -D_HAVE_SWRAST=1 \ + -D_HAVE_SWTNL=1 \ + -D_HAVE_SANITY=1 \ + -D_HAVE_CODEGEN=1 \ + -D_HAVE_LIGHTING=1 \ + -D_HAVE_TEXGEN=1 \ + -D_HAVE_USERCLIP=1 \ + -DGLX_DIRECT_RENDERING + +# Not yet +# MINIGLX_SOURCES = server/i810_dri.c + +DRIVER_SOURCES = \ + gamma_context.c \ + gamma_dd.c \ + gamma_inithw.c \ + gamma_lock.c \ + gamma_render.c \ + gamma_screen.c \ + gamma_span.c \ + gamma_state.c \ + gamma_tex.c \ + gamma_texmem.c \ + gamma_texstate.c \ + gamma_tris.c \ + gamma_vb.c \ + gamma_xmesa.c \ + ../common/mm.c \ + ../common/utils.c \ + ../common/texmem.c \ + ../common/vblank.c + +INCLUDES = $(MINIGLX_INCLUDES) \ + $(SHARED_INCLUDES) + + +C_SOURCES = $(DRIVER_SOURCES) \ + $(MINIGLX_SOURCES) + +MESA_MODULES = $(TOP)/src/mesa/mesa.a + + +ifeq ($(WINDOW_SYSTEM),dri) +WINOBJ=$(MESABUILDDIR)/dri/dri.a +WINLIB= +else +WINOBJ= +WINLIB=-L$(MESA)/src/glx/mini +endif + +ASM_SOURCES = +OBJECTS = $(C_SOURCES:.c=.o) \ + $(ASM_SOURCES:.S=.o) + +### Include directories + +INCLUDE_DIRS = \ + -I$(TOP)/include \ + -I$(TOP)/src/mesa \ + -I$(TOP)/src/mesa/main \ + -I$(TOP)/src/mesa/glapi \ + -I$(TOP)/src/mesa/math \ + -I$(TOP)/src/mesa/transform \ + -I$(TOP)/src/mesa/swrast \ + -I$(TOP)/src/mesa/swrast_setup + + +##### RULES ##### + +.c.o: + $(CC) -c $(SHARED_INCLUDES) $(MINIGLX_INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ + +.S.o: + $(CC) -c $(SHARED_INCLUDES) $(MINIGLX_INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ + + +##### TARGETS ##### + +targets: depend i810_dri.so + +i810_dri.so: $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile.X11 + rm -f $@ && gcc -o $@ -shared $(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(WINLIB) -lc $(GL_LIB_DEPS) + rm -f $(TOP)/lib/i810_dri.so && \ + install i810_dri.so $(TOP)/lib/i810_dri.so + +# Run 'make -f Makefile.X11 dep' to update the dependencies if you change +# what's included by any source file. +depend: $(C_SOURCES) $(ASM_SOURCES) + makedepend -fdepend -Y $(SHARED_INCLUDES) $(MINIGLX_INCLUDES) \ + $(C_SOURCES) $(ASM_SOURCES) + + +# Emacs tags +tags: + etags `find . -name \*.[ch]` `find ../include` + + +# Remove .o and backup files +clean: + -rm -f *.o */*.o *~ *.o *~ *.so server/*.o + + +include $(TOP)/Make-config + +include depend diff --git a/src/mesa/drivers/dri/gamma/gamma_xmesa.c b/src/mesa/drivers/dri/gamma/gamma_xmesa.c index 67bcf019d0c..c0a298cb859 100644 --- a/src/mesa/drivers/dri/gamma/gamma_xmesa.c +++ b/src/mesa/drivers/dri/gamma/gamma_xmesa.c @@ -66,7 +66,7 @@ gammaDestroyContext(__DRIcontextPrivate *driContextPriv) gmesa->glCtx->DriverCtx = NULL; _mesa_destroy_context(gmesa->glCtx); - Xfree(gmesa); + FREE(gmesa); driContextPriv->driverPrivate = NULL; } } diff --git a/src/mesa/drivers/dri/i810/i810screen.c b/src/mesa/drivers/dri/i810/i810screen.c index 9bc784ed8f8..604d56e2c27 100644 --- a/src/mesa/drivers/dri/i810/i810screen.c +++ b/src/mesa/drivers/dri/i810/i810screen.c @@ -34,6 +34,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "glheader.h" +#include "imports.h" #include "context.h" #include "matrix.h" #include "simple_list.h" @@ -68,12 +69,12 @@ static drmBufMapPtr i810_create_empty_buffers(void) { drmBufMapPtr retval; - retval = (drmBufMapPtr)ALIGN_MALLOC(sizeof(drmBufMap)); + retval = (drmBufMapPtr)ALIGN_MALLOC(sizeof(drmBufMap), 32); if(retval == NULL) return NULL; memset(retval, 0, sizeof(drmBufMap)); - retval->list = (drmBufPtr)ALIGN_MALLOC(sizeof(drmBuf) * I810_DMA_BUF_NR); + retval->list = (drmBufPtr)ALIGN_MALLOC(sizeof(drmBuf) * I810_DMA_BUF_NR, 32); if(retval->list == NULL) { - Xfree(retval); + FREE(retval); return NULL; } memset(retval->list, 0, sizeof(drmBuf) * I810_DMA_BUF_NR); @@ -143,7 +144,7 @@ i810InitDriver(__DRIscreenPrivate *sPriv) i810Screen->bufs = i810_create_empty_buffers(); if (i810Screen->bufs == NULL) { __driUtilMessage("i810InitDriver: i810_create_empty_buffers() failed"); - Xfree(i810Screen); + FREE(i810Screen); return GL_FALSE; } @@ -154,7 +155,7 @@ i810InitDriver(__DRIscreenPrivate *sPriv) i810Screen->back.handle, i810Screen->back.size, (drmAddress *)&i810Screen->back.map) != 0) { - Xfree(i810Screen); + FREE(i810Screen); sPriv->private = NULL; __driUtilMessage("i810InitDriver: drmMap failed"); return GL_FALSE; @@ -167,7 +168,7 @@ i810InitDriver(__DRIscreenPrivate *sPriv) i810Screen->depth.handle, i810Screen->depth.size, (drmAddress *)&i810Screen->depth.map) != 0) { - Xfree(i810Screen); + FREE(i810Screen); drmUnmap(i810Screen->back.map, i810Screen->back.size); sPriv->private = NULL; __driUtilMessage("i810InitDriver: drmMap (2) failed"); @@ -181,7 +182,7 @@ i810InitDriver(__DRIscreenPrivate *sPriv) i810Screen->tex.handle, i810Screen->tex.size, (drmAddress *)&i810Screen->tex.map) != 0) { - Xfree(i810Screen); + FREE(i810Screen); drmUnmap(i810Screen->back.map, i810Screen->back.size); drmUnmap(i810Screen->depth.map, i810Screen->depth.size); sPriv->private = NULL; @@ -205,7 +206,7 @@ i810DestroyScreen(__DRIscreenPrivate *sPriv) drmUnmap(i810Screen->depth.map, i810Screen->depth.size); drmUnmap(i810Screen->tex.map, i810Screen->tex.size); - Xfree(i810Screen); + FREE(i810Screen); sPriv->private = NULL; } diff --git a/src/mesa/drivers/dri/i830/i830_screen.c b/src/mesa/drivers/dri/i830/i830_screen.c index 58358eb016c..b0117210f52 100644 --- a/src/mesa/drivers/dri/i830/i830_screen.c +++ b/src/mesa/drivers/dri/i830/i830_screen.c @@ -57,7 +57,7 @@ static int i830_malloc_proxy_buf(drmBufMapPtr buffers) drmBufPtr buf; int i; - buffer = ALIGN_MALLOC(I830_DMA_BUF_SZ); + buffer = ALIGN_MALLOC(I830_DMA_BUF_SZ, 32); if(buffer == NULL) return -1; for(i = 0; i < I830_DMA_BUF_NR; i++) { buf = &(buffers->list[i]); @@ -71,12 +71,12 @@ static drmBufMapPtr i830_create_empty_buffers(void) { drmBufMapPtr retval; - retval = (drmBufMapPtr)ALIGN_MALLOC(sizeof(drmBufMap)); + retval = (drmBufMapPtr)ALIGN_MALLOC(sizeof(drmBufMap), 32); if(retval == NULL) return NULL; memset(retval, 0, sizeof(drmBufMap)); - retval->list = (drmBufPtr)ALIGN_MALLOC(sizeof(drmBuf) * I830_DMA_BUF_NR); + retval->list = (drmBufPtr)ALIGN_MALLOC(sizeof(drmBuf) * I830_DMA_BUF_NR, 32); if(retval->list == NULL) { - Xfree(retval); + FREE(retval); return NULL; } @@ -182,7 +182,7 @@ static GLboolean i830InitDriver(__DRIscreenPrivate *sPriv) if(i830Screen->bufs == NULL) { fprintf(stderr,"\nERROR: Failed to create empty buffers in %s \n", __FUNCTION__); - Xfree(i830Screen); + FREE(i830Screen); return GL_FALSE; } @@ -203,7 +203,7 @@ static GLboolean i830InitDriver(__DRIscreenPrivate *sPriv) (drmAddress *)&i830Screen->back.map) != 0) { fprintf(stderr, "\nERROR: line %d, Function %s, File %s\n", __LINE__, __FUNCTION__, __FILE__); - Xfree(i830Screen); + FREE(i830Screen); sPriv->private = NULL; return GL_FALSE; } @@ -217,7 +217,7 @@ static GLboolean i830InitDriver(__DRIscreenPrivate *sPriv) (drmAddress *)&i830Screen->depth.map) != 0) { fprintf(stderr, "\nERROR: line %d, Function %s, File %s\n", __LINE__, __FUNCTION__, __FILE__); - Xfree(i830Screen); + FREE(i830Screen); drmUnmap(i830Screen->back.map, i830Screen->back.size); sPriv->private = NULL; return GL_FALSE; @@ -232,7 +232,7 @@ static GLboolean i830InitDriver(__DRIscreenPrivate *sPriv) (drmAddress *)&i830Screen->tex.map) != 0) { fprintf(stderr, "\nERROR: line %d, Function %s, File %s\n", __LINE__, __FUNCTION__, __FILE__); - Xfree(i830Screen); + FREE(i830Screen); drmUnmap(i830Screen->back.map, i830Screen->back.size); drmUnmap(i830Screen->depth.map, i830Screen->depth.size); sPriv->private = NULL; @@ -288,7 +288,7 @@ static void i830DestroyScreen(__DRIscreenPrivate *sPriv) drmUnmap(i830Screen->back.map, i830Screen->back.size); drmUnmap(i830Screen->depth.map, i830Screen->depth.size); drmUnmap(i830Screen->tex.map, i830Screen->tex.size); - Xfree(i830Screen); + FREE(i830Screen); sPriv->private = NULL; } |