fixed pointer arithmetic error in glCopyPixels
[mesa.git] / src / mesa / main / Makefile.win
index 3b3710a6c29b41eb0ba8b5575fbbba14b3e43f92..284601a1f897648a1f33f49bd50cf04dfad4abf5 100644 (file)
@@ -1,8 +1,15 @@
 # Makefile for Win32
+#
+#  NOTE: the install target may overwrite important files in the system dirs
+#  Check first, before making the install target.
+#
+#  This builds both the osmesa and Windows drivers.
+#
 
 !include <win32.mak>
 
 TOP = ..
+SUBDIRS = osmesa.dir
 
 CORE_SRCS = \
        tnl\t_array_api.c \
@@ -22,6 +29,7 @@ CORE_SRCS = \
        tnl\t_vb_light.c \
        tnl\t_vb_normals.c \
        tnl\t_vb_points.c \
+       tnl\t_vb_program.c \
        tnl\t_vb_render.c \
        tnl\t_vb_texgen.c \
        tnl\t_vb_texmat.c \
@@ -29,14 +37,11 @@ CORE_SRCS = \
        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 \
@@ -44,7 +49,6 @@ CORE_SRCS = \
        config.c \
        context.c \
        convolve.c \
-       copypix.c \
        debug.c \
        depth.c \
        dispatch.c \
@@ -67,33 +71,31 @@ CORE_SRCS = \
        imports.c \
        light.c \
        lines.c \
-       logic.c \
        lowpc.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 \
        teximage.c \
+       texformat.c \
        texobj.c \
        texstate.c \
        texstore.c \
        texutil.c \
        varray.c \
+       vpexec.c \
+       vpparse.c \
+       vpstate.c \
        vtxfmt.c \
-       winpos.c \
-       X86\x86.c \
-       X86\common_x86.c \
-       X86\3dnow.c \
-       X86\sse.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 \
@@ -120,16 +122,16 @@ CORE_SRCS = \
        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_texstore.c \
        swrast\s_texture.c \
        swrast\s_triangle.c \
        swrast\s_zoom.c
@@ -140,43 +142,69 @@ DRIVER_SRCS = \
        Trace\tr_error.c \
        Trace\tr_support.c \
        Trace\tr_wrapper.c \
-       Trace\tr_write.c
+       Trace\tr_write.c \
+       Windows\wgl.c \
+       Windows\wmesa.c
 
 ASM_SRCS =
 
 SRCS   = $(CORE_SRCS) $(DRIVER_SRCS)
 
-OSMESA_SRCS = OSmesa\osmesa.c
-OSMESA_OBJS = OSmesa\osmesa.obj
-
-all    : mesadll install
+all    : mesadll $(SUBDIRS)
 
 !include "$(TOP)/mesawin32.mak"
 
 mesadll        : $(MESADLL)
 
-CFLAGS = $(cvarsdll) $(CFLAGS) -D_OPENGL32_
-LFLAGS = $(dlllflags) $(LFLAGS)
+CFLAGS = $(cvarsdll) $(CFLAGS) -D_OPENGL32_ -DBUILD_GL32 -DNO_PARALLEL -DNO_STEREO
+!IFNDEF NODEBUG
+CFLAGS = $(CFLAGS) -DMESA_DEBUG
+!ENDIF
+LFLAGS = $(dlllflags) $(lcommon) $(LFLAGS)
 
 OBJS   = $(ASM_SRCS:.S=.obj) $(CORE_SRCS:.c=.obj) $(DRIVER_SRCS:.c=.obj)
-LIBS   = $(OPENGL) $(GLU) winmm.lib $(guilibsdll)
+LIBS   = winmm.lib $(guilibsdll)
 
 $(MESADLL)     : $(OBJS) mesa.def
        $(link) $(LFLAGS) -out:$(MESADLL) -def:mesa.def $(OBJS) $(LIBS)
+       @echo "copying Mesa dynamic link library to lib directory..."
+       -copy $(MESADLL) ..\lib
+       @echo "copying Mesa import library to lib directory..."
+       -copy $(MESALIB) ..\lib
+
+$(SUBDIRS)     :
+       @echo.
+       @echo Making in $* directory
+       @cd $*
+       @nmake -f Makefile.win -nologo
+       @cd ..
 
-#install       : $(MESADLL)
-#      @echo "copying Mesa dynamic link library to system directory..."
-#      -copy $(MESADLL) $(DLLINSTALL)
-#      @echo "copying Mesa header files to include directory..."
-#      -copy ..\..\include\GL\gl.h $(INCLUDEINSTALL)
-#      -copy ..\..\include\GL\glext.h $(INCLUDEINSTALL)
-#      @echo "copying Mesa import library to library directory..."
-#      -copy $(MESALIB) $(LIBINSTALL)
 install        : $(MESADLL)
+       @echo.
        @echo "copying Mesa dynamic link library to system directory..."
-       -copy $(MESADLL) $(TOP)\lib
+       -copy $(MESADLL) $(DLLINSTALL)
+       @echo "copying Mesa header files to include directory..."
+       -copy ..\..\include\GL\gl.h $(INCLUDEINSTALL)
+       -copy ..\..\include\GL\glext.h $(INCLUDEINSTALL)
        @echo "copying Mesa import library to library directory..."
-       -copy $(MESALIB) $(TOP)\lib
+       -copy $(MESALIB) $(LIBINSTALL)
+
+clean  ::
+       @del /f tnl\*.obj
+       @del /f swrast_setup\*.obj
+       @del /f math\*.obj
+       @del /f array_cache\*.obj
+       @del /f swrast\*.obj
+       @del /f Trace\*.obj
+       @del /f osmesa\*.obj
+       @del /f Windows\*.obj
+
+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.
 .c.obj :
-       $(cc) $(CFLAGS) -I. $<
+       $(cc) $(CFLAGS) -I. $< /Fo$*.obj