New, less expensive workaround for state-change lockups.
[mesa.git] / src / mesa / Makefile.DJ
index ad9cd5b37b039928205bf3f05214f5421c0eb147..71e44861f80fe34f73b33d52fb9943e5d2b27317 100644 (file)
@@ -23,7 +23,7 @@
 # DOS/DJGPP core makefile v1.4 for Mesa
 #
 #  Copyright (C) 2002 - Borca Daniel
-#  Email : dborca@yahoo.com
+#  Email : dborca@users.sourceforge.net
 #  Web   : http://www.geocities.com/dborca
 
 
 #    Environment variables:
 #      CFLAGS
 #
-#      GLIDE           path to Glide3 SDK include files; used with FX.
-#                      default = $(TOP)/include/glide3
+#      GLIDE           path to Glide3 SDK; used with FX.
+#                      default = $(TOP)/glide3
 #      FX=1            build for 3dfx Glide3. Note that this disables
 #                      compilation of most DMesa code and requires fxMesa.
 #                      As a consequence, you'll need the DJGPP Glide3
 #                      library to build any application.
 #                      default = no
-#      MATROX=1        build for Matrox Millennium I (MGA2064W) cards.
-#                      This is experimental and not intensively tested.
-#                      default = no
 #      HAVE_X86=1      optimize for i386.
 #                      default = no
 #      HAVE_MMX=1      allow MMX specializations, provided your assembler
 .INTERMEDIATE: x86/gen_matypes.exe
 
 TOP = ../..
-GLIDE ?= $(TOP)/include/glide3
+GLIDE ?= $(TOP)/glide3
 LIBDIR = $(TOP)/lib
 GL_LIB = libgl.a
 GL_DXE = gl.dxe
 GL_IMP = libigl.a
 
-export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH);$(LIBDIR)
+export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH);$(LIBDIR);$(GLIDE)/lib
 
 CC = gcc
 CFLAGS += -I$(TOP)/include -I. -Imain -Iglapi
 ifeq ($(FX),1)
 CFLAGS += -D__DOS__ -DH3
-CFLAGS += -I$(GLIDE) -DFX -DFX_GLIDE3 -DFXMESA_USE_ARGB
-LIBNAME = "MesaGL/FX DJGPP"
-else
-ifeq ($(MATROX),1)
-CFLAGS += -DMATROX
-LIBNAME = "MesaGL/MGA DJGPP"
+CFLAGS += -I$(GLIDE)/include -DFX
+LIBNAME = "Mesa/FX DJGPP"
 else
-LIBNAME = "MesaGL DJGPP"
-endif
+LIBNAME = "Mesa DJGPP"
 endif
 
 AR = ar
@@ -105,7 +97,10 @@ MAIN_SOURCES = \
        main/api_noop.c \
        main/api_validate.c \
        main/accum.c \
+       main/arbparse.c \
        main/arbprogram.c \
+       main/arbfragparse.c \
+       main/arbvertparse.c \
        main/attrib.c \
        main/blend.c \
        main/bufferobj.c \
@@ -142,6 +137,7 @@ MAIN_SOURCES = \
        main/pixel.c \
        main/points.c \
        main/polygon.c \
+       main/program.c \
        main/rastpos.c \
        main/state.c \
        main/stencil.c \
@@ -212,16 +208,10 @@ TNL_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_save_api.c \
+       tnl/t_save_loopback.c \
+       tnl/t_save_playback.c \
        tnl/t_vb_fog.c \
        tnl/t_vb_light.c \
        tnl/t_vb_normals.c \
@@ -230,7 +220,10 @@ TNL_SOURCES = \
        tnl/t_vb_render.c \
        tnl/t_vb_texgen.c \
        tnl/t_vb_texmat.c \
-       tnl/t_vb_vertex.c
+       tnl/t_vb_vertex.c \
+       tnl/t_vtx_api.c \
+       tnl/t_vtx_eval.c \
+       tnl/t_vtx_exec.c 
 
 X86_SOURCES = \
        x86/x86.c \
