# Makefile generated by imake - do not edit!
# $Xorg: imake.c,v 1.5 2000/08/18 04:03:59 coskrey Exp $

# ----------------------------------------------------------------------
# Makefile generated from "Imake.tmpl" and <Imakefile>
# $Xorg: Imake.tmpl,v 1.4 2000/08/17 19:41:46 cpqbld Exp $
#
#
#
#
# $XFree86: xc/config/cf/Imake.tmpl,v 3.101 2001/04/23 16:17:05 tsi Exp $
# ----------------------------------------------------------------------

all::

.SUFFIXES: .i

# $Xorg: Imake.cf,v 1.4 2000/08/17 19:41:45 cpqbld Exp $

# $XFree86: xc/config/cf/Imake.cf,v 3.66 2001/04/18 16:13:17 dawes Exp $

# Keep cpp from replacing path elements containing i486/i586/i686

#  for compatibility with 3.3.x

# -----------------------------------------------------------------------
# site-specific configuration parameters that need to come before
# the platform-specific parameters - edit site.def to change

# site:  $TOG: site.sample /main/r64_final/1 1998/02/05 16:28:49 kaleb $

# site:  $XFree86: xc/config/cf/site.def,v 3.23 2000/03/31 22:55:15 dawes Exp $

# $XFree86: xc/config/cf/xf86site.def,v 3.172 2001/02/26 18:27:56 dawes Exp $

# ----------------------------------------------------------------------
# platform-specific configuration parameters - edit linux.cf to change

# platform:  $Xorg: linux.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $

# platform:  $XFree86: xc/config/cf/linux.cf,v 3.165 2001/04/19 19:54:43 dawes Exp $

# operating system:  Linux 2.4.9-31 i686 [ELF] (2.4.9)
# libc:	(6.2.5)
# binutils:	(32)

# $Xorg: lnxLib.rules,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
# $XFree86: xc/config/cf/lnxLib.rules,v 3.40 2001/02/16 01:26:08 dawes Exp $

# $XFree86: xc/config/cf/xfree86.cf,v 3.360 2001/05/19 00:26:41 dawes Exp $

# $Xorg: xfree86.cf,v 1.4 2000/08/17 19:41:49 cpqbld Exp $

AFB_DEFS = -DUSE_AFB

DRIVERSDKDIR = $(USRLIBDIR)/Server
DRIVERSDKMODULEDIR = $(USRLIBDIR)/Server/modules
DRIVERSDKINCLUDEDIR = $(USRLIBDIR)/Server/include

       XF86SRC = $(SERVERSRC)/hw/xfree86
    XF86COMSRC = $(XF86SRC)/common
 XF86PARSERSRC = $(XF86SRC)/parser
     XF86OSSRC = $(XF86SRC)/os-support
 XF86DRIVERSRC = $(XF86SRC)/drivers
     DRIVERSRC = $(XF86DRIVERSRC)

        XFREE86DOCDIR = $(DOCDIR)
      XFREE86PSDOCDIR = $(DOCPSDIR)
    XFREE86HTMLDOCDIR = $(DOCHTMLDIR)
XFREE86JAPANESEDOCDIR = $(DOCDIR)/Japanese

# $Xorg: xf86.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $

# $XFree86: xc/config/cf/xf86.rules,v 3.32 2000/10/30 23:02:06 tsi Exp $

# ----------------------------------------------------------------------
# site-specific configuration parameters that go after
# the platform-specific parameters - edit site.def to change

# site:  $TOG: site.sample /main/r64_final/1 1998/02/05 16:28:49 kaleb $

# site:  $XFree86: xc/config/cf/site.def,v 3.23 2000/03/31 22:55:15 dawes Exp $

# ---------------------------------------------------------------------
# Imake rules for building libraries, programs, scripts, and data files
# rules:  $Xorg: Imake.rules,v 1.3 2000/08/17 19:41:46 cpqbld Exp $
#
#
#
#
# rules:  $XFree86: xc/config/cf/Imake.rules,v 3.93 2001/03/31 01:57:20 keithp Exp $

 _NULLCMD_ = @ echo -n

GLIDE2INCDIR =

GLIDE3INCDIR = /usr/src/build/66196-i386/install/usr/include/glide3

GLIDE3LIBNAME = glide3

TKLIBNAME =

TKLIBDIR =

TCLLIBNAME =

TCLIBDIR =

          PATHSEP = /
            SHELL = /bin/sh -e

              TOP = .
      CURRENT_DIR = .

            IMAKE = imake
           DEPEND = gccmakedep
        MKDIRHIER = mkdir -p
          REVPATH = revpath
    EXPORTLISTGEN =
             RMAN = rman
      RMANOPTIONS = -f HTML
        CONFIGSRC = $(TOP)/config
         IMAKESRC = $(CONFIGSRC)/imake
        DEPENDSRC = $(CONFIGSRC)/util

          INCROOT = /usr/X11R6/include
        USRLIBDIR = /usr/X11R6/lib
           VARDIR = /var
        VARLIBDIR = $(VARDIR)/lib
  SYSTEMUSRLIBDIR = /usr/lib
  SYSTEMUSRINCDIR = /usr/include
         SHLIBDIR = /usr/X11R6/lib
       LINTLIBDIR = $(USRLIBDIR)/lint
          MANPATH = /usr/X11R6/man
    MANSOURCEPATH = $(MANPATH)/man
           MANDIR = $(MANSOURCEPATH)1
        LIBMANDIR = $(MANSOURCEPATH)3
       FILEMANDIR = $(MANSOURCEPATH)5
       MISCMANDIR = $(MANSOURCEPATH)7
     DRIVERMANDIR = $(MANSOURCEPATH)4
     LOGDIRECTORY = $(VARDIR)/log

        VARRUNDIR = $(VARDIR)/run

         VARDBDIR = $(VARDIR)/lib

               AR = ar clq
  BOOTSTRAPCFLAGS = -O2 -march=i386 -mcpu=i686 -pipe
               CC = gcc
               AS = as

.SUFFIXES: .cc

              CXX = c++
          CXXFILT = c++filt
           CXXLIB =
    CXXDEBUGFLAGS = -O2 -march=i386 -mcpu=i686 -pipe
CXXDEPENDINCLUDES =
 CXXEXTRA_DEFINES =
