summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2001-04-26 22:27:09 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2001-04-26 22:27:09 +0000
commit785c3469f45ef4b96f2622cd1575229a1fd9d250 (patch)
treef8ecdae35fb93036cf9c6a66906882d08c099b52
parentf20ea88f88398f38ea6029c35260e481b15116ed (diff)
Added Makefile support for building libOSMesa16.so which is Mesa compiled
for 16-bit color channels, using the OSMesa driver.
-rw-r--r--Make-config16
-rw-r--r--Makefile.X119
-rw-r--r--src/mesa/main/Makefile.OSMesa16228
-rw-r--r--src/mesa/main/config.h4
4 files changed, 253 insertions, 4 deletions
diff --git a/Make-config b/Make-config
index 303cf8e2071..ff2b13a45ff 100644
--- a/Make-config
+++ b/Make-config
@@ -1,4 +1,4 @@
-# $Id: Make-config,v 1.42 2001/04/25 15:52:15 brianp Exp $
+# $Id: Make-config,v 1.43 2001/04/26 22:27:09 brianp Exp $
MESA_MAJOR=3
MESA_MINOR=5
@@ -846,6 +846,18 @@ linux-sparc-ultra:
"GLUT_LIB_DEPS = -L../lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \
"APP_LIB_DEPS = -lm"
+# 16-bit/channel Mesa using OSMesa driver
+linux-osmesa16:
+ $(MAKE) $(MFLAGS) -f Makefile.OSMesa16 targets \
+ "OSMESA16_LIB = libOSMesa16.so" \
+ "CC = gcc" \
+ "CPLUSPLUS = g++" \
+ "CFLAGS = -g -ansi -pedantic -Wall -Wmissing-prototypes -Wundef -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM -DPTHREADS -DDEBUG -DMESA_DEBUG -DCHAN_BITS=16" \
+ "CCFLAGS = $(CFLAGS)" \
+ "MAKELIB = ../bin/mklib.linux" \
+ "GL_LIB_DEPS = -lm -lpthread" \
+ "APP_LIB_DEPS = -lOSMesa -lGL"
+
# May want to add these CFLAGS for better performance under LynxOS and GCC:
# -fPIC -O2 -ansi -pedantic -mieee-fp -DUSE_XSHM -funroll-loops
# -fexpensive-optimizations -fomit-frame-pointer -ffast-math
@@ -1451,7 +1463,7 @@ linux-debug:
"CFLAGS = -g -ansi -pedantic -Wall -Wmissing-prototypes -Wundef -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM -DPTHREADS -DDEBUG -DMESA_DEBUG -DSVGA -I/usr/include/glide -DFX -DMESA_TRACE" \
"CCFLAGS = $(CFLAGS)" \
"MAKELIB = ../bin/mklib.linux" \
- "GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread" \
+ "GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -L/usr/local/glide/lib -lglide2x -lvga" \
"GLU_LIB_DEPS = -L../lib -lGL -lm" \
"GLUT_LIB_DEPS = -L../lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \
"APP_LIB_DEPS = -lglut -lGLU -lGL"
diff --git a/Makefile.X11 b/Makefile.X11
index d255a424e48..cc7ff0cbfaf 100644
--- a/Makefile.X11
+++ b/Makefile.X11
@@ -1,4 +1,4 @@
-# $Id: Makefile.X11,v 1.42 2001/03/17 00:45:01 brianp Exp $
+# $Id: Makefile.X11,v 1.43 2001/04/26 22:27:09 brianp Exp $
# Mesa 3-D graphics library
# Version: 3.5
@@ -85,6 +85,7 @@ default:
@echo " make linux-sparc for Linux on Sparc systems"
@echo " make linux-sparc5-elf for Sparc5 systems, make ELF shared libs"
@echo " make linux-sparc-ultra for UltraSparc systems, make ELF shared libs"
+ @echo " make linux-osmesa16 for 16-bit/channel OSMesa"
@echo " make lynxos for LynxOS systems with GCC"
@echo " make macintosh for Macintosh"
@echo " make machten-2.2 for Macs w/ MachTen 2.2 (68k w/ FPU)"
@@ -294,6 +295,12 @@ linux-ggi-install linux-386-ggi-install:
# echo ".include $(DESTDIR)/etc/ggi/ggimesa.conf" >> $(DESTDIR)/etc/ggi/libggi.conf ; \
# fi
+linux-osmesa16:
+ -mkdir lib
+ if [ -d src ] ; then touch src/depend ; fi
+ if [ -d src ] ; then cd src ; $(MAKE) -f Makefile.OSMesa16 $@ ; fi
+
+
# Remove .o files, emacs backup files, etc.
clean:
-rm -f ggi/*~ *.o
diff --git a/src/mesa/main/Makefile.OSMesa16 b/src/mesa/main/Makefile.OSMesa16
new file mode 100644
index 00000000000..c4413360756
--- /dev/null
+++ b/src/mesa/main/Makefile.OSMesa16
@@ -0,0 +1,228 @@
+# $Id: Makefile.OSMesa16,v 1.1 2001/04/26 22:27:09 brianp Exp $
+
+# Mesa 3-D graphics library
+# Version: 3.5
+# Copyright (C) 1995-2001 Brian Paul
+
+# Makefile for building Mesa for 16-bit/channel rendering with the OSMesa
+# driver.
+
+
+##### MACROS #####
+
+GL_MAJOR = 1
+GL_MINOR = 2
+GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY)
+
+VPATH = RCS
+
+INCDIR = ../include
+LIBDIR = ../lib
+
+
+
+CORE_SOURCES = \
+ tnl/t_array_api.c \
+ tnl/t_array_import.c \
+ tnl/t_context.c \
+ tnl/t_eval_api.c \
+ tnl/t_imm_alloc.c \
+ tnl/t_imm_api.c \
+ tnl/t_imm_debug.c \
+ tnl/t_imm_dlist.c \
+ tnl/t_imm_elt.c \
+ tnl/t_imm_eval.c \
+ tnl/t_imm_exec.c \
+ tnl/t_imm_fixup.c \
+ tnl/t_pipeline.c \
+ tnl/t_vb_fog.c \
+ tnl/t_vb_light.c \
+ tnl/t_vb_normals.c \
+ tnl/t_vb_points.c \
+ tnl/t_vb_render.c \
+ tnl/t_vb_texgen.c \
+ tnl/t_vb_texmat.c \
+ tnl/t_vb_vertex.c \
+ swrast_setup/ss_context.c \
+ swrast_setup/ss_triangle.c \
+ swrast_setup/ss_vb.c \
+ swrast_setup/ss_interp.c \
+ api_loopback.c \
+ api_noop.c \
+ api_validate.c \
+ accum.c \
+ alpha.c \
+ attrib.c \
+ bitmap.c \
+ blend.c \
+ buffers.c \
+ clip.c \
+ colortab.c \
+ config.c \
+ context.c \
+ convolve.c \
+ copypix.c \
+ debug.c \
+ depth.c \
+ dispatch.c \
+ dlist.c \
+ drawpix.c \
+ enable.c \
+ enums.c \
+ eval.c \
+ extensions.c \
+ feedback.c \
+ fog.c \
+ get.c \
+ glapi.c \
+ glthread.c \
+ hash.c \
+ hint.c \
+ histogram.c \
+ image.c \
+ imports.c \
+ light.c \
+ lines.c \
+ logic.c \
+ masking.c \
+ matrix.c \
+ mem.c \
+ mmath.c \
+ pixel.c \
+ pixeltex.c \
+ points.c \
+ polygon.c \
+ rastpos.c \
+ readpix.c \
+ scissor.c \
+ state.c \
+ stencil.c \
+ texformat.c \
+ teximage.c \
+ texobj.c \
+ texstate.c \
+ texstore.c \
+ texutil.c \
+ varray.c \
+ vtxfmt.c \
+ winpos.c \
+ X86/x86.c \
+ X86/common_x86.c \
+ X86/3dnow.c \
+ X86/sse.c \
+ math/m_debug_norm.c \
+ math/m_debug_vertex.c \
+ math/m_debug_xform.c \
+ math/m_eval.c \
+ math/m_matrix.c \
+ math/m_translate.c \
+ math/m_vector.c \
+ math/m_vertices.c \
+ math/m_xform.c \
+ array_cache/ac_context.c \
+ array_cache/ac_import.c \
+ swrast/s_aaline.c \
+ swrast/s_aatriangle.c \
+ swrast/s_accum.c \
+ swrast/s_alpha.c \
+ swrast/s_alphabuf.c \
+ swrast/s_bitmap.c \
+ swrast/s_blend.c \
+ swrast/s_buffers.c \
+ swrast/s_copypix.c \
+ swrast/s_context.c \
+ swrast/s_depth.c \
+ swrast/s_drawpix.c \
+ swrast/s_feedback.c \
+ swrast/s_fog.c \
+ swrast/s_histogram.c \
+ swrast/s_imaging.c \
+ swrast/s_lines.c \
+ swrast/s_logic.c \
+ swrast/s_masking.c \
+ swrast/s_pb.c \
+ swrast/s_pixeltex.c \
+ swrast/s_points.c \
+ swrast/s_readpix.c \
+ swrast/s_scissor.c \
+ swrast/s_span.c \
+ swrast/s_stencil.c \
+ swrast/s_texture.c \
+ swrast/s_texstore.c \
+ swrast/s_triangle.c \
+ swrast/s_zoom.c \
+ OSmesa/osmesa.c
+
+ASM_SOURCES =
+
+ADDITIONAL_OBJ =
+
+OBJECTS = $(ASM_SOURCES:.S=.o) \
+ $(CORE_SOURCES:.c=.o) \
+ $(ADDITIONAL_OBJ)
+
+
+
+##### RULES #####
+
+.c.o:
+ $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
+
+.S.o:
+ $(CC) -c -I. $(CFLAGS) $< -o $@
+
+
+OSmesa/osmesa.o: OSmesa/osmesa.c
+ $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
+
+X86/x86.o: X86/x86.c
+ $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
+X86/common_x86.o: X86/common_x86.c
+ $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
+X86/common_x86_asm.o: X86/common_x86_asm.S X86/matypes.h
+X86/3dnow.o: X86/3dnow.c
+ $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
+X86/sse.o: X86/sse.c
+ $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
+X86/matypes.h: mtypes.h tnl/t_context.h X86/gen_matypes.c
+ $(CC) -I. -I$(INCDIR) $(CFLAGS) X86/gen_matypes.c -o X86/gen_matypes
+ ./X86/gen_matypes > X86/matypes.h
+ rm -f X86/gen_matypes X86/*.o
+
+$(ASM_SOURCES): X86/matypes.h
+
+
+
+##### TARGETS #####
+
+#default:
+# @echo "Specify a target configuration"
+
+clean:
+ -rm *.o *~ */*.o */*~ *.lo *.la
+ -rm -rf .libs
+
+targets: $(LIBDIR)/$(OSMESA16_LIB)
+
+# Make the 16-bit/channel OSMesa library
+$(LIBDIR)/$(OSMESA16_LIB): $(OBJECTS)
+ $(MAKELIB) $(OSMESA16_LIB) $(GL_MAJOR) $(GL_MINOR) $(GL_TINY) $(OBJECTS)
+ rm -f $(LIBDIR)/$(OSMESA16_LIB)*
+ mv $(OSMESA16_LIB)* $(LIBDIR)
+
+
+include ../Make-config
+
+include depend
+
+
+
+#
+# Run 'make dep' to update the dependencies if you change what's included
+# by any source file.
+#
+dep: $(CORE_SOURCES)
+ makedepend -fdepend -Y -I../include $(CORE_SOURCES)
+
+tags:
+ etags `find . -name \*.[ch]` `find ../include`
diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h
index c5392d724b3..c8f60b0d20b 100644
--- a/src/mesa/main/config.h
+++ b/src/mesa/main/config.h
@@ -1,4 +1,4 @@
-/* $Id: config.h,v 1.28 2001/03/18 08:53:49 gareth Exp $ */
+/* $Id: config.h,v 1.29 2001/04/26 22:27:09 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -164,7 +164,9 @@
/*
* Bits per color channel (must be 8 at this time!)
*/
+#ifndef CHAN_BITS
#define CHAN_BITS 8
+#endif
/*