@@ -260,13 +253,13 @@ K3D_SOURCES = \
        x86/3dnow_normal.S
 
 CORE_SOURCES = \
-       $(MAIN_SOURCES)         \
-       $(GLAPI_SOURCES)        \
-       $(MATH_SOURCES)         \
-       $(ARRAY_CACHE_SOURCES)  \
-       $(SWRAST_SOURCES)       \
-       $(SWRAST_SETUP_SOURCES) \
-       $(TNL_SOURCES)
+       $(MAIN_SOURCES) \
+       $(GLAPI_SOURCES) \
+       $(MATH_SOURCES) \
+       $(ARRAY_CACHE_SOURCES) \
+       $(TNL_SOURCES) \
+       $(SWRAST_SOURCES) \
+       $(SWRAST_SETUP_SOURCES)
 
 ifeq ($(HAVE_MMX),1)
 X86_SOURCES += $(MMX_SOURCES)
@@ -301,14 +294,8 @@ DRIVER_SOURCES += \
        drivers/glide/fxtexman.c \
        drivers/glide/fxtris.c \
        drivers/glide/fxvb.c \
-       drivers/glide/fxglidew.c
-else
-ifeq ($(MATROX),1)
-DRIVER_SOURCES += \
-       drivers/dos/mga/mga.c \
-       drivers/dos/mga/mga_hw.c \
-       drivers/dos/mga/mga_mode.c \
-       drivers/dos/dpmi.c
+       drivers/glide/fxglidew.c \
+       drivers/glide/fxg.c
 else
 DRIVER_SOURCES += \
        drivers/dos/video.c \
@@ -318,7 +305,6 @@ DRIVER_SOURCES += \
        drivers/dos/vga.c \
        drivers/dos/dpmi.c
 endif
-endif
 
 SOURCES = $(CORE_SOURCES) $(X86_SOURCES) $(DRIVER_SOURCES)
 
@@ -336,16 +322,16 @@ X86_OBJECTS = $(addsuffix .o,$(basename $(X86_SOURCES)))
 all: $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(GL_DXE) $(LIBDIR)/$(GL_IMP)
 
 $(LIBDIR)/$(GL_LIB): $(OBJECTS)
-       $(AR) $(ARFLAGS) $(LIBDIR)/$(GL_LIB) $(OBJECTS)
+       $(AR) $(ARFLAGS) $@ $^
 
 $(LIBDIR)/$(GL_DXE) $(LIBDIR)/$(GL_IMP): $(OBJECTS)
 ifeq ($(HAVEDXE3),)
        $(warning Missing DXE3 package... Skipping $(GL_DXE))
 else
 ifeq ($(FX),1)
-       -dxe3gen -o $(LIBDIR)/$(GL_DXE) -Y $(LIBDIR)/$(GL_IMP) -D $(LIBNAME) -E _gl -E _DMesa -P glid3.dxe -U $(OBJECTS)
+       -dxe3gen -o $(LIBDIR)/$(GL_DXE) -Y $(LIBDIR)/$(GL_IMP) -D $(LIBNAME) -E _gl -E _DMesa -P glide3x.dxe -U $^
 else
-       -dxe3gen -o $(LIBDIR)/$(GL_DXE) -Y $(LIBDIR)/$(GL_IMP) -D $(LIBNAME) -E _gl -E _DMesa -U $(OBJECTS)
+       -dxe3gen -o $(LIBDIR)/$(GL_DXE) -Y $(LIBDIR)/$(GL_IMP) -D $(LIBNAME) -E _gl -E _DMesa -U $^
 endif
 endif
 
@@ -367,7 +353,4 @@ clean:
        -$(call UNLINK,tnl/*.o)
        -$(call UNLINK,x86/*.o)
        -$(call UNLINK,drivers/dos/*.o)
-       -$(call UNLINK,drivers/dos/mga/*.o)
        -$(call UNLINK,drivers/glide/*.o)
-
--include depend