CXXEXTRA_INCLUDES =
   CXXSTD_DEFINES = -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE    $(CXXPROJECT_DEFINES)
       CXXOPTIONS =
      CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES)
       CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(DEFINES) $(CXXEXTRA_DEFINES)
         CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES)

         COMPRESS = compress
          GZIPCMD = gzip
              CPP = /lib/cpp $(STD_CPP_DEFINES)
           RAWCPP = /lib/cpp -undef $(STD_CPP_OPTIONS)
    PREPROCESSCMD = gcc -E $(STD_CPP_DEFINES)
          INSTALL = install
     INSTALLFLAGS = -c
               LD = ld
              LEX = flex -l
               M4 = m4
          M4FLAGS =
           LEXLIB = -lfl
             YACC = bison -y
           CCYACC = bison -y
             LINT = lint
      LINTLIBFLAG = -C
         LINTOPTS = -axz
               LN = ln -s
             MAKE = make
               MV = mv -f
               CP = cp

           RANLIB = ranlib
  RANLIBINSTFLAGS =

               RM = rm -f
             PERL = perl
         PERLOPTS =
        MANSUFFIX = 1x
     LIBMANSUFFIX = 3x
    FILEMANSUFFIX = 5x
    MISCMANSUFFIX = 7x
  DRIVERMANSUFFIX = 4x
     MANSRCSUFFIX = man
     MANNEWSUFFIX = _man
          MANDEFS = -D__filemansuffix__=$(FILEMANSUFFIX) -D__miscmansuffix__=$(MISCMANSUFFIX) -D__drivermansuffix__=$(DRIVERMANSUFFIX) -D__projectroot__=$(PROJECTROOT) $(XORGMANDEFS) $(VENDORMANDEFS)

   COMPRESSMANCMD = gzip -n

            TROFF = groff -Tps
            NROFF = nroff
         MSMACROS = -ms
        MANMACROS = -man
              TBL = tbl
              EQN = eqn
             NEQN = neqn
              COL = col
         COLFLAGS = -b
            MODCC = gcc
           MODCPP = /lib/cpp
        MODCFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) -fno-merge-constants $(THREAD_CFLAGS) $(ALLDEFINES)
            MODAS = as
       MODASFLAGS =
            MODLD = ld
       MODLDFLAGS =
MODLDCOMBINEFLAGS = -r
            MODAR = ar clq
        MODRANLIB = ranlib

     STD_INCLUDES =
  STD_CPP_OPTIONS = -traditional
  STD_CPP_DEFINES = -traditional -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE    $(PROJECT_DEFINES)
      STD_DEFINES = -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE    $(PROJECT_DEFINES)
 EXTRA_LOAD_FLAGS =
  EXTRA_LDOPTIONS =
  EXTRA_LIBRARIES =
             TAGS = ctags

   PARALLELMFLAGS = -j

    SHAREDCODEDEF =
         SHLIBDEF =

     SHLIBLDFLAGS = -shared

         PICFLAGS = -fPIC

      CXXPICFLAGS = -fPIC

    PROTO_DEFINES = -DFUNCPROTO=15 -DNARROWPROTO

     INSTPGMFLAGS =

     INSTBINFLAGS = -m 0755
     INSTUIDFLAGS = -m 4711
     INSTLIBFLAGS = -m 0644
     INSTINCFLAGS = -m 0444
     INSTMANFLAGS = -m 0444
     INSTDATFLAGS = -m 0444
    INSTKMEMFLAGS = -m 4711

      PROJECTROOT = /usr/X11R6

      CDEBUGFLAGS = -O2 -march=i386 -mcpu=i686 -pipe
        CCOPTIONS =

      ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
       ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(MODULE_DEFINES) $(DEFINES) $(EXTRA_DEFINES)
           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(MODULE_CFLAGS) $(ALLDEFINES)
        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES)
         LDPRELIB = -L$(USRLIBDIR)
        LDPOSTLIB =
        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS)  $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
     CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)

           LDLIBS = $(LDPOSTLIBS) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)

           CCLINK = $(CC)

          CXXLINK = $(CXX)

     LDSTRIPFLAGS = -x
   LDCOMBINEFLAGS = -r
      DEPENDFLAGS =
   DEPEND_DEFINES = -DUSE_MAKEDEPEND

# Not sure this belongs here
         TKLIBDIR =
         TKINCDIR =
        TKLIBNAME =
        TKLIBRARY = -L$(TKLIBDIR) -l$(TKLIBNAME)
        TCLLIBDIR =
        TCLINCDIR =
       TCLLIBNAME =
       TCLLIBRARY = -L$(TCLLIBDIR) -l$(TCLLIBNAME)

        MACROFILE = linux.cf
           RM_CMD = $(RM)

    IMAKE_DEFINES =

         IRULESRC = $(CONFIGDIR)
        IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)

     ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/X11.tmpl 			$(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) 			$(IRULESRC)/xfree86.cf $(IRULESRC)/xf86.rules $(IRULESRC)/xf86site.def $(IRULESRC)/host.def $(EXTRA_ICONFIGFILES)

# $Xorg: X11.rules,v 1.4 2000/08/17 19:41:46 cpqbld Exp $

# $XFree86: xc/config/cf/X11.rules,v 1.5 2000/11/06 19:24:00 dawes Exp $

# ----------------------------------------------------------------------
# X Window System Build Parameters and Rules
# $Xorg: X11.tmpl,v 1.6 2000/08/17 19:41:46 cpqbld Exp $
#
#
#
#
# $XFree86: xc/config/cf/X11.tmpl,v 1.115.2.2 2001/05/29 18:21:57 dawes Exp $

XORGRELSTRING = Release 6.5
XORGMANNAME = X Version 11

VENDORMANNAME = XFree86
VENDORMANVERSION = Version 4.1.0

STICKY_DEFINES = -DHAS_STICKY_DIR_BIT

FCHOWN_DEFINES = -DHAS_FCHOWN

