[Xorg-commit] xc/extras/freetype2/src/pshinter Jamfile,1.1.4.1,1.1.4.2 pshalgo.h,1.1.4.1,1.1.4.2 pshglob.c,1.1.4.1,1.1.4.2 pshglob.h,1.1.4.1,1.1.4.2 pshinter.c,1.1.4.1,1.1.4.2 pshrec.c,1.1.4.1,1.1.4.2 pshrec.h,1.1,1.1.4.1 rules.mk,1.1.4.1,1.1.4.2

Kaleb Keithley xorg-commit at pdx.freedesktop.org
Wed May 9 17:30:30 EEST 2007


Committed by: kaleb

Update of /cvs/xorg/xc/extras/freetype2/src/pshinter
In directory pdx:/home/kaleb/xorg/xc.XORG-CURRENT/extras/freetype2/src/pshinter

Modified Files:
      Tag: XORG-CURRENT
	Jamfile pshalgo.h pshglob.c pshglob.h pshinter.c pshrec.c 
	pshrec.h rules.mk 
Log Message:
merge most of XFree86 RC3 (4.3.99.903) from vendor branch.
bug #214


Index: Jamfile
===================================================================
RCS file: /cvs/xorg/xc/extras/freetype2/src/pshinter/Jamfile,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/Jamfile	26 Nov 2003 22:48:27 -0000	1.1.4.1
+++ b/Jamfile	23 Feb 2004 21:32:58 -0000	1.1.4.2
@@ -8,7 +8,7 @@
 
   if $(FT2_MULTI)
   {
-    _sources = pshrec pshglob pshalgo1 pshalgo2 pshalgo3 pshmod ;
+    _sources = pshrec pshglob pshalgo pshmod ;
   }
   else
   {

Index: pshalgo.h
===================================================================
RCS file: /cvs/xorg/xc/extras/freetype2/src/pshinter/pshalgo.h,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/pshalgo.h	26 Nov 2003 22:48:27 -0000	1.1.4.1
+++ b/pshalgo.h	23 Feb 2004 21:32:58 -0000	1.1.4.2
@@ -2,13 +2,13 @@
 /*                                                                         */
 /*  pshalgo.h                                                              */
 /*                                                                         */
-/*    This header file defines the used hinting algorithm.                 */
+/*    PostScript hinting algorithm (specification).                        */
 /*                                                                         */
-/*  Copyright 2001 by                                                      */
+/*  Copyright 2001, 2002, 2003 by                                          */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
-/*  This file is part of the FreeType project, and may only be used        */
-/*  modified and distributed under the terms of the FreeType project       */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
 /*  this file you indicate that you have read the license and              */
 /*  understand and accept it fully.                                        */
@@ -19,34 +19,236 @@
 #ifndef __PSHALGO_H__
 #define __PSHALGO_H__
 
+
+#include "pshrec.h"
+#include "pshglob.h"
+#include FT_TRIGONOMETRY_H
+
+
 FT_BEGIN_HEADER
 
-/* define to choose hinting algorithm */
-#define PSH_ALGORITHM_3
 
-#if defined(PSH_ALGORITHM_1)
+  /* handle to Hint structure */
+  typedef struct PSH_HintRec_*  PSH_Hint;
 
-#  include "pshalgo1.h"
-#  define PS_HINTS_APPLY_FUNC  ps1_hints_apply
+  /* hint bit-flags */
+  typedef enum
+  {
+    PSH_HINT_GHOST  = PS_HINT_FLAG_GHOST,
+    PSH_HINT_BOTTOM = PS_HINT_FLAG_BOTTOM,
+    PSH_HINT_ACTIVE = 4,
+    PSH_HINT_FITTED = 8
 
-#elif defined(PSH_ALGORITHM_2)
+  } PSH_Hint_Flags;
 
-#  include "pshalgo2.h"
-#  define PS_HINTS_APPLY_FUNC  ps2_hints_apply
 
-#elif defined(PSH_ALGORITHM_3)
+#define psh_hint_is_active( x )  ( ( (x)->flags & PSH_HINT_ACTIVE ) != 0 )
+#define psh_hint_is_ghost( x )   ( ( (x)->flags & PSH_HINT_GHOST  ) != 0 )
+#define psh_hint_is_fitted( x )  ( ( (x)->flags & PSH_HINT_FITTED ) != 0 )
 
-#  include "pshalgo3.h"
-#  define PS_HINTS_APPLY_FUNC  ps3_hints_apply
+#define psh_hint_activate( x )    (x)->flags |=  PSH_HINT_ACTIVE
+#define psh_hint_deactivate( x )  (x)->flags &= ~PSH_HINT_ACTIVE
+#define psh_hint_set_fitted( x )  (x)->flags |=  PSH_HINT_FITTED
 
-#else
+  /* hint structure */
+  typedef struct  PSH_HintRec_
+  {
+    FT_Int    org_pos;
+    FT_Int    org_len;
+    FT_Pos    cur_pos;
+    FT_Pos    cur_len;
+    FT_UInt   flags;
+    PSH_Hint  parent;
+    FT_Int    order;
+
+  } PSH_HintRec;
+
+
+  /* this is an interpolation zone used for strong points;  */
+  /* weak points are interpolated according to their strong */
+  /* neighbours                                             */
+  typedef struct  PSH_ZoneRec_
+  {
+    FT_Fixed  scale;
+    FT_Fixed  delta;
+    FT_Pos    min;
+    FT_Pos    max;
+
+  } PSH_ZoneRec, *PSH_Zone;
+
+
+  typedef struct  PSH_Hint_TableRec_
+  {
+    FT_UInt        max_hints;
+    FT_UInt        num_hints;
+    PSH_Hint       hints;
+    PSH_Hint*      sort;
+    PSH_Hint*      sort_global;
+    FT_UInt        num_zones;
+    PSH_ZoneRec*   zones;
+    PSH_Zone       zone;
+    PS_Mask_Table  hint_masks;
+    PS_Mask_Table  counter_masks;
+
+  } PSH_Hint_TableRec, *PSH_Hint_Table;
+
+
+  typedef struct PSH_PointRec_*    PSH_Point;
+  typedef struct PSH_ContourRec_*  PSH_Contour;
+
+  enum
+  {
+    PSH_DIR_NONE  =  4,
+    PSH_DIR_UP    = -1,
+    PSH_DIR_DOWN  =  1,
+    PSH_DIR_LEFT  = -2,
+    PSH_DIR_RIGHT =  2
+  };
+
+#define PSH_DIR_HORIZONTAL  2
+#define PSH_DIR_VERTICAL    1
+
+#define PSH_DIR_COMPARE( d1, d2 )   ( (d1) == (d2) || (d1) == -(d2) )
+#define PSH_DIR_IS_HORIZONTAL( d )  PSH_DIR_COMPARE( d, PSH_DIR_HORIZONTAL )
+#define PSH_DIR_IS_VERTICAL( d )    PSH_DIR_COMPARE( d, PSH_DIR_VERTICAL )
+
+
+ /* the following bit-flags are computed once by the glyph */
+ /* analyzer, for both dimensions                          */
+  enum
+  {
+    PSH_POINT_OFF    = 1,   /* point is off the curve */
+    PSH_POINT_SMOOTH = 2,   /* point is smooth        */
+    PSH_POINT_INFLEX = 4    /* point is inflection    */
+  };
+
+#define psh_point_is_smooth( p )  ( (p)->flags & PSH_POINT_SMOOTH )
+#define psh_point_is_off( p )     ( (p)->flags & PSH_POINT_OFF    )
+#define psh_point_is_inflex( p )  ( (p)->flags & PSH_POINT_INFLEX )
+
+#define psh_point_set_smooth( p )  (p)->flags |= PSH_POINT_SMOOTH
+#define psh_point_set_off( p )     (p)->flags |= PSH_POINT_OFF
+#define psh_point_set_inflex( p )  (p)->flags |= PSH_POINT_INFLEX
+
+  /* the following bit-flags are re-computed for each dimension */
+  enum
+  {
+    PSH_POINT_STRONG   = 16,   /* point is strong                           */
+    PSH_POINT_FITTED   = 32,   /* point is already fitted                   */
+    PSH_POINT_EXTREMUM = 64,   /* point is local extremum                   */
+    PSH_POINT_POSITIVE = 128,  /* extremum has positive contour flow        */
+    PSH_POINT_NEGATIVE = 256,  /* extremum has negative contour flow        */
+    PSH_POINT_EDGE_MIN = 512,  /* point is aligned to left/bottom stem edge */
+    PSH_POINT_EDGE_MAX = 1024  /* point is aligned to top/right stem edge   */
+  };
+
+#define psh_point_is_strong( p )    ( (p)->flags2 & PSH_POINT_STRONG )
+#define psh_point_is_fitted( p )    ( (p)->flags2 & PSH_POINT_FITTED )
+#define psh_point_is_extremum( p )  ( (p)->flags2 & PSH_POINT_EXTREMUM )
+#define psh_point_is_positive( p )  ( (p)->flags2 & PSH_POINT_POSITIVE )
+#define psh_point_is_negative( p )  ( (p)->flags2 & PSH_POINT_NEGATIVE )
+#define psh_point_is_edge_min( p )  ( (p)->flags2 & PSH_POINT_EDGE_MIN )
+#define psh_point_is_edge_max( p )  ( (p)->flags2 & PSH_POINT_EDGE_MAX )
+
+#define psh_point_set_strong( p )    (p)->flags2 |= PSH_POINT_STRONG
+#define psh_point_set_fitted( p )    (p)->flags2 |= PSH_POINT_FITTED
+#define psh_point_set_extremum( p )  (p)->flags2 |= PSH_POINT_EXTREMUM
+#define psh_point_set_positive( p )  (p)->flags2 |= PSH_POINT_POSITIVE
+#define psh_point_set_negative( p )  (p)->flags2 |= PSH_POINT_NEGATIVE
+#define psh_point_set_edge_min( p )  (p)->flags2 |= PSH_POINT_EDGE_MIN
+#define psh_point_set_edge_max( p )  (p)->flags2 |= PSH_POINT_EDGE_MAX
+
+
+  typedef struct  PSH_PointRec_
+  {
+    PSH_Point    prev;
+    PSH_Point    next;
+    PSH_Contour  contour;
+    FT_UInt      flags;
+    FT_UInt      flags2;
+    FT_Char      dir_in;
+    FT_Char      dir_out;
+    FT_Angle     angle_in;
+    FT_Angle     angle_out;
+    PSH_Hint     hint;
+    FT_Pos       org_u;
+    FT_Pos       org_v;
+    FT_Pos       cur_u;
+#ifdef DEBUG_HINTER
+    FT_Pos       org_x;
+    FT_Pos       cur_x;
+    FT_Pos       org_y;
+    FT_Pos       cur_y;
+    FT_UInt      flags_x;
+    FT_UInt      flags_y;
+#endif
+
+  } PSH_PointRec;
 
-#  error "invalid Postscript Hinter algorithm selection"
 
+#define PSH_POINT_EQUAL_ORG( a, b )  ( (a)->org_u == (b)->org_u && \
+                                       (a)->org_v == (b)->org_v )
+
+#define PSH_POINT_ANGLE( a, b )  FT_Atan2( (b)->org_u - (a)->org_u,  \
+                                           (b)->org_v - (a)->org_v )
+
+  typedef struct  PSH_ContourRec_
+  {
+    PSH_Point  start;
+    FT_UInt    count;
+
+  } PSH_ContourRec;
+
+
+  typedef struct  PSH_GlyphRec_
+  {
+    FT_UInt            num_points;
+    FT_UInt            num_contours;
+
+    PSH_Point          points;
+    PSH_Contour        contours;
+
+    FT_Memory          memory;
+    FT_Outline*        outline;
+    PSH_Globals        globals;
+    PSH_Hint_TableRec  hint_tables[2];
+
+    FT_Bool            vertical;
+    FT_Int             major_dir;
+    FT_Int             minor_dir;
+
+    FT_Bool            do_horz_hints;
+    FT_Bool            do_vert_hints;
+    FT_Bool            do_horz_snapping;
+    FT_Bool            do_vert_snapping;
+    FT_Bool            do_stem_adjust;
+
+  } PSH_GlyphRec, *PSH_Glyph;
+
+
+#ifdef DEBUG_HINTER
+  extern PSH_Hint_Table  ps_debug_hint_table;
+
+  typedef void
+  (*PSH_HintFunc)( PSH_Hint  hint,
+                   FT_Bool   vertical );
+
+  extern PSH_HintFunc    ps_debug_hint_func;
+
+  extern PSH_Glyph       ps_debug_glyph;
 #endif
 
