- Mesa 4.0 DOS/DJGPP Port version 0.4\r
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r
+ Mesa 4.0 DOS/DJGPP Port v1.0\r
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r
\r
\r
\r
Installation:\r
~~~~~~~~~~~~~\r
\r
-Type "make -f Makefile.DJ" to compile the libraries. Long filename support is\r
-required during compilation. Also, you must have the DXE2 package (available\r
-on SimTel.Net, courtesy of Andrew Zabolotny) installed in order to build the\r
-dynamic modules; if you encounter errors, you can fetch a patched version from\r
-my web page.\r
+Type "make -f Makefile.DJ" to compile the libraries. Make accepts some options\r
+which are passed to compiler: the target cpu (CPU=..., default=`pentium') and\r
+X86 specific options (HAVE_X86=1, HAVE_MMX=1, HAVE_SSE=1, HAVE_3DNOW=1). The\r
+core library (libGL) requires LFN support during compilation. Also, you must\r
+have the DXE2 package (available on SimTel.Net, courtesy of Andrew Zabolotny)\r
+installed in order to build the dynamic modules; if you encounter errors, you\r
+can fetch a patched version from my web page.\r
The demos are not built automagically (see Pitfalls below). To make them, use\r
one of the following rules:\r
Static:\r
libGLU:\r
~~~~~~~\r
\r
-Mesa GLU sources are required. No comment!\r
+Mesa GLU sources are required.\r
\r
\r
\r
History:\r
~~~~~~~~\r
\r
-v0.1 feb-2002 initial release\r
-v0.2 feb-2002 + fast triangle rasterizers\r
- + enabled sw and 1.3 extensions\r
- + hardware acceleration: FreeBE/AF\r
- + single-buffer modes (15-, 16-, and 32-bit)\r
- * video mode is set by CreateVisual, not MakeCurrent\r
- * internal changes to support multi-buf (unfinished)\r
- ! fixed some alpha issues... (thanks, Brian)\r
- + glut has now an internal timer\r
- * glut changed to support multi-window (unfinished)\r
- ! minor PC_HW corrections\r
-v0.3 mar-2002 - removed FreeBE/AF code\r
- - removed single-buffer modes\r
-v0.4 mar-2002 + dynamic module support\r
+v1.0 mar-2002 initial release\r
\r
\r
\r
*/\r
\r
/*\r
- * DOS/DJGPP device driver v0.2 for Mesa 4.0\r
+ * DOS/DJGPP device driver v1.0 for Mesa 4.0\r
*\r
* Copyright (C) 2002 - Borca Daniel\r
* Email : dborca@yahoo.com\r
\r
void DMesaDestroyContext (DMesaContext c);\r
\r
+GLboolean DMesaViewport (DMesaBuffer b,\r
+ GLint xpos, GLint ypos,\r
+ GLint width, GLint height);\r
+\r
GLboolean DMesaMakeCurrent (DMesaContext c, DMesaBuffer b);\r
\r
void DMesaSwapBuffers (DMesaBuffer b);\r
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
\r
-# DOS/DJGPP glu makefile v0.4 for Mesa 4.0\r
+# DOS/DJGPP glu makefile v1.0 for Mesa 4.0\r
#\r
# Copyright (C) 2002 - Borca Daniel\r
# Email : dborca@yahoo.com\r
\r
TOP = ..\r
CC = gcc\r
-CFLAGS = -I$(TOP)/include -Wall -W -Wno-unused -mcpu=pentium -ffast-math -O2\r
+CFLAGS = -I$(TOP)/include -Wall -W -Wno-unused -mcpu=$(CPU) -ffast-math -O2\r
AR = ar\r
ARFLAGS = ruv\r
LIBDIR = $(TOP)/lib\r
\r
$(LIBDIR)/$(GLU_DXE) $(LIBDIR)/$(GLU_IMP): $(OBJECTS)\r
ifeq ($(DXE2GEN),)\r
- @echo Missing DXE2GEN and/or DXE2.LD! You must have DXE2GEN\r
- @echo somewhere in PATH, and DXE2.LD in DJGPP/LIB directory.\r
+ $(warning Missing DXE2GEN and/or DXE2.LD! You must have DXE2GEN)\r
+ $(warning somewhere in PATH, and DXE2.LD in DJGPP/LIB directory.)\r
else\r
- dxe2gen -o $(LIBDIR)/$(GLU_DXE) -I $(LIBDIR)/$(GLU_IMP) $(OBJECTS) -D "Glu" -U\r
+ dxe2gen -o $(LIBDIR)/$(GLU_DXE) -I $(LIBDIR)/$(GLU_IMP) $(OBJECTS) -D "Mesa DOS GLU" -U\r
endif\r
\r
clean:\r
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
\r
-# DOS/DJGPP glut makefile v0.4 for Mesa 4.0\r
+# DOS/DJGPP glut makefile v1.0 for Mesa 4.0\r
#\r
# Copyright (C) 2002 - Borca Daniel\r
# Email : dborca@yahoo.com\r
\r
TOP = ..\r
CC = gcc\r
-CFLAGS = -I$(TOP)/include -Wall -W -Wno-unused -mcpu=pentium -ffast-math -O2\r
+CFLAGS = -I$(TOP)/include -Wall -W -Wno-unused -mcpu=$(CPU) -ffast-math -O2\r
AR = ar\r
ARFLAGS = ruv\r
LIBDIR = $(TOP)/lib\r
teapot.c \\r
window.c\r
\r
-PC_HW_OBJECTS = \\r
- PC_HW/pc_hw.o \\r
- PC_HW/pc_keyb.o \\r
- PC_HW/pc_mouse.o \\r
- PC_HW/pc_timer.o \\r
- PC_HW/pc_irq.o\r
+PC_HW_SOURCES = \\r
+ PC_HW/pc_hw.c \\r
+ PC_HW/pc_keyb.c \\r
+ PC_HW/pc_mouse.c \\r
+ PC_HW/pc_timer.c \\r
+ PC_HW/pc_irq.S\r
\r
-SOURCES = $(CORE_SOURCES)\r
+SOURCES = $(CORE_SOURCES) $(PC_HW_SOURCES)\r
\r
-OBJECTS = $(SOURCES:.c=.o) $(PC_HW_OBJECTS)\r
+OBJECTS = $(addsuffix .o,$(basename $(SOURCES)))\r
\r
+.c.o:\r
+ gcc -o $@ -c $(CFLAGS) $<\r
.S.o:\r
gcc -o $@ -c $(CFLAGS) $<\r
.s.o:\r
gcc -o $@ -c $(CFLAGS) $(<:.s=.S)\r
-.c.o:\r
- gcc -o $@ -c $(CFLAGS) $<\r
\r
all: $(LIBDIR)/$(GLUT_LIB) $(LIBDIR)/$(GLUT_DXE) $(LIBDIR)/$(GLUT_IMP)\r
\r
\r
$(LIBDIR)/$(GLUT_DXE) $(LIBDIR)/$(GLUT_IMP): $(OBJECTS)\r
ifeq ($(DXE2GEN),)\r
- @echo Missing DXE2GEN and/or DXE2.LD! You must have DXE2GEN\r
- @echo somewhere in PATH, and DXE2.LD in DJGPP/LIB directory.\r
+ $(warning Missing DXE2GEN and/or DXE2.LD! You must have DXE2GEN)\r
+ $(warning somewhere in PATH, and DXE2.LD in DJGPP/LIB directory.)\r
else\r
- dxe2gen -o $(LIBDIR)/$(GLUT_DXE) -I $(LIBDIR)/$(GLUT_IMP) $(OBJECTS) -D "DOS Glut" -U\r
+ dxe2gen -o $(LIBDIR)/$(GLUT_DXE) -I $(LIBDIR)/$(GLUT_IMP) $(OBJECTS) -D "Mesa DOS GLUT" -U\r
endif\r
\r
clean:\r
menu.o: menu.c ../include/GL/glut.h\r
models.o: models.c ../include/GL/glut.h\r
overlay.o: overlay.c ../include/GL/glut.h\r
-state.o: state.c ../include/GL/glut.h internal.h pc_hw/pc_hw.h\r
+state.o: state.c ../include/GL/glut.h internal.h PC_HW/pc_hw.h\r
teapot.o: teapot.c ../include/GL/glut.h\r
window.o: window.c ../include/GL/glut.h ../include/GL/dmesa.h internal.h \\r
PC_HW/pc_hw.h\r
/*\r
- * PC/HW routine collection v0.1 for DOS/DJGPP\r
+ * PC/HW routine collection v1.0 for DOS/DJGPP\r
*\r
* Copyright (C) 2002 - Borca Daniel\r
* Email : dborca@yahoo.com\r
/*\r
- * PC/HW routine collection v0.1 for DOS/DJGPP\r
+ * PC/HW routine collection v1.0 for DOS/DJGPP\r
*\r
* Copyright (C) 2002 - Borca Daniel\r
* Email : dborca@yahoo.com\r
\r
#define KEY_MAX 115\r
\r
-extern volatile char pc_key[KEY_MAX];\r
-\r
int pc_install_keyb (void);\r
void pc_remove_keyb (void);\r
int pc_keypressed (void);\r
int pc_readkey (void);\r
+int pc_keydown (int code);\r
\r
/*\r
* timer\r
/*\r
* mouse\r
*/\r
-extern volatile int pc_mouse_x, pc_mouse_y, pc_mouse_b;\r
-\r
int pc_install_mouse (void);\r
void pc_remove_mouse (void);\r
MFUNC pc_install_mouse_handler (MFUNC handler);\r
void pc_mouse_area (int x1, int y1, int x2, int y2);\r
void pc_mouse_speed (int xspeed, int yspeed);\r
+int pc_query_mouse (int *x, int *y);\r
void pc_show_mouse (void);\r
void pc_scare_mouse (void);\r
void pc_unscare_mouse (void);\r
/*\r
- * PC/HW routine collection v0.2 for DOS/DJGPP\r
+ * PC/HW routine collection v1.0 for DOS/DJGPP\r
*\r
* Copyright (C) 2002 - Borca Daniel\r
* Email : dborca@yahoo.com\r
/*\r
- * PC/HW routine collection v0.4 for DOS/DJGPP\r
+ * PC/HW routine collection v1.0 for DOS/DJGPP\r
*\r
* Copyright (C) 2002 - Borca Daniel\r
* Email : dborca@yahoo.com\r
/*\r
- * PC/HW routine collection v0.4 for DOS/DJGPP\r
+ * PC/HW routine collection v1.0 for DOS/DJGPP\r
*\r
* Copyright (C) 2002 - Borca Daniel\r
* Email : dborca@yahoo.com\r
/*\r
- * PC/HW routine collection v0.1 for DOS/DJGPP\r
+ * PC/HW routine collection v1.0 for DOS/DJGPP\r
*\r
* Copyright (C) 2002 - Borca Daniel\r
* Email : dborca@yahoo.com\r
*/\r
\r
/*\r
- * DOS/DJGPP glut driver v0.1 for Mesa 4.0\r
+ * DOS/DJGPP glut driver v1.0 for Mesa 4.0\r
*\r
* Copyright (C) 2002 - Borca Daniel\r
* Email : dborca@yahoo.com\r
*/\r
\r
/*\r
- * DOS/DJGPP glut driver v0.1 for Mesa 4.0\r
+ * DOS/DJGPP glut driver v1.0 for Mesa 4.0\r
*\r
* Copyright (C) 2002 - Borca Daniel\r
* Email : dborca@yahoo.com\r
*/\r
\r
/*\r
- * DOS/DJGPP glut driver v0.1 for Mesa 4.0\r
+ * DOS/DJGPP glut driver v1.0 for Mesa 4.0\r
*\r
* Copyright (C) 2002 - Borca Daniel\r
* Email : dborca@yahoo.com\r
*/\r
\r
/*\r
- * DOS/DJGPP glut driver v0.1 for Mesa 4.0\r
+ * DOS/DJGPP glut driver v1.0 for Mesa 4.0\r
*\r
* Copyright (C) 2002 - Borca Daniel\r
* Email : dborca@yahoo.com\r
*/\r
\r
/*\r
- * DOS/DJGPP glut driver v0.4 for Mesa 4.0\r
+ * DOS/DJGPP glut driver v1.0 for Mesa 4.0\r
*\r
* Copyright (C) 2002 - Borca Daniel\r
* Email : dborca@yahoo.com\r
*/\r
\r
/*\r
- * DOS/DJGPP glut driver v0.2 for Mesa 4.0\r
+ * DOS/DJGPP glut driver v1.0 for Mesa 4.0\r
*\r
* Copyright (C) 2002 - Borca Daniel\r
* Email : dborca@yahoo.com\r
*/\r
\r
/*\r
- * DOS/DJGPP glut driver v0.1 for Mesa 4.0\r
+ * DOS/DJGPP glut driver v1.0 for Mesa 4.0\r
*\r
* Copyright (C) 2002 - Borca Daniel\r
* Email : dborca@yahoo.com\r
*/\r
\r
/*\r
- * DOS/DJGPP glut driver v0.1 for Mesa 4.0\r
+ * DOS/DJGPP glut driver v1.0 for Mesa 4.0\r
*\r
* Copyright (C) 2002 - Borca Daniel\r
* Email : dborca@yahoo.com\r
*/\r
\r
/*\r
- * DOS/DJGPP glut driver v0.2 for Mesa 4.0\r
+ * DOS/DJGPP glut driver v1.0 for Mesa 4.0\r
*\r
* Copyright (C) 2002 - Borca Daniel\r
* Email : dborca@yahoo.com\r
*/\r
\r
/*\r
- * DOS/DJGPP glut driver v0.2 for Mesa 4.0\r
+ * DOS/DJGPP glut driver v1.0 for Mesa 4.0\r
*\r
* Copyright (C) 2002 - Borca Daniel\r
* Email : dborca@yahoo.com\r
\r
void APIENTRY glutPositionWindow (int x, int y)\r
{\r
+ if (DMesaViewport(buffer[window], x, y, g_width, g_height)) {\r
+ g_xpos = x;\r
+ g_ypos = y;\r
+ }\r
}\r
\r
\r
void APIENTRY glutReshapeWindow (int width, int height)\r
{\r
+ if (DMesaViewport(buffer[window], g_xpos, g_ypos, width, height)) {\r
+ g_width = width;\r
+ g_height = height;\r
+ if (reshape_func) {\r
+ reshape_func(width, height);\r
+ } else {\r
+ glViewport(0, 0, width, height);\r
+ }\r
+ }\r
}\r
\r
\r
*/\r
\r
/*\r
- * DOS/DJGPP device driver v0.3 for Mesa 4.0\r
+ * DOS/DJGPP device driver v1.0 for Mesa 4.0\r
*\r
* Copyright (C) 2002 - Borca Daniel\r
* Email : dborca@yahoo.com\r
* Add system-specific fields to it.\r
*/\r
struct dmesa_buffer {\r
- GLframebuffer *gl_buffer; /* The depth, stencil, accum, etc buffers */\r
+ GLframebuffer gl_buffer; /* The depth, stencil, accum, etc buffers */\r
void *the_window; /* your window handle, etc */\r
\r
+ int bypp; /* bytes per pixel */\r
int xpos, ypos; /* position */\r
int width, height; /* size in pixels */\r
int bwidth, len; /* bytes in a line, then total */\r
* If anything special has to been done when the buffer/window is\r
* resized, do it now.\r
*/\r
-static void get_buffer_size (GLcontext *ctx, GLuint *width, GLuint *height)\r
+static void get_buffer_size (GLframebuffer *buffer, GLuint *width, GLuint *height)\r
{\r
- DMesaContext c = (DMesaContext)ctx->DriverCtx;\r
+ DMesaBuffer b = (DMesaBuffer)buffer;\r
\r
- *width = c->Buffer->width;\r
- *height = c->Buffer->height;\r
+ *width = b->width;\r
+ *height = b->height;\r
}\r
\r
\r
{\r
switch (name) {\r
case GL_RENDERER:\r
- return (const GLubyte *)"DOS Mesa";\r
+ return (const GLubyte *)"Mesa DOS\0DJGPP port (c) Borca Daniel 31-mar-2002";\r
default:\r
return NULL;\r
}\r
ctx->Driver.Accum = _swrast_Accum;\r
ctx->Driver.Bitmap = _swrast_Bitmap;\r
ctx->Driver.Clear = clear;\r
- ctx->Driver.ResizeBuffersMESA = _swrast_alloc_buffers;\r
+ ctx->Driver.ResizeBuffers = _swrast_alloc_buffers;\r
ctx->Driver.CopyPixels = _swrast_CopyPixels;\r
ctx->Driver.DrawPixels = _swrast_DrawPixels;\r
ctx->Driver.ReadPixels = _swrast_ReadPixels;\r
\r
if ((b=(DMesaBuffer)calloc(1, sizeof(struct dmesa_buffer)))!=NULL) {\r
\r
- b->gl_buffer = _mesa_create_framebuffer(visual->gl_visual,\r
- visual->gl_visual->depthBits > 0,\r
- visual->gl_visual->stencilBits > 0,\r
- visual->gl_visual->accumRedBits > 0,\r
- visual->gl_visual->alphaBits > 0);\r
+ _mesa_initialize_framebuffer(&b->gl_buffer,\r
+ visual->gl_visual,\r
+ visual->gl_visual->depthBits > 0,\r
+ visual->gl_visual->stencilBits > 0,\r
+ visual->gl_visual->accumRedBits > 0,\r
+ visual->gl_visual->alphaBits > 0);\r
b->xpos = xpos;\r
b->ypos = ypos;\r
b->width = width;\r
- b->bwidth = width * ((visual->depth+7)/8);\r
b->height = height;\r
- b->len = b->bwidth * b->height;\r
+ b->bypp = (visual->depth+7)/8;\r
}\r
\r
return b;\r
void DMesaDestroyBuffer (DMesaBuffer b)\r
{\r
free(b->the_window);\r
- _mesa_destroy_framebuffer(b->gl_buffer);\r
+ _mesa_free_framebuffer_data(&b->gl_buffer);\r
free(b);\r
}\r
\r
\r
\r
\r
+GLboolean DMesaViewport (DMesaBuffer b,\r
+ GLint xpos, GLint ypos,\r
+ GLint width, GLint height)\r
+{\r
+ void *new_window;\r
+\r
+ if ((new_window=vl_sync_buffer(b->the_window, xpos, ypos, width, height))==NULL) {\r
+ return GL_FALSE;\r
+ } else {\r
+ b->the_window = new_window;\r
+ b->xpos = xpos;\r
+ b->ypos = ypos;\r
+ b->width = width;\r
+ b->height = height;\r
+ b->bwidth = width * b->bypp;\r
+ b->len = b->bwidth * height;\r
+ return GL_TRUE;\r
+ }\r
+}\r
+\r
+\r
+\r
/*\r
* Make the specified context and buffer the current one.\r
*/\r
GLboolean DMesaMakeCurrent (DMesaContext c, DMesaBuffer b)\r
{\r
if (c&&b) {\r
- if ((b->the_window=vl_sync_buffer(b->the_window, b->xpos, b->ypos, b->width, b->height))==NULL) {\r
+ if (!DMesaViewport(b, b->xpos, b->ypos, b->width, b->height)) {\r
return GL_FALSE;\r
}\r
\r
c->Buffer = b;\r
\r
dmesa_update_state(c->gl_ctx, 0);\r
- _mesa_make_current(c->gl_ctx, b->gl_buffer);\r
+ _mesa_make_current(c->gl_ctx, &b->gl_buffer);\r
if (c->gl_ctx->Viewport.Width==0) {\r
/* initialize viewport to window size */\r
- _mesa_Viewport(0, 0, c->Buffer->width, c->Buffer->height);\r
+ _mesa_Viewport(0, 0, b->width, b->height);\r
}\r
} else {\r
/* Detach */\r
*/\r
\r
/*\r
- * DOS/DJGPP device driver v0.3 for Mesa 4.0\r
+ * DOS/DJGPP device driver v1.0 for Mesa 4.0\r
*\r
* Copyright (C) 2002 - Borca Daniel\r
* Email : dborca@yahoo.com\r
*/\r
\r
/*\r
- * DOS/DJGPP device driver v0.3 for Mesa 4.0\r
+ * DOS/DJGPP device driver v1.0 for Mesa 4.0\r
*\r
* Copyright (C) 2002 - Borca Daniel\r
* Email : dborca@yahoo.com\r
*/\r
\r
/*\r
- * DOS/DJGPP device driver v0.4 for Mesa 4.0\r
+ * DOS/DJGPP device driver v1.0 for Mesa 4.0\r
*\r
* Copyright (C) 2002 - Borca Daniel\r
* Email : dborca@yahoo.com\r
if (width&3) {\r
return NULL;\r
} else {\r
- current_offset = video_scanlen * y + video_bypp * x;\r
if ((newbuf=realloc(buffer, width*height*video_bypp))!=NULL) {\r
+ current_offset = video_scanlen * y + video_bypp * x;\r
current_width = width;\r
current_delta = video_scanlen - video_bypp * width;\r
- return newbuf;\r
- } else {\r
- return NULL;\r
}\r
+ return newbuf;\r
}\r
}\r
\r
*/\r
\r
/*\r
- * DOS/DJGPP device driver v0.4 for Mesa 4.0\r
+ * DOS/DJGPP device driver v1.0 for Mesa 4.0\r
*\r
* Copyright (C) 2002 - Borca Daniel\r
* Email : dborca@yahoo.com\r
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
\r
-# DOS/DJGPP core makefile v0.4 for Mesa 4.0\r
+# DOS/DJGPP core makefile v1.0 for Mesa 4.0\r
#\r
# Copyright (C) 2002 - Borca Daniel\r
# Email : dborca@yahoo.com\r
\r
TOP = ..\r
CC = gcc\r
-CFLAGS = -I$(TOP)/include -I. -Wall -W -Wno-unused -mcpu=pentium -ffast-math -O2\r
+CFLAGS = -I$(TOP)/include -I. -Wall -W -Wno-unused -mcpu=$(CPU) -ffast-math -O2\r
AR = ar\r
ARFLAGS = ruv\r
LIBDIR = $(TOP)/lib\r
tnl/t_vb_texmat.c \\r
tnl/t_vb_vertex.c\r
\r
+X86_SOURCES = \\r
+ X86/x86.c \\r
+ X86/glapi_x86.S \\r
+ X86/common_x86.c \\r
+ X86/common_x86_asm.S \\r
+ X86/x86_xform2.S \\r
+ X86/x86_xform3.S \\r
+ X86/x86_xform4.S \\r
+ X86/x86_vertex.S \\r
+ X86/x86_cliptest.S\r
+\r
+MMX_SOURCES =\r
+\r
+SSE_SOURCES = \\r
+ X86/sse.c \\r
+ X86/sse_xform2.S \\r
+ X86/sse_xform3.S \\r
+ X86/sse_xform4.S \\r
+ X86/sse_vertex.S \\r
+ X86/sse_normal.S\r
+\r
+D3NOW_SOURCES = \\r
+ X86/3dnow.c \\r
+ X86/3dnow_xform2.S \\r
+ X86/3dnow_xform3.S \\r
+ X86/3dnow_xform4.S \\r
+ X86/3dnow_vertex.S\r
+\r
+ifdef HAVE_MMX\r
+X86_SOURCES += $(MMX_SOURCES)\r
+CFLAGS += -DUSE_MMX_ASM\r
+HAVE_X86 = 1\r
+endif\r
+ifdef HAVE_SSE\r
+X86_SOURCES += $(SSE_SOURCES)\r
+CFLAGS += -DUSE_SSE_ASM\r
+HAVE_X86 = 1\r
+endif\r
+ifdef HAVE_3DNOW\r
+X86_SOURCES += $(D3NOW_SOURCES)\r
+CFLAGS += -DUSE_3DNOW_ASM\r
+HAVE_X86 = 1\r
+endif\r
+ifdef HAVE_X86\r
+CFLAGS += -DUSE_X86_ASM\r
+else\r
+X86_SOURCES =\r
+endif\r
+\r
DRIVER_SOURCES = DOS/dmesa.c DOS/video.c DOS/dpmi.c\r
\r
-SOURCES = $(CORE_SOURCES) $(DRIVER_SOURCES)\r
+SOURCES = $(CORE_SOURCES) $(X86_SOURCES) $(DRIVER_SOURCES)\r
\r
-OBJECTS = $(SOURCES:.c=.o)\r
+OBJECTS = $(addsuffix .o,$(basename $(SOURCES)))\r
\r
.c.o:\r
gcc -o $@ -c $(CFLAGS) $<\r
+.S.o:\r
+ gcc -o $@ -c $(CFLAGS) $<\r
\r
all: $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(GL_DXE) $(LIBDIR)/$(GL_IMP)\r
\r
\r
$(LIBDIR)/$(GL_DXE) $(LIBDIR)/$(GL_IMP): $(OBJECTS)\r
ifeq ($(DXE2GEN),)\r
- @echo Missing DXE2GEN and/or DXE2.LD! You must have DXE2GEN\r
- @echo somewhere in PATH, and DXE2.LD in DJGPP/LIB directory.\r
+ $(warning Missing DXE2GEN and/or DXE2.LD! You must have DXE2GEN)\r
+ $(warning somewhere in PATH, and DXE2.LD in DJGPP/LIB directory.)\r
else\r
- dxe2gen -o $(LIBDIR)/$(GL_DXE) -I $(LIBDIR)/$(GL_IMP) $(OBJECTS) -D "DOS Mesa" -U\r
+ dxe2gen -o $(LIBDIR)/$(GL_DXE) -I $(LIBDIR)/$(GL_IMP) $(OBJECTS) -D "Mesa DOS GL" -U\r
endif\r
\r
clean:\r
-$(RM) *.o\r
+ifdef HAVE_X86\r
+ -$(RM) X86\*.o\r
+endif\r
-$(RM) DOS\*.o\r
\r
include depend\r
\r
DOS/dmesa.o: DOS/dmesa.c glheader.h ../include/GL/gl.h context.h glapi.h \\r
- mtypes.h config.h glapitable.h glthread.h math/m_matrix.h dd.h \\r
- ../include/GL/dmesa.h extensions.h macros.h matrix.h mmath.h texformat.h \\r
+ mtypes.h config.h glapitable.h glthread.h math/m_matrix.h dd.h macros.h \\r
+ ../include/GL/dmesa.h extensions.h matrix.h mmath.h texformat.h \\r
texstore.h array_cache/acache.h swrast/s_context.h swrast/swrast.h \\r
swrast/s_depth.h swrast/s_lines.h swrast/s_triangle.h swrast/s_trispan.h \\r
swrast_setup/swrast_setup.h tnl/tnl.h tnl/t_context.h math/m_vector.h \\r