# -----------------------------------------------------------------------
# X Window System make variables; these need to be coordinated with rules

             XTOP = $(TOP)
           BINDIR = /usr/X11R6/bin
     BUILDINCROOT = $(TOP)/exports
      BUILDINCDIR = $(BUILDINCROOT)/include
      BUILDINCTOP = ../..
      BUILDLIBDIR = $(TOP)/exports/lib
      BUILDLIBTOP = ../..
      BUILDBINDIR = $(TOP)/exports/bin
      BUILDBINTOP = ../..
   BUILDMODULEDIR = $(BUILDLIBDIR)/modules
   BUILDMODULETOP = $(BUILDLIBTOP)/..
    XBUILDINCROOT = $(XTOP)/exports
     XBUILDINCDIR = $(XBUILDINCROOT)/include/X11
     XBUILDINCTOP = ../../..
     XBUILDBINDIR = $(XBUILDINCROOT)/bin
           INCDIR = $(INCROOT)
           ADMDIR = /var/log
           LIBDIR = $(USRLIBDIR)/X11
       LIBEXECDIR = /usr/X11R6/libexec
        MODULEDIR = $(USRLIBDIR)/modules
   TOP_X_INCLUDES =

        ETCX11DIR = /etc/X11

          CONFDIR = $(ETCX11DIR)

           DOCDIR = $(LIBDIR)/doc
       DOCHTMLDIR = $(DOCDIR)/html
         DOCPSDIR = $(DOCDIR)/PostScript
          FONTDIR = $(LIBDIR)/fonts
     ENCODINGSDIR = $(FONTDIR)/encodings
         XINITDIR = /etc/X11/xinit
           XDMDIR = /etc/X11/xdm
        XDMVARDIR = $(VARLIBDIR)/xdm
           TWMDIR = $(LIBDIR)/twm
           XSMDIR = $(LIBDIR)/xsm
           NLSDIR = $(LIBDIR)/nls
       XLOCALEDIR = $(LIBDIR)/locale
        PEXAPIDIR = $(LIBDIR)/PEX
      LBXPROXYDIR = /etc/X11/lbxproxy
  PROXYMANAGERDIR = /etc/X11/proxymngr
        XPRINTDIR = /etc/X11/xserver
      XAPPLOADDIR = $(LIBDIR)/app-defaults
       FONTCFLAGS = -t

     INSTAPPFLAGS = $(INSTDATFLAGS)

              RGB = $(BINDIR)/rgb
            FONTC = $(BINDIR)/bdftopcf
        MKFONTDIR = $(BINDIR)/mkfontdir
         XFTCACHE = $(BINDIR)/xftcache
      MKHTMLINDEX = $(BINDIR)/mkhtmlindex
          UCS2ANY = $(BINDIR)/ucs2any.pl
      BDFTRUNCATE = $(BINDIR)/bdftruncate.pl
     UCSMAPPREFIX = $(FONTDIR)/util/map-

     HTMLINDEXCMD = HtmlIndexCmd

       DOCUTILSRC = $(XTOP)/doc/util
        CLIENTSRC = $(TOP)/clients
          DEMOSRC = $(TOP)/demos
       XDOCMACROS = $(DOCUTILSRC)/macros.t
       XIDXMACROS = $(DOCUTILSRC)/indexmacros.t
       PROGRAMSRC = $(TOP)/programs
           LIBSRC = $(XTOP)/lib
          FONTSRC = $(XTOP)/fonts
     ENCODINGSSRC = $(FONTSRC)/encodings
       INCLUDESRC = $(BUILDINCROOT)/include
      XINCLUDESRC = $(INCLUDESRC)/X11
        SERVERSRC = $(XTOP)/programs/Xserver
       CONTRIBSRC = $(XTOP)/../contrib
   UNSUPPORTEDSRC = $(XTOP)/unsupported
           DOCSRC = $(XTOP)/doc
           RGBSRC = $(XTOP)/programs/rgb
      BDFTOPCFSRC = $(PROGRAMSRC)/bdftopcf
     MKFONTDIRSRC = $(PROGRAMSRC)/mkfontdir
    FONTSERVERSRC = $(PROGRAMSRC)/xfs
       FONTINCSRC = $(XTOP)/include/fonts
        EXTINCSRC = $(XTOP)/include/extensions
      FTSOURCEDIR = $(TOP)/extras/FreeType
     XTTSOURCEDIR = $(TOP)/extras/X-TrueType
       MESASRCDIR = $(TOP)/extras/Mesa
  OGLSAMPLESRCDIR = $(TOP)/extras/ogl-sample
        PSWRAPSRC = $(XTOP)/config/pswrap
     TRANSCOMMSRC = $(LIBSRC)/xtrans
   TRANS_INCLUDES = -I$(TRANSCOMMSRC)
 CONNECTION_FLAGS = -DUNIXCONN -DTCPCONN $(STICKY_DEFINES) $(FCHOWN_DEFINES)

      XORGMANDEFS = -D__xorgversion__='"$(XORGRELSTRING)" "$(XORGMANNAME)"'
    VENDORMANDEFS = -D__vendorversion__='"$(VENDORMANVERSION)" "$(VENDORMANNAME)"'

       XENVLIBDIR = $(USRLIBDIR)
   CLIENTENVSETUP = LD_LIBRARY_PATH=$(XENVLIBDIR)

# $Xorg: lnxLib.tmpl,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
# $XFree86: xc/config/cf/lnxLib.tmpl,v 3.12 1999/06/27 14:07:17 dawes Exp $

          XLIBSRC = $(LIBSRC)/X11

SOXLIBREV = 6.2
DEPXONLYLIB =
XONLYLIB =  -lX11

LINTXONLY = $(LINTLIBDIR)/llib-lX11.ln

         XLIBONLY = $(XONLYLIB)

      XEXTLIBSRC = $(LIBSRC)/Xext

SOXEXTREV = 6.4
DEPEXTENSIONLIB =
EXTENSIONLIB =  -lXext

LINTEXTENSION = $(LINTLIBDIR)/llib-lXext.ln

LINTEXTENSIONLIB = $(LINTEXTENSION)
          DEPXLIB = $(DEPEXTENSIONLIB) $(DEPXONLYLIB)
             XLIB = $(EXTENSIONLIB) $(XONLYLIB)
         LINTXLIB = $(LINTXONLYLIB)

    XSSLIBSRC = $(LIBSRC)/Xss

DEPXSSLIB = $(USRLIBDIR)/libXss.a
XSSLIB =  -lXss

LINTXSS = $(LINTLIBDIR)/llib-lXss.ln

    XXF86MISCLIBSRC = $(LIBSRC)/Xxf86misc

DEPXXF86MISCLIB = $(USRLIBDIR)/libXxf86misc.a
XXF86MISCLIB =  -lXxf86misc

LINTXXF86MISC = $(LINTLIBDIR)/llib-lXxf86misc.ln

    XXF86VMLIBSRC = $(LIBSRC)/Xxf86vm

DEPXXF86VMLIB = $(USRLIBDIR)/libXxf86vm.a
XXF86VMLIB =  -lXxf86vm

LINTXXF86VM = $(LINTLIBDIR)/llib-lXxf86vm.ln

    XXF86DGALIBSRC = $(LIBSRC)/Xxf86dga

DEPXXF86DGALIB = $(USRLIBDIR)/libXxf86dga.a
XXF86DGALIB =  -lXxf86dga

LINTXXF86DGA = $(LINTLIBDIR)/llib-lXxf86dga.ln

    XXF86RUSHLIBSRC = $(LIBSRC)/Xxf86rush

DEPXXF86RUSHLIB = $(USRLIBDIR)/libXxf86rush.a
XXF86RUSHLIB =  -lXxf86rush

LINTXXF86RUSH = $(LINTLIBDIR)/llib-lXxf86rush.ln

    XVLIBSRC = $(LIBSRC)/Xv

DEPXVLIB = $(USRLIBDIR)/libXv.a
XVLIB =  -lXv

LINTXV = $(LINTLIBDIR)/llib-lXv.ln

    XINERAMALIBSRC = $(LIBSRC)/Xinerama

DEPXINERAMALIB = $(USRLIBDIR)/libXinerama.a
XINERAMALIB =  -lXinerama

LINTXINERAMA = $(LINTLIBDIR)/llib-lXinerama.ln

    DPSLIBSRC = $(LIBSRC)/dps

SODPSREV = 1.0
DEPDPSLIB =
DPSLIB =  -ldps

LINTDPS = $(LINTLIBDIR)/llib-ldps.ln

    DPSTKLIBSRC = $(LIBSRC)/dpstk

SODPSTKREV = 1.0
DEPDPSTKLIB =
DPSTKLIB =  -ldpstk

LINTDPSTK = $(LINTLIBDIR)/llib-ldpstk.ln

    PSRESLIBSRC = $(LIBSRC)/psres

SOPSRESREV = 1.0
DEPPSRESLIB =
PSRESLIB =  -lpsres

LINTPSRES = $(LINTLIBDIR)/llib-lpsres.ln

    GLULIBSRC = $(LIBSRC)/GLU

SOGLUREV = 1.3
DEPGLULIB =
GLULIB =  -lGLU

LINTGLU = $(LINTLIBDIR)/llib-lGLU.ln

    GLXLIBSRC = $(LIBSRC)/GL

SOGLREV = 1.2
DEPGLXLIB =
GLXLIB =  -lGL

LINTGLX = $(LINTLIBDIR)/llib-lGL.ln

    GLWIDGETSRC = $(LIBSRC)/GLw

DEPGLWLIB = $(USRLIBDIR)/libGLw.a
GLWLIB =  -lGLw