+
+  extern FT_Error
+  ps_hints_apply( PS_Hints        ps_hints,
+                  FT_Outline*     outline,
+                  PSH_Globals     globals,
+                  FT_Render_Mode  hint_mode );
+
+
 FT_END_HEADER
 
+
 #endif /* __PSHALGO_H__ */
 
 

Index: pshglob.c
===================================================================
RCS file: /cvs/xorg/xc/extras/freetype2/src/pshinter/pshglob.c,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/pshglob.c	26 Nov 2003 22:48:27 -0000	1.1.4.1
+++ b/pshglob.c	23 Feb 2004 21:32:58 -0000	1.1.4.2
@@ -5,7 +5,7 @@
 /*    PostScript hinter global hinting management (body).                  */
 /*    Inspired by the new auto-hinter module.                              */
 /*                                                                         */
-/*  Copyright 2001, 2002 by                                                */
+/*  Copyright 2001, 2002, 2003 by                                          */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used        */
@@ -78,6 +78,8 @@
   }
 
 
+#if 0
+
   /* org_width is is font units, result in device pixels, 26.6 format */
   FT_LOCAL_DEF( FT_Pos )
   psh_dimension_snap_width( PSH_Dimension  dimension,
@@ -122,6 +124,8 @@
     return width;
   }
 
