summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorKarl Schultz <kschultz@freedesktop.org>2001-09-21 21:32:14 +0000
committerKarl Schultz <kschultz@freedesktop.org>2001-09-21 21:32:14 +0000
commit05ba9becc3211795af539d79b70c8a6af2688108 (patch)
tree3f5b7a3cff35d6d607d6c32f41c051167d5d19e5 /src/mesa
parent445e3cbd0dd2a526cb6628975f5351cbab3956a8 (diff)
Make osmesa a DLL instead of a static lib (Windows). This is more
consistent with the other modules and platforms. It also makes the API and linkage on Windows more consistent.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/osmesa/Makefile.win21
-rw-r--r--src/mesa/drivers/osmesa/osmesa.c20
-rw-r--r--src/mesa/drivers/osmesa/osmesa.def13
-rw-r--r--src/mesa/main/Makefile.win2
4 files changed, 37 insertions, 19 deletions
diff --git a/src/mesa/drivers/osmesa/Makefile.win b/src/mesa/drivers/osmesa/Makefile.win
index c754782b52..d6c11b169f 100644
--- a/src/mesa/drivers/osmesa/Makefile.win
+++ b/src/mesa/drivers/osmesa/Makefile.win
@@ -13,24 +13,27 @@ DRIVER_SRCS = $(OSMESA_SRCS)
SRCS = $(OSMESA_SRCS)
-all : osmesalib
+all : osmesadll
!include "$(TOP)/mesawin32.mak"
-osmesalib: $(OSMESALIB)
+osmesadll: $(OSMESADLL)
-# Undefine _DLL because osmesa is a LIB, not a DLL
-CFLAGS = $(cvarsdll) $(CFLAGS) -U_DLL -D_OPENGL32_ -I$(TOP)/src
-LFLAGS = /LIB
+CFLAGS = $(cvarsdll) $(CFLAGS) -D_OPENGL32_ -DBUILD_GL32 -I$(TOP)/src
+LFLAGS = $(LFLAGS) $(dlllflags)
OBJS = $(ASM_SRCS:.S=.obj) $(CORE_SRCS:.c=.obj) $(DRIVER_SRCS:.c=.obj)
-LIBS = $(TOP)/lib/$(MESALIB)
+LIBS = $(guilibsdll) $(TOP)/lib/$(MESALIB)
-$(OSMESALIB) : $(OBJS)
- $(link) $(LFLAGS) -out:$(OSMESALIB) $(OBJS) $(LIBS)
+$(OSMESADLL) : $(OBJS) osmesa.def
+ $(link) $(LFLAGS) -def:osmesa.def -out:$(OSMESADLL) $(OBJS) $(LIBS)
@echo "copying OSMesa library to library directory..."
-copy $(OSMESALIB) $(TOP)\lib
+ @echo "copying OSMesa dll to library directory..."
+ -copy $(OSMESADLL) $(TOP)\lib
-install : $(OSMESALIB)
+install : $(OSMESADLL)
@echo "copying OSMesa library to system library directory..."
-copy $(OSMESALIB) $(LIBINSTALL)
+ @echo "copying OSMesa dll to system library directory..."
+ -copy $(OSMESADLL) $(DLLINSTALL)
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index e6cbeafedd..d60cd19d9f 100644
--- a/src/mesa/drivers/osmesa/osmesa.c
+++ b/src/mesa/drivers/osmesa/osmesa.c
@@ -1,4 +1,4 @@
-/* $Id: osmesa.c,v 1.68 2001/09/18 16:51:45 kschultz Exp $ */
+/* $Id: osmesa.c,v 1.69 2001/09/21 21:32:14 kschultz Exp $ */
/*
* Mesa 3-D graphics library
@@ -112,7 +112,7 @@ static void osmesa_register_swrast_functions( GLcontext *ctx );
* display lists. NULL indicates no sharing.
* Return: an OSMesaContext or 0 if error
*/
-OSMesaContext GLAPIENTRY
+GLAPI OSMesaContext GLAPIENTRY
OSMesaCreateContext( GLenum format, OSMesaContext sharelist )
{
return OSMesaCreateContextExt(format, DEFAULT_SOFTWARE_DEPTH_BITS,
@@ -126,7 +126,7 @@ OSMesaCreateContext( GLenum format, OSMesaContext sharelist )
*
* Create context and specify size of ancillary buffers.
*/
-OSMesaContext GLAPIENTRY
+GLAPI OSMesaContext GLAPIENTRY
OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
GLint accumBits, OSMesaContext sharelist )
{
@@ -357,7 +357,7 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
*
* Input: ctx - the context to destroy
*/
-void GLAPIENTRY OSMesaDestroyContext( OSMesaContext ctx )
+GLAPI void GLAPIENTRY OSMesaDestroyContext( OSMesaContext ctx )
{
if (ctx) {
_swsetup_DestroyContext( &ctx->gl_ctx );
@@ -444,7 +444,7 @@ static void compute_row_addresses( OSMesaContext ctx )
* invalid buffer address, type!=GL_UNSIGNED_BYTE, width<1, height<1,
* width>internal limit or height>internal limit.
*/
-GLboolean GLAPIENTRY
+GLAPI GLboolean GLAPIENTRY
OSMesaMakeCurrent( OSMesaContext ctx, void *buffer, GLenum type,
GLsizei width, GLsizei height )
{
@@ -488,7 +488,7 @@ OSMesaMakeCurrent( OSMesaContext ctx, void *buffer, GLenum type,
-OSMesaContext GLAPIENTRY OSMesaGetCurrentContext( void )
+GLAPI OSMesaContext GLAPIENTRY OSMesaGetCurrentContext( void )
{
GLcontext *ctx = _mesa_get_current_context();
if (ctx)
@@ -499,7 +499,7 @@ OSMesaContext GLAPIENTRY OSMesaGetCurrentContext( void )
-void GLAPIENTRY OSMesaPixelStore( GLint pname, GLint value )
+GLAPI void GLAPIENTRY OSMesaPixelStore( GLint pname, GLint value )
{
OSMesaContext ctx = OSMesaGetCurrentContext();
@@ -525,7 +525,7 @@ void GLAPIENTRY OSMesaPixelStore( GLint pname, GLint value )
}
-void GLAPIENTRY OSMesaGetIntegerv( GLint pname, GLint *value )
+GLAPI void GLAPIENTRY OSMesaGetIntegerv( GLint pname, GLint *value )
{
OSMesaContext ctx = OSMesaGetCurrentContext();
@@ -568,7 +568,7 @@ void GLAPIENTRY OSMesaGetIntegerv( GLint pname, GLint *value )
* buffer - pointer to depth buffer values
* Return: GL_TRUE or GL_FALSE to indicate success or failure.
*/
-GLboolean GLAPIENTRY
+GLAPI GLboolean GLAPIENTRY
OSMesaGetDepthBuffer( OSMesaContext c, GLint *width, GLint *height,
GLint *bytesPerValue, void **buffer )
{
@@ -599,7 +599,7 @@ OSMesaGetDepthBuffer( OSMesaContext c, GLint *width, GLint *height,
* buffer - pointer to color buffer values
* Return: GL_TRUE or GL_FALSE to indicate success or failure.
*/
-GLboolean GLAPIENTRY
+GLAPI GLboolean GLAPIENTRY
OSMesaGetColorBuffer( OSMesaContext c, GLint *width,
GLint *height, GLint *format, void **buffer )
{
diff --git a/src/mesa/drivers/osmesa/osmesa.def b/src/mesa/drivers/osmesa/osmesa.def
new file mode 100644
index 0000000000..68cdbad6a1
--- /dev/null
+++ b/src/mesa/drivers/osmesa/osmesa.def
@@ -0,0 +1,13 @@
+DESCRIPTION 'Mesa OSMesa lib for Win32'
+VERSION 3.5
+
+EXPORTS
+ OSMesaCreateContext
+ OSMesaCreateContextExt
+ OSMesaDestroyContext
+ OSMesaMakeCurrent
+ OSMesaGetCurrentContext
+ OSMesaPixelStore
+ OSMesaGetIntegerv
+ OSMesaGetDepthBuffer
+ OSMesaGetColorBuffer
diff --git a/src/mesa/main/Makefile.win b/src/mesa/main/Makefile.win
index 65b6ed809e..2d2138fa8a 100644
--- a/src/mesa/main/Makefile.win
+++ b/src/mesa/main/Makefile.win
@@ -195,6 +195,8 @@ clean ::
clobber ::
@del /f OSmesa\*.lib
+ @del /f OSmesa\*.exp
+ @del /f OSmesa\*.dll
# override default inference rule with one that writes the object to
# the same subdir that the c file is in.