LINTGLW = $(LINTLIBDIR)/llib-lGLw.ln

    XRENDERLIBSRC = $(LIBSRC)/Xrender

SOXRENDERREV = 1.0
DEPXRENDERLIB =
XRENDERLIB =  -lXrender

LINTXRENDER = $(LINTLIBDIR)/llib-lXrender.ln

    XFONTCACHELIBSRC = $(LIBSRC)/Xfontcache

DEPXFONTCACHELIB = $(USRLIBDIR)/libXfontcache.a
XFONTCACHELIB =  -lXfontcache

LINTXFONTCACHE = $(LINTLIBDIR)/llib-lXfontcache.ln

         XAUTHSRC = $(LIBSRC)/Xau

DEPXAUTHLIB = $(USRLIBDIR)/libXau.a
XAUTHLIB =  -lXau

LINTXAUTH = $(LINTLIBDIR)/llib-lXau.ln

      XDMCPLIBSRC = $(LIBSRC)/Xdmcp

DEPXDMCPLIB = $(USRLIBDIR)/libXdmcp.a
XDMCPLIB =  -lXdmcp

LINTXDMCP = $(LINTLIBDIR)/llib-lXdmcp.ln

           XMUSRC = $(LIBSRC)/Xmu

SOXMUREV = 6.2
DEPXMULIB =
XMULIB =  -lXmu

LINTXMU = $(LINTLIBDIR)/llib-lXmu.ln

           XMUUSRC = $(LIBSRC)/Xmuu

SOXMUUREV = 1.0
DEPXMUULIB =
XMUULIB =  -lXmuu

LINTXMUU = $(LINTLIBDIR)/llib-lXmuu.ln

       OLDXLIBSRC = $(LIBSRC)/oldX

DEPOLDXLIB = $(USRLIBDIR)/liboldX.a
OLDXLIB =  -loldX

LINTOLDX = $(LINTLIBDIR)/llib-loldX.ln

         XPLIBSRC = $(LIBSRC)/Xp

SOXPREV = 6.2
DEPXPLIB =
XPLIB =  -lXp

LINTXP = $(LINTLIBDIR)/llib-lXp.ln

       TOOLKITSRC = $(LIBSRC)/Xt

SOXTREV = 6.0
DEPXTOOLONLYLIB =
XTOOLONLYLIB =  -lXt

LINTXTOOLONLY = $(LINTLIBDIR)/llib-lXt.ln

      DEPXTOOLLIB = $(DEPXTOOLONLYLIB) $(DEPSMLIB) $(DEPICELIB)
         XTOOLLIB = $(XTOOLONLYLIB) $(SMLIB) $(ICELIB)
     LINTXTOOLLIB = $(LINTXTOOLONLYLIB)

       XALIBSRC = $(LIBSRC)/Xa

SOXAREV = 1.0
DEPXALIB =
XALIB =  -lXa

LINTXA = $(LINTLIBDIR)/llib-lXa.ln

       AWIDGETSRC = $(LIBSRC)/Xaw

SOXAWREV = 7.0
DEPXAWLIB =
XAWLIB =  -lXaw

LINTXAW = $(LINTLIBDIR)/llib-lXaw.ln

       AWIDGET6SRC = $(LIBSRC)/Xaw6

SOXAW6REV = 6.1
DEPXAW6LIB =
XAW6LIB =  -lXaw

LINTXAW6 = $(LINTLIBDIR)/llib-lXaw.ln

         XILIBSRC = $(LIBSRC)/Xi

SOXINPUTREV = 6.0
DEPXILIB =
XILIB =  -lXi

LINTXI = $(LINTLIBDIR)/llib-lXi.ln

      XTESTLIBSRC = $(LIBSRC)/Xtst

SOXTESTREV = 6.1
DEPXTESTLIB =
XTESTLIB =  -lXtst

LINTXTEST = $(LINTLIBDIR)/llib-lXtst.ln

        PEXLIBSRC = $(LIBSRC)/PEX5

SOPEXREV = 6.0
DEPPEXLIB =
PEXLIB =  -lPEX5

LINTPEX = $(LINTLIBDIR)/llib-lPEX5.ln

        XIELIBSRC = $(LIBSRC)/XIE

SOXIEREV = 6.0
DEPXIELIB =
XIELIB =  -lXIE

LINTXIE = $(LINTLIBDIR)/llib-lXIE.ln

      PHIGSLIBSRC = $(LIBSRC)/PHIGS

DEPPHIGSLIB = $(USRLIBDIR)/libphigs.a
PHIGSLIB =  -lphigs

LINTPHIGS = $(LINTLIBDIR)/llib-lphigs.ln

DEPXBSDLIB = $(USRLIBDIR)/libXbsd.a
XBSDLIB =  -lXbsd

LINTXBSD = $(LINTLIBDIR)/llib-lXbsd.ln

           ICESRC = $(LIBSRC)/ICE

SOICEREV = 6.3
DEPICELIB =
ICELIB =  -lICE

LINTICE = $(LINTLIBDIR)/llib-lICE.ln

            SMSRC = $(LIBSRC)/SM

SOSMREV = 6.0
DEPSMLIB =
SMLIB =  -lSM

LINTSM = $(LINTLIBDIR)/llib-lSM.ln

           XKEYSRC = $(LIBSRC)/Xkey

SOXKEYREV = 6.0
DEPXKEYLIB =
XKEYLIB =  -lXkey

LINTXKEY = $(LINTLIBDIR)/llib-lXkey.ln

         FSLIBSRC = $(LIBSRC)/FS

DEPFSLIB = $(USRLIBDIR)/libFS.a
FSLIB =  -lFS

LINTFS = $(LINTLIBDIR)/llib-lFS.ln

         FONTLIBSRC = $(LIBSRC)/font

SOFONTREV = 1.3
DEPFONTLIB =
FONTLIB = -L$(FREETYPELIBDIR) -L$(FONTLIBSRC)  -lXfont

LINTXFONT = $(LINTLIBDIR)/llib-lXfont.ln
#
SOFONTREV = 1.3
DEPXFONTLIB =
XFONTLIB =  -lXfont

LINTXFONT = $(LINTLIBDIR)/llib-lXfont.ln

     FONTSTUBLIBSRC = $(FONTLIBSRC)/stubs

DEPFONTSTUBLIB = $(USRLIBDIR)/libfntstubs.a
FONTSTUBLIB =  -lfntstubs

LINTFONTSTUB = $(LINTLIBDIR)/llib-lfntstubs.ln
         DEPFONTLIB = $(DEPXFONTLIB) $(DEPFONTSTUBLIB)
            FONTLIB = $(XFONTLIB) $(FONTSTUBLIB)

          XPMLIBSRC = $(LIBSRC)/Xpm

SOXPMREV = 4.11
DEPXPMLIB =
XPMLIB =  -lXpm

LINTXPM = $(LINTLIBDIR)/llib-lXpm.ln

          FREETYPE2LIBSRC = $(LIBSRC)/freetype2

SOFREETYPE2REV = 6.0
DEPFREETYPE2LIB =
FREETYPE2LIB =  -lfreetype

LINTFREETYPE2 = $(LINTLIBDIR)/llib-lfreetype.ln