+#endif /* 0 */
+
 
   /*************************************************************************/
   /*************************************************************************/
@@ -640,7 +644,7 @@
           read++;
         }
 
-        dim->stdw.count = write - dim->stdw.widths;
+        dim->stdw.count = priv->num_snap_widths;
       }
 
       /* copy standard heights */
@@ -659,7 +663,7 @@
           read++;
         }
 
-        dim->stdw.count = write - dim->stdw.widths;
+        dim->stdw.count = priv->num_snap_heights;
       }
 
       /* copy blue zones */
@@ -673,7 +677,7 @@
 
       globals->blues.blue_scale = priv->blue_scale
                                   ? priv->blue_scale
-                                  : 0x28937L;   /* 0.039625 * 0x400000L */
+                                  : 0x27A000L; /* 0.039625 * 0x10000 * 1000 */
 
       globals->blues.blue_shift = priv->blue_shift
                                   ? priv->blue_shift
@@ -696,7 +700,7 @@
   }
 
 
-  static FT_Error
+  FT_LOCAL_DEF( FT_Error )
   psh_globals_set_scale( PSH_Globals  globals,
                          FT_Fixed     x_scale,
                          FT_Fixed     y_scale,

Index: pshglob.h
===================================================================
RCS file: /cvs/xorg/xc/extras/freetype2/src/pshinter/pshglob.h,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/pshglob.h	26 Nov 2003 22:48:27 -0000	1.1.4.1
+++ b/pshglob.h	23 Feb 2004 21:32:58 -0000	1.1.4.2
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    PostScript hinter global hinting management.                         */
 /*                                                                         */
-/*  Copyright 2001, 2002 by                                                */
+/*  Copyright 2001, 2002, 2003 by                                          */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -159,11 +159,20 @@
   psh_globals_funcs_init( PSH_Globals_FuncsRec*  funcs );
 
 
+#if 0
   /* snap a stem width to fitter coordinates.  `org_width' is in font */
   /* units.  The result is in device pixels (26.6 format).            */
   FT_LOCAL( FT_Pos )
   psh_dimension_snap_width( PSH_Dimension  dimension,
                             FT_Int         org_width );
+#endif
+
+  FT_LOCAL( FT_Error )
+  psh_globals_set_scale( PSH_Globals  globals,
+                         FT_Fixed     x_scale,
+                         FT_Fixed     y_scale,
+                         FT_Fixed     x_delta,
+                         FT_Fixed     y_delta );
 
   /* snap a stem to one or two blue zones */
   FT_LOCAL( void )

Index: pshinter.c
===================================================================
RCS file: /cvs/xorg/xc/extras/freetype2/src/pshinter/pshinter.c,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/pshinter.c	26 Nov 2003 22:48:27 -0000	1.1.4.1
+++ b/pshinter.c	23 Feb 2004 21:32:58 -0000	1.1.4.2
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType PostScript Hinting module                                   */
 /*                                                                         */
-/*  Copyright 2001 by                                                      */
+/*  Copyright 2001, 2003 by                                                */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -21,9 +21,7 @@
 #include <ft2build.h>
 #include "pshrec.c"
 #include "pshglob.c"
-#include "pshalgo1.c"
-#include "pshalgo2.c"
-#include "pshalgo3.c"
+#include "pshalgo.c"
 #include "pshmod.c"
 
 

Index: pshrec.c
===================================================================
RCS file: /cvs/xorg/xc/extras/freetype2/src/pshinter/pshrec.c,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/pshrec.c	26 Nov 2003 22:48:27 -0000	1.1.4.1
+++ b/pshrec.c	23 Feb 2004 21:32:58 -0000	1.1.4.2
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType PostScript hints recorder (body).                           */
 /*                                                                         */
-/*  Copyright 2001, 2002 by                                                */
+/*  Copyright 2001, 2002, 2003 by                                          */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -23,6 +23,8 @@
 #include "pshrec.h"
 #include "pshalgo.h"
 
+#include "pshnterr.h"
+
 #undef  FT_COMPONENT
 #define FT_COMPONENT  trace_pshrec
 
@@ -820,7 +822,7 @@
       break;
 
     default:
-      hints->error     = FT_Err_Invalid_Argument;
+      hints->error     = PSH_Err_Invalid_Argument;
       hints->hint_type = hint_type;
 
       FT_ERROR(( "ps_hints_open: invalid charstring type!\n" ));
@@ -861,8 +863,9 @@
             FT_Memory  memory = hints->memory;
 
 
-            error = ps_dimension_add_t1stem( dim, stems[0], stems[1],
-                                             memory, NULL );
+            error = ps_dimension_add_t1stem(
+                      dim, (FT_Int)stems[0], (FT_Int)stems[1],
+                      memory, NULL );
             if ( error )
             {
               FT_ERROR(( "ps_hints_stem: could not add stem"
@@ -917,8 +920,9 @@
         /* add the three stems to our hints/masks table */
         for ( count = 0; count < 3; count++, stems += 2 )
         {
-          error = ps_dimension_add_t1stem( dim, stems[0], stems[1],
-                                           memory, &idx[count] );
+          error = ps_dimension_add_t1stem(
+                    dim, (FT_Int)stems[0], (FT_Int)stems[1],
+                    memory, &idx[count] );
           if ( error )
             goto Fail;
         }
@@ -932,7 +936,7 @@
       else
       {
         FT_ERROR(( "ps_hints_t1stem3: called with invalid hint type!\n" ));
-        error = FT_Err_Invalid_Argument;
+        error = PSH_Err_Invalid_Argument;
         goto Fail;
       }
     }
@@ -973,7 +977,7 @@
       else
       {
         /* invalid hint type */
-        error = FT_Err_Invalid_Argument;
+        error = PSH_Err_Invalid_Argument;
         goto Fail;
       }
     }
@@ -1139,7 +1143,7 @@
     funcs->stem  = (T1_Hints_SetStemFunc) t1_hints_stem;
     funcs->stem3 = (T1_Hints_SetStem3Func)ps_hints_t1stem3;
     funcs->reset = (T1_Hints_ResetFunc)   ps_hints_t1reset;
-    funcs->apply = (T1_Hints_ApplyFunc)   PS_HINTS_APPLY_FUNC;
+    funcs->apply = (T1_Hints_ApplyFunc)   ps_hints_apply;
   }
 
 
@@ -1164,7 +1168,8 @@
                   FT_Int     count,
                   FT_Fixed*  coords )
   {
-    FT_Pos  stems[32], y, n, total = count;
+    FT_Pos  stems[32], y, n;
+    FT_Int  total = count;
 
 
     y = 0;
@@ -1179,7 +1184,7 @@
       for ( n = 0; n < count * 2; n++ )
       {
         y       += coords[n];
-        stems[n] = ( y + 0x8000 ) >> 16;
+        stems[n] = ( y + 0x8000L ) >> 16;
       }
 
       /* compute lengths */
@@ -1204,7 +1209,7 @@
     funcs->stems   = (T2_Hints_StemsFunc)  t2_hints_stems;
     funcs->hintmask= (T2_Hints_MaskFunc)   ps_hints_t2mask;
     funcs->counter = (T2_Hints_CounterFunc)ps_hints_t2counter;
-    funcs->apply   = (T2_Hints_ApplyFunc)  PS_HINTS_APPLY_FUNC;
+    funcs->apply   = (T2_Hints_ApplyFunc)  ps_hints_apply;
   }
 
 