FREETYPE2DIR = /usr
FREETYPE2LIBDIR = /usr/lib
FREETYPE2INCDIR = /usr/include/freetype2
FREETYPE2INCLUDES = -I$(FREETYPE2INCDIR)
FREETYPE2LIB = -L$(FREETYPE2LIBDIR) -lfreetype
FREETYPE2DEFINES = -DFREETYPE2

          XFTLIBSRC = $(LIBSRC)/Xft

SOXFTREV = 1.0
DEPXFTLIB =
XFTLIB =  -lXft

LINTXFT = $(LINTLIBDIR)/llib-lXft.ln

    XKBFILELIBSRC = $(LIBSRC)/xkbfile

DEPXKBFILELIB = $(USRLIBDIR)/libxkbfile.a
XKBFILELIB =  -lxkbfile

LINTXKBFILE = $(LINTLIBDIR)/llib-lxkbfile.ln

     XKBCOMPCMD = $(BINDIR)/xkbcomp

    XKBUILIBSRC = $(LIBSRC)/xkbui

DEPXKBUILIB = $(USRLIBDIR)/libxkbui.a
XKBUILIB =  -lxkbui

LINTXKBUI = $(LINTLIBDIR)/llib-lxkbui.ln

          DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)

         DEPLIBS1 = $(DEPLIBS)
         DEPLIBS2 = $(DEPLIBS)
         DEPLIBS3 = $(DEPLIBS)
         DEPLIBS4 = $(DEPLIBS)
         DEPLIBS5 = $(DEPLIBS)
         DEPLIBS6 = $(DEPLIBS)
         DEPLIBS7 = $(DEPLIBS)
         DEPLIBS8 = $(DEPLIBS)
         DEPLIBS9 = $(DEPLIBS)
         DEPLIBS10 = $(DEPLIBS)

XMULIBONLY = -lXmu
XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB)

        CONFIGDIR = $(LIBDIR)/config

    USRLIBDIRPATH = $(USRLIBDIR)
        LDPRELIBS = -L$(USRLIBDIR)
       LDPOSTLIBS =
     TOP_INCLUDES = -I$(INCROOT) $(TOP_X_INCLUDES)
  PROJECT_DEFINES =

CXXPROJECT_DEFINES =

# ----------------------------------------------------------------------
# start of Imakefile

# FIG : Facility for Interactive Generation of figures
# Copyright (c) 1985-1988 by Supoj Sutanthavibul
# Parts Copyright (c) 1989-2002 by Brian V. Smith
# Parts Copyright (c) 1991 by Paul King
#
# Any party obtaining a copy of these files is granted, free of charge, a
# full and unrestricted irrevocable, world-wide, paid up, royalty-free,
# nonexclusive right and license to deal in this software and documentation
# files (the "Software"), including without limitation the rights to use,
# copy, modify, merge, publish distribute, sublicense and/or sell copies of
# the Software, and to permit persons who receive copies from any such
# party to do so, with the only requirement being that the above copyright
# and this permission notice remain intact.

# ------------------------------
# IMPORTANT GENERAL NOTE:
# ------------------------------
#
# Anytime the Imakefile is changed, you must do either "xmkmf" or "make Makefile",
# followed by "make clean" before doing a "make" or "make install" of any kind.

# If you want to install xfig in a directory other than the default X11 binary
# directory, uncomment the following "BINDIR" line and change the path
# to the full path of the directory where you want xfig to be installed.
# Also, you may have to uncomment and redefine MKDIRHIER because "make" looks
# for it relative to the BINDIR variable.
#
# Finally, uncomment and change XAPPLOADDIR to the directory where you want the
# app-defaults resource files to go.  You will have to use the environment
# variable XAPPLRESDIR to point to this directory.
# On Sun systems running Openwindows you probably need to set the environment
# variable XUSERFILESEARCHPATH to point to your app-defaults directory, and
# append a "%N" to the path, e.g. /users/me/xfig/app-defaults/%N
#
# Don't set the DESTDIR variable unless you want to install xfig in a totally
# different tree than the "correct" tree that your X system expects. The usual
# purpose of DESTDIR is to test an install process by installing in a benign area.

# BINDIR = /usr/bin/X11
# MKDIRHIER = /bin/sh /usr/bin/X11/mkdirhier
# XAPPLOADDIR = /home/user/xfig

# Redefine the following if your PNG library and/or include file
# are in different places

PNGLIBDIR = $(USRLIBDIR)
PNGINC = -I/usr/local/include

# If don't want JPEG support, comment out the #define USEJPEG line
# Uncomment the #define for USEJPEG if you want to be able to import
# JPEG (Joint Photographic Experts Group) files.

# If you don't have the jpeg library in your system library area (meaning
# that it must be compiled first), comment out the USEINSTALLEDJPEG variable
# (using #), change the JPEGLIBDIR variable to the directory where your
# jpeg library resides and change the JPEGINCDIR to the directory where your
# jpeg header files (include) reside.
# You must have version 5b or newer of the jpeg library.

JPEGLIBDIR = /usr/local/lib
JPEGINC = -I/usr/include/X11

# Uncomment the #define for USEXPM if you want to use the XPM
# (color pixmap) package.
#
# USEXPM will allow import/export of XPM files.
# USEXPM_ICON uses a color xpm icon for xfig itself (USEXPM must be
#	defined if you use USEXPM_ICON)
# You need XPM version 3.4c or newer.  This is available from ftp.x.org
#   in /contrib/libraries.
# Change XPMLIBDIR if necessary to point to the xpm library (libXpm)
# Change XPMINC if necessary to point to the include file for xpm (xpm.h)

# #define USEXPM
# #define USEXPM_ICON

# Uncomment the following definiton if you want to use the small icons
# for the panel buttons.  Use this if you have a 800x600 or smaller screen.

# #define USESMALLICONS

# Uncomment the following definition for XAW3D if you want to use
# the 3d Athena Widget Set (highly recommended!)
# Then be sure to change the XAW3DINC to point to the directory where your
# 3D Athena widget headers are located

# #define XAW3D

# Uncomment the following if you have a wheel mouse.  See docs for description.

# #define WHEELMOUSE

# Change the location of your printcap file if necessary
PRINTCAP = -DPRINTCAP=\"/etc/printcap\"

# Uncomment the following if needed for DECstations running older X11R4
# INCROOT=/usr/include/mit

# If you do not want to use the CompKeyDB but the standard behavior of
# the Compose key, uncomment the next line

# NO_COMPKEYDB = -DNO_COMPKEYDB

# If you have a Compose indicator LED and you would it turned on when you
# are entering multi-key characters (like a-umlaut, c-cedilla, etc)
# uncomment the next line.  You may have to change the value from 2
# to 1, 3, or 4 depending on your workstation model and X libraries.

COMP_LED = -DCOMP_LED=3

# Comment out the next line if you have any problems with the locale.
# If your setlocale() doesn't support the locale, you should
# add -DSETLOCALE to I18N_DEFS.

# If using an input tablet uncomment the following

TABLIB = $(XILIB)
USETAB = -DUSE_TAB

# uncomment the following line if your compiler supports
# inline functions. With the "INLINE" keyword, you should notice that
# the display will be a bit faster in complex figures

# USEINLINE = -DUSE_INLINE