Index: pshrec.h
===================================================================
RCS file: /cvs/xorg/xc/extras/freetype2/src/pshinter/pshrec.h,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -u -d -r1.1 -r1.1.4.1
--- a/pshrec.h	14 Nov 2003 16:48:24 -0000	1.1
+++ b/pshrec.h	23 Feb 2004 21:32:58 -0000	1.1.4.1
@@ -125,10 +125,6 @@
   } PS_DimensionRec, *PS_Dimension;
 
 
-  /* magic value used within PS_HintsRec */
-#define PS_HINTS_MAGIC  0x68696e74   /* "hint" */
-
-
   /* glyph hints descriptor                                */
   /* dimension 0 => X coordinates + vertical hints/stems   */
   /* dimension 1 => Y coordinates + horizontal hints/stems */

Index: rules.mk
===================================================================
RCS file: /cvs/xorg/xc/extras/freetype2/src/pshinter/rules.mk,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/rules.mk	26 Nov 2003 22:48:27 -0000	1.1.4.1
+++ b/rules.mk	23 Feb 2004 21:32:58 -0000	1.1.4.2
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 2001 by
+# Copyright 2001, 2003 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
@@ -15,28 +15,26 @@
 
 # PSHINTER driver directory
 #
-PSHINTER_DIR  := $(SRC_)pshinter
-PSHINTER_DIR_ := $(PSHINTER_DIR)$(SEP)
+PSHINTER_DIR := $(SRC_DIR)/pshinter
 
 
 # compilation flags for the driver
 #
-PSHINTER_COMPILE := $(FT_COMPILE) $I$(PSHINTER_DIR)
+PSHINTER_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(PSHINTER_DIR))
 
 
 # PSHINTER driver sources (i.e., C files)
 #
-PSHINTER_DRV_SRC := $(PSHINTER_DIR_)pshrec.c   \
-                    $(PSHINTER_DIR_)pshglob.c  \
-                    $(PSHINTER_DIR_)pshmod.c   \
-                    $(PSHINTER_DIR_)pshalgo1.c \
-                    $(PSHINTER_DIR_)pshalgo2.c \
-                    $(PSHINTER_DIR_)pshalgo3.c
+PSHINTER_DRV_SRC := $(PSHINTER_DIR)/pshrec.c  \
+                    $(PSHINTER_DIR)/pshglob.c \
+                    $(PSHINTER_DIR)/pshmod.c  \
+                    $(PSHINTER_DIR)/pshalgo.c
 
 
 # PSHINTER driver headers
 #
-PSHINTER_DRV_H := $(PSHINTER_DRV_SRC:%c=%h)
+PSHINTER_DRV_H := $(PSHINTER_DRV_SRC:%c=%h) \
+                  $(PSHINTER_DIR)/pshnterr.h
 
 
 # PSHINTER driver object(s)