# use (and change) the following if you want the multi-key data base file
# somewhere other than the standard X11 library directory
# be sure to comment out the second copy of XFIGLIBDIR if you use this one
# XFIGLIBDIR = /usr/local/lib/xfig

# use this if you want the multi-key data base file in the standard X11 tree
XFIGLIBDIR = $(LIBDIR)/xfig

# XFIGDOCDIR tells where the html and pdf documentation should go
# XFIGDOCDIR = $(DOCDIR)/xfig
XFIGDOCDIR = /usr/share/doc/xfig

# MANDIR tells where the standard man pages should go (no need to change it
# if you want the man pages installed in the standard place on your system
# MANDIR = $(MANSOURCEPATH)$(MANSUFFIX)

# If your system doesn't have strstr undefine the following definition
# HAVE_NO_NOSTRSTR = -DNOSTRSTR

# If your system doesn't have strcasecmp and/or strncasecmp
# undefine the following two definitions

# HAVE_NO_STRCASECMP = -DHAVE_NO_STRCASECMP
# HAVE_NO_STRNCASECMP = -DHAVE_NO_STRNCASECMP

# If your system has the strerror() function (doesn't have sys_errlist) then
# comment out NEED_STRERROR with an # comment.

# NEED_STRERROR = -DNEED_STRERROR

# If your system doesn't have dirent.h undefine the following definition

# HAVE_NO_DIRENT = -DHAVE_NO_DIRENT

# For the rotated text code:
#   Add one of `-DCACHE_XIMAGES' or `-DCACHE_BITMAPS' to decide what is
#   cached.  If you are concerned about memory usage in your X server (e.g.
#   if you are using an X terminal) then you might want to cache Ximages,
#   which reside on the client-side.  On the other hand it is much slower,
#   so you might want to cache bitmaps (which reside in the X server)
#   instead.
#   Add `-DCACHE_SIZE_LIMIT=xxxx' where xxxx is the cache size in kilobytes.
#   A cache size of zero turns caching off.

CACHE = -DCACHE_BITMAPS -DCACHE_SIZE_LIMIT=300

# For SYSV systems with BSD-style printer command which use lpr instead of
# lp (SGI is one such machine), add -DBSDLPR to the DEFINES variable
#
# If you have VERY large objects (e.g. polylines etc) you may want to
# increase MAXNUMPTS, the maximum number of points that are displayed. The
# default can be found in w_drawprim.h.  This option may be specified by
# adding -DMAXNUMPTS=xxxx to the DEFINES line, where xxxx is the maximum
# number of vertices.

# If you want a compiler other than "cc", define it here

# CC = /opt/SUNWspro/bin/cc

# *****************************************************
# *****************************************************
# You shouldn't have to change anything below this line
# *****************************************************
# *****************************************************

JPEGLIB = -L$(JPEGLIBDIR) -ljpeg

I18N_DEFS = -DI18N -DSETLOCALE
I18N_SRC = w_i18n.c
I18N_OBJ = w_i18n.o

DIR_DEFS=		-DXFIGLIBDIR=\"$(XFIGLIBDIR)\" 			-DXFIGDOCDIR=\"$(XFIGDOCDIR)\" $(PRINTCAP)

# location of Fig object libraries
OBJLIBDIR =		$(XFIGLIBDIR)/Libraries
OBJLIB =		-DOBJLIBDIR=\"$(OBJLIBDIR)\"

STRDEFINES = $(HAVE_NO_NOSTRSTR) 		$(HAVE_NO_STRNCASECMP) 		$(HAVE_NO_STRCASECMP) 		$(NEED_STRERROR)

PNGLIBS = -L$(PNGLIBDIR) -lpng -lz

DUSEJPEG = -DUSE_JPEG
READJPEGS = f_readjpg.c
READJPEGO = f_readjpg.o

DEFINES =             $(STRDEFINES) $(USEINLINE) $(DUSEXPM) $(DUSEXAW3D) 			$(DUSEJPEG) $(I18N_DEFS) 			$(HAVE_NO_DIRENT) $(DUSEWHEELMOUSE)

XFIGSRC =	d_arc.c d_arcbox.c d_box.c d_ellipse.c d_picobj.c 		d_subspline.c d_line.c d_regpoly.c d_spline.c d_text.c 		e_addpt.c e_align.c e_arrow.c e_break.c e_compound.c 		e_convert.c e_copy.c e_delete.c e_deletept.c 		e_edit.c e_flip.c e_glue.c e_joinsplit.c e_measure.c e_move.c 		e_movept.c e_placelib.c e_rotate.c e_scale.c e_tangent.c e_update.c 		f_load.c f_neuclrtab.c f_picobj.c f_read.c f_readold.c 		f_readppm.c f_readpng.c f_readtif.c f_readeps.c 		f_readxbm.c f_readgif.c $(READJPEGS) f_readpcx.c $(READXPMS) 		f_save.c f_util.c f_wrpcx.c f_wrpng.c 		main.c mode.c object.c resources.c 		u_bound.c u_create.c u_drag.c u_draw.c 		u_elastic.c u_error.c u_fonts.c u_free.c u_geom.c 		u_list.c u_markers.c u_pan.c u_print.c u_redraw.c u_scale.c u_search.c 		u_smartsearch.c u_translate.c u_undo.c w_digitize.c w_listwidget.c 		w_browse.c w_capture.c w_srchrepl.c w_help.c w_layers.c w_menuentry.c 		w_canvas.c w_cmdpanel.c w_color.c w_cursor.c w_dir.c w_drawprim.c 		w_export.c w_file.c w_fontbits.c w_fontpanel.c w_grid.c w_icons.c 		w_indpanel.c w_library.c w_modepanel.c w_mousefun.c w_msgpanel.c 		w_print.c w_rottext.c w_rulers.c w_setup.c w_style.c w_util.c w_zoom.c 		$(I18N_SRC) SmeCascade.c SmeBSB.c SimpleMenu.c

XFIGOBJ =	d_arc.o d_arcbox.o d_box.o d_ellipse.o d_picobj.o 		d_subspline.o d_line.o d_regpoly.o d_spline.o d_text.o 		e_addpt.o e_align.o e_arrow.o e_break.o e_compound.o 		e_convert.o e_copy.o e_delete.o e_deletept.o 		e_edit.o e_flip.o e_glue.o e_joinsplit.o e_measure.o e_move.o 		e_movept.o e_placelib.o e_rotate.o e_scale.o e_tangent.o e_update.o 		f_load.o f_neuclrtab.o f_picobj.o f_read.o f_readold.o 		f_readppm.o f_readpng.o f_readtif.o f_readeps.o 		f_readxbm.o f_readgif.o $(READJPEGO) f_readpcx.o $(READXPMO) 		f_save.o f_util.o f_wrpcx.o f_wrpng.o 		main.o mode.o object.o resources.o 		u_bound.o u_create.o u_drag.o u_draw.o 		u_elastic.o u_error.o u_fonts.o u_free.o u_geom.o 		u_list.o u_markers.o u_pan.o u_print.o u_redraw.o u_scale.o u_search.o 		u_smartsearch.o u_translate.o u_undo.o w_digitize.o w_listwidget.o 		w_browse.o w_capture.o w_srchrepl.o w_help.o w_layers.o w_menuentry.o 		w_canvas.o w_cmdpanel.o w_color.o w_cursor.o w_dir.o w_drawprim.o 		w_export.o w_file.o w_fontbits.o w_fontpanel.o w_grid.o w_icons.o 		w_indpanel.o w_library.o w_modepanel.o w_mousefun.o w_msgpanel.o 		w_print.o w_rottext.o w_rulers.o w_setup.o w_style.o w_util.o w_zoom.o 		$(I18N_OBJ) SmeCascade.o SmeBSB.o SimpleMenu.o