@@ -44,25 +42,25 @@
 #   PSHINTER_DRV_OBJ_M is used during `multi' builds.
 #   PSHINTER_DRV_OBJ_S is used during `single' builds.
 #
-PSHINTER_DRV_OBJ_M := $(PSHINTER_DRV_SRC:$(PSHINTER_DIR_)%.c=$(OBJ_)%.$O)
-PSHINTER_DRV_OBJ_S := $(OBJ_)pshinter.$O
+PSHINTER_DRV_OBJ_M := $(PSHINTER_DRV_SRC:$(PSHINTER_DIR)/%.c=$(OBJ_DIR)/%.$O)
+PSHINTER_DRV_OBJ_S := $(OBJ_DIR)/pshinter.$O
 
 # PSHINTER driver source file for single build
 #
-PSHINTER_DRV_SRC_S := $(PSHINTER_DIR_)pshinter.c
+PSHINTER_DRV_SRC_S := $(PSHINTER_DIR)/pshinter.c
 
 
 # PSHINTER driver - single object
 #
 $(PSHINTER_DRV_OBJ_S): $(PSHINTER_DRV_SRC_S) $(PSHINTER_DRV_SRC) \
                        $(FREETYPE_H) $(PSHINTER_DRV_H)
-	$(PSHINTER_COMPILE) $T$@ $(PSHINTER_DRV_SRC_S)
+	$(PSHINTER_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(PSHINTER_DRV_SRC_S))
 
 
 # PSHINTER driver - multiple objects
 #
-$(OBJ_)%.$O: $(PSHINTER_DIR_)%.c $(FREETYPE_H) $(PSHINTER_DRV_H)
-	$(PSHINTER_COMPILE) $T$@ $<
+$(OBJ_DIR)/%.$O: $(PSHINTER_DIR)/%.c $(FREETYPE_H) $(PSHINTER_DRV_H)
+	$(PSHINTER_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
 
 
 # update main driver object lists





More information about the xorg-commit mailing list