# Other dependencies should be handled by "make depend"

MAINDEPFILES =  patchlevel.h version.h

SRCS = $(XFIGSRC)
OBJS = $(XFIGOBJ)

EXTRA_INCLUDES = $(JPEGINC) $(PNGINC) $(XPMINC) $(XAW3DINC)
DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXPMLIB) $(DEPXLIB)

LOCAL_LIBRARIES = 	$(JPEGLIB)
SYS_LIBRARIES= 		$(XPMLIBS) $(PNGLIBS) $(TABLIB) $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XLIB) -lm

xfig: $(DEPLIBJPEG)

# only compile our jpeg if the user doesn't have one installed

PROGRAM = xfig

all:: xfig

 PROGRAM = xfig

all:: xfig

xfig: $(OBJS) $(DEPLIBS)
	$(RM) $@
	$(CCLINK) -o $@ $(LDOPTIONS) $(OBJS) $(LOCAL_LIBRARIES) $(LDLIBS)  $(EXTRA_LOAD_FLAGS)

install:: xfig
	@if [ -d $(DESTDIR)$(BINDIR) ]; then \
	set +x; \
	else \
	if [ -h $(DESTDIR)$(BINDIR) ]; then \
	(set -x; rm -f $(DESTDIR)$(BINDIR)); \
	fi; \
	(set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); \
	fi
	$(INSTALL) $(INSTALLFLAGS) $(INSTPGMFLAGS)  xfig $(DESTDIR)$(BINDIR)/xfig

all:: xfig.$(MANNEWSUFFIX)

xfig.$(MANNEWSUFFIX): xfig.$(MANSRCSUFFIX)
	$(RM) $@
	$(LN) xfig.$(MANSRCSUFFIX) $@

cleandir::
	$(RM) xfig.$(MANNEWSUFFIX)

install.man:: xfig.$(MANNEWSUFFIX)
	@if [ -d $(DESTDIR)$(MANDIR) ]; then \
	set +x; \
	else \
	if [ -h $(DESTDIR)$(MANDIR) ]; then \
	(set -x; rm -f $(DESTDIR)$(MANDIR)); \
	fi; \
	(set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); \
	fi
	$(INSTALL) $(INSTALLFLAGS) $(INSTMANFLAGS) xfig.$(MANNEWSUFFIX) $(DESTDIR)$(MANDIR)/xfig.$(MANSUFFIX)

depend::
	$(DEPEND) $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS)

lint:
	$(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS)
lint1:
	$(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS)

cleandir::
	$(RM) xfig

install:: Fig.ad
	@if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \
	set +x; \
	else \
	if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \
	(set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \
	fi; \
	(set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \
	fi
	$(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) Fig.ad $(DESTDIR)$(XAPPLOADDIR)/Fig

install:: Fig-color.ad
	@if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \
	set +x; \
	else \
	if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \
	(set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \
	fi; \
	(set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \
	fi
	$(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) Fig-color.ad $(DESTDIR)$(XAPPLOADDIR)/Fig-color

# Install the compose key database, object libraries and documentation
# here with "make install"

install::
	@if [ -d $(DESTDIR)$(XFIGLIBDIR) ]; then set +x; 		else (set -x; $(MKDIRHIER) $(DESTDIR)$(XFIGLIBDIR) ; set +x; ); fi

	chmod a+x,u+w $(DESTDIR)$(XFIGLIBDIR)
	$(INSTALL) -m 644 -c CompKeyDB $(DESTDIR)$(XFIGLIBDIR)

# Install program, libraries and documentation with "make install.all"
install.all::
	$(MAKE) install
	$(MAKE) install.libs
	$(MAKE) install.doc

xfig.man: Doc/xfig.man
	$(LN) Doc/xfig.man xfig.man

# Install the documentation here with "make install.doc"
install.doc::
	@echo Installing man pages to $(MANDIR)
	@if [ -d $(DESTDIR)$(XFIGDOCDIR) ]; then set +x; 		else (set -x; $(MKDIRHIER) $(DESTDIR)$(XFIGDOCDIR) ; set +x; ); fi

	@$(MAKE) install.man
	@$(MAKE) install.html

# Install the HTML documentation here with "make install.html"

install.html::
	@$(MAKE) install.jhtml
	@$(MAKE) install.rhtml

install.rhtml::
	@(cd Doc ; 	echo Copying pdf and html files to $(DESTDIR)$(XFIGDOCDIR) ; 	$(INSTALL) -m 644 -c xfig_man.html $(DESTDIR)$(XFIGDOCDIR) ; 	$(INSTALL) -m 644 -c xfig_ref_en.pdf $(DESTDIR)$(XFIGDOCDIR) ; 	$(INSTALL) -m 644 -c xfig-howto.pdf $(DESTDIR)$(XFIGDOCDIR) ; 	if [ -d $(DESTDIR)$(XFIGDOCDIR)/html ]; then set +x; 	   else (set -x; $(MKDIRHIER) $(DESTDIR)$(XFIGDOCDIR)/html ); fi ; 	(cd html ; 	   for f in *.* ; do 	      $(INSTALL) -m 644 -c $$f $(DESTDIR)$(XFIGDOCDIR)/html ; 	   done) ; 	echo "  Copying image files for html" ; 	if [ -d $(DESTDIR)$(XFIGDOCDIR)/html/images ]; then set +x; 	   else (set -x; $(MKDIRHIER) $(DESTDIR)$(XFIGDOCDIR)/html/images ); fi ; 	(cd html/images ; 	   for f in * ; do 	       $(INSTALL) -m 644 -c $$f $(DESTDIR)$(XFIGDOCDIR)/html/images ; 	   done) ; 	) ;

install.jhtml::
	@echo "Copying japanese html files to $(DESTDIR)$(XFIGDOCDIR)"
	@(cd Doc/html/japanese ; 	if [ -d $(DESTDIR)$(XFIGDOCDIR)/html/japanese ]; then set +x; 	   else (set -x; $(MKDIRHIER) $(DESTDIR)$(XFIGDOCDIR)/html/japanese ); fi ; 	for f in * ; do 	      $(INSTALL) -m 644 -c $$f $(DESTDIR)$(XFIGDOCDIR)/html/japanese ; 	done) ;

# Install the object libraries here with "make install.libs"
install.libs::
	@echo "Copying Fig Object Libraries"
	@if [ -d $(DESTDIR)$(OBJLIBDIR) ]; then set +x; 		else (set -x; $(MKDIRHIER) $(DESTDIR)$(OBJLIBDIR) ; set +x; ); fi

	@if [ -d Libraries ]; then 	(cd Libraries ; 	for d in * ;  do 	    (cd $$d ; 	    if [ -d $(DESTDIR)$(OBJLIBDIR)/$$d ]; then set +x; 		else (set -x; $(MKDIRHIER) $(DESTDIR)$(OBJLIBDIR)/$$d ); fi ; 	    echo "  Copying $$d library files to $(DESTDIR)$(OBJLIBDIR)/$$d" ; 	    for f in * ;  do 		if [ -d $$f ]; then ( 		    if [ -d $(DESTDIR)$(OBJLIBDIR)/$$d/$$f ]; then set +x; 			else (set -x; $(MKDIRHIER) $(DESTDIR)$(OBJLIBDIR)/$$d/$$f ); fi ; 			(cd $$f ; 			for dd in * ; do 			    if [ -d $$dd ]; then ( 				if [ -d $(DESTDIR)$(OBJLIBDIR)/$$d/$$f/$$dd ]; then set +x; 				    else (set -x; $(MKDIRHIER) $(DESTDIR)$(OBJLIBDIR)/$$d/$$f/$$dd ); fi ; 				    (cd $$dd ; 				    for l in * ; do 					if [ -d $$l ]; then ( 					    if [ -d $(DESTDIR)$(OBJLIBDIR)/$$d/$$f/$$dd/$$l ]; then set +x; 						else (set -x; $(MKDIRHIER) $(DESTDIR)$(OBJLIBDIR)/$$d/$$f/$$dd/$$l ); fi ; 					    (cd $$l ; 						for m in * ; do 						    $(INSTALL) -m 644 -c $$m $(DESTDIR)$(OBJLIBDIR)/$$d/$$f/$$dd/$$l ; 						done ) ) ; 					else ( $(INSTALL) -m 644 -c $$l $(DESTDIR)$(OBJLIBDIR)/$$d/$$f/$$dd ) ; fi ; 				done) ) ; 			    else ( $(INSTALL) -m 644 -c $$dd $(DESTDIR)$(OBJLIBDIR)/$$d/$$f ) ; fi ; 			done) ); 		else ($(INSTALL) -m 644 -c $$f $(DESTDIR)$(OBJLIBDIR)/$$d ) ; fi ; 	    done ) ; 	done ; ) ; 	else echo No Object Libraries to install ; 	fi;

main.o:	 main.c $(MAINDEPFILES) mode.h w_setup.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)  $(USETAB) $(OBJLIB) $(DUSESMALLICONS) $(DUSEXPMICON)  $*.c

f_read.o:	 f_read.c $(MAINDEPFILES) mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

u_error.o:	 u_error.c $(MAINDEPFILES) mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)    $*.c

resources.o:	 resources.c resources.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)    $*.c

e_edit.o:	 e_edit.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

f_readeps.o:	 f_readeps.c
	$(RM) $@
	 $(CC) -c $(CFLAGS)  $(PCXBUG) -DGSBIT  $*.c

w_capture.o:	 w_capture.c  w_capture.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

w_help.o:	 w_help.c
	$(RM) $@
	 $(CC) -c $(CFLAGS)  $(DIR_DEFS)  $*.c

w_canvas.o:	 w_canvas.c mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)  $(DIR_DEFS) $(COMP_LED) $(NO_COMPKEYDB)  $*.c

w_icons.o:	 w_icons.c w_icons.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)  $(DUSESMALLICONS) $(DUSEXPMICON)  $*.c

w_print.o:	 w_print.c w_print.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)  $(DIR_DEFS)  $*.c

w_setup.o:	 w_setup.c w_setup.h w_icons.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)  $(DUSESMALLICONS)  $*.c

w_rottext.o:	 w_rottext.c
	$(RM) $@
	 $(CC) -c $(CFLAGS)  $(CACHE)  $*.c

d_arc.o:	 d_arc.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

d_arcbox.o:	 d_arcbox.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

d_box.o:	 d_box.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

d_ellipse.o:	 d_ellipse.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

d_line.o:	 d_line.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

d_picobj.o:	 d_picobj.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

d_regpoly.o:	 d_regpoly.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

d_spline.o:	 d_spline.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

d_text.o:	 d_text.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

e_addpt.o:	 e_addpt.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

e_align.o:	 e_align.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

e_arrow.o:	 e_arrow.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

e_break.o:	 e_break.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

e_compound.o:	 e_compound.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

e_convert.o:	 e_convert.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

e_copy.o:	 e_copy.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

e_delete.o:	 e_delete.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

e_deletept.o:	 e_deletept.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

e_flip.o:	 e_flip.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

e_glue.o:	 e_glue.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

e_movept.o:	 e_movept.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

e_placelib.o:	 e_placelib.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

e_rotate.o:	 e_rotate.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

e_scale.o:	 e_scale.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

e_update.o:	 e_update.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

f_load.o:	 f_load.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

f_picobj.o:	 f_picobj.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

f_save.o:	 f_save.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

f_util.o:	 f_util.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

mode.o:	 mode.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

object.o:	 object.c  object.h mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

u_bound.o:	 u_bound.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

u_create.o:	 u_create.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

u_drag.o:	 u_drag.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

u_draw.o:	 u_draw.c  u_draw_spline.c mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

u_geom.o:	 u_geom.c  u_draw_spline.c
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

u_elastic.o:	 u_elastic.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

u_list.o:	 u_list.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

u_markers.o:	 u_markers.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

u_pan.o:	 u_pan.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

u_print.o:	 u_print.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

u_search.o:	 u_search.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

u_undo.o:	 u_undo.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

w_browse.o:	 w_browse.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

w_cmdpanel.o:	 w_cmdpanel.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

w_dir.o:	 w_dir.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

w_drawprim.o:	 w_drawprim.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

w_export.o:	 w_export.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

w_file.o:	 w_file.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

w_grid.o:	 w_grid.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

w_indpanel.o:	 w_indpanel.c  mode.h w_indpanel.h object.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

w_library.o:	 w_library.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

w_menuentry.o:	 w_menuentry.c  w_menuentry.h w_menuentryP.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

w_modepanel.o:	 w_modepanel.c  mode.h w_indpanel.h w_icons.h object.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)  $(DUSESMALLICONS) $*.c

w_msgpanel.o:	 w_msgpanel.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

w_rulers.o:	 w_rulers.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

w_zoom.o:	 w_zoom.c  mode.h
	$(RM) $@
	 $(CC) -c $(CFLAGS)   $*.c

# ----------------------------------------------------------------------
# common rules for all Makefiles - do not edit

.c.i:
	$(RM) $@
	 $(CC) -E $(CFLAGS) $(_NOOP_) $*.c > $@

.SUFFIXES: .s

.c.s:
	$(RM) $@
	 $(CC) -S $(CFLAGS) $(_NOOP_) $*.c

emptyrule::

cleandir::
	$(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut   "#"*

Makefile::
	-@if [ -f Makefile ]; then set -x; \
	$(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
	else exit 0; fi
	$(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)

tags::
	$(TAGS) -w *.[ch]
	$(TAGS) -xw *.[ch] > TAGS

man_keywords::

html_index::

clean:: cleandir

distclean:: cleandir

# ----------------------------------------------------------------------
# empty rules for directories that do not have SUBDIRS - do not edit

install::
	@echo "install in $(CURRENT_DIR) done"

install.man::
	@echo "install.man in $(CURRENT_DIR) done"

install.sdk::
	@echo "install.sdk in $(CURRENT_DIR) done"

Makefiles::

includes::

depend::

distclean::
	$(RM) Makefile

# ----------------------------------------------------------------------
# dependencies generated by makedepend

