# Makefile generated by imake - do not edit!

# ----------------------------------------------------------------------
# Makefile generated from "Imake.tmpl" and </tmp/IIf.2aRUre>
# $Xorg: Imake.tmpl,v 1.4 2000/08/17 19:41:46 cpqbld Exp $
# $XdotOrg: xc/config/cf/Imake.tmpl,v 1.9 2005/01/24 06:37:31 daniels Exp $
#
#
#
#
# $XFree86: xc/config/cf/Imake.tmpl,v 3.155 2003/12/24 18:58:41 dickey Exp $
# ----------------------------------------------------------------------

all::

.SUFFIXES: .i

# $XdotOrg: xc/config/cf/Imake.cf,v 1.7 2005/03/02 11:20:29 gisburn Exp $
# $Xorg: Imake.cf,v 1.4 2000/08/17 19:41:45 cpqbld Exp $

# $XFree86: xc/config/cf/Imake.cf,v 3.88 2003/12/16 21:30:21 herrb Exp $

# -----------------------------------------------------------------------
# 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.24 2000/06/25 20:17:29 dawes Exp $

# $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $

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

# $XdotOrg: xc/config/cf/darwin.cf,v 1.7 2005/03/17 01:12:07 torrey Exp $
# platform:  $XFree86: xc/config/cf/darwin.cf,v 1.50 2004/01/20 23:54:50 torrey Exp $

# operating system:  Darwin (11.4.2)

   PROJ_BUILD = xcodebuild

   XPLIBDIR = /usr/lib
   XPINCDIR = $(SERVERSRC)/hw/darwin/quartz/xpr

# $XFree86: xc/config/cf/darwinLib.rules,v 1.8 2003/10/09 22:43:18 herrb Exp $

# $XdotOrg: xc/config/cf/xorg.cf,v 1.44 2005/01/27 03:50:46 ajax Exp $

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

XORG_VERSION_CURRENT = (((7) * 10000000) + ((6) * 100000) + ((0) * 1000) + 0)
RELEASE_VERSION = RELEASE-1

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)
     XFREE86PDFDOCDIR = $(DOCPDFDIR)
    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.34tsi 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.24 2000/06/25 20:17:29 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:  $XdotOrg: xc/config/cf/Imake.rules,v 1.8 2005/02/01 22:27:00 ajax Exp $
#
#
#
#
# rules:  $XFree86: xc/config/cf/Imake.rules,v 3.128 2003/11/15 03:25:17 dawes Exp $

X_BYTE_ORDER = X_LITTLE_ENDIAN

GLIDE2INCDIR =

GLIDE3INCDIR =

GLIDE3LIBNAME =

TKLIBNAME =

TKLIBDIR =

TCLLIBNAME =

TCLIBDIR =

          PATHSEP = /
            SHELL = /bin/sh

              TOP = .
      CURRENT_DIR = .

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

          INCROOT = /opt/local/include
        USRLIBDIR = /opt/local/lib
           VARDIR = /var
        VARLIBDIR = $(VARDIR)/lib
  SYSTEMUSRLIBDIR = /usr/lib
  SYSTEMUSRINCDIR = /usr/include
         SHLIBDIR = /opt/local/lib
       LINTLIBDIR = $(USRLIBDIR)/lint
          MANPATH = /opt/local/man
    MANSOURCEPATH = $(MANPATH)/man
           MANDIR = $(MANSOURCEPATH)$(MANSUFFIX)
        LIBMANDIR = $(MANSOURCEPATH)$(LIBMANSUFFIX)
       FILEMANDIR = $(MANSOURCEPATH)$(FILEMANSUFFIX)
       MISCMANDIR = $(MANSOURCEPATH)$(MISCMANSUFFIX)
     DRIVERMANDIR = $(MANSOURCEPATH)$(DRIVERMANSUFFIX)
     LOGDIRECTORY = $(VARDIR)/log

               AR = ar clq

# Nice try but useless: make will inherit BOOTSTRAPCFLAGS
# from  top Makefile
  BOOTSTRAPCFLAGS =

               CC = /usr/bin/cc
               AS = as

.SUFFIXES: .cc

              CXX = /usr/bin/c++

          CXXFILT = c++filt

           CXXLIB = -lstdc++

    CXXDEBUGFLAGS = -Os
CXXDEPENDINCLUDES =
 CXXEXTRA_DEFINES =
CXXEXTRA_INCLUDES =
   CXXSTD_DEFINES = -D__x86_64__ -D__DARWIN__                                 -DNO_ALLOCA -DCSRG_BASED  $(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 = /usr/bin/cpp $(STD_CPP_DEFINES)
           RAWCPP = /usr/bin/cpp -undef $(STD_CPP_OPTIONS)
    PREPROCESSCMD = /usr/bin/cc -E $(STD_CPP_DEFINES)

          INSTALL = install
     INSTALLFLAGS = -c

               LD = ld

              LEX = flex -l
               M4 = m4
          M4FLAGS =
           LEXLIB = -ll
             YACC = yacc
           CCYACC = yacc

             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 =
     PERLENVSETUP = env LC_ALL=C
        MANSUFFIX = 1
     LIBMANSUFFIX = 3
    FILEMANSUFFIX = 5
    MISCMANSUFFIX = 7
  DRIVERMANSUFFIX = 4
   ADMINMANSUFFIX = 8
     MANSRCSUFFIX = man
     MANNEWSUFFIX = _man
          MANDEFS = -D__apploaddir__=$(XAPPLOADDIR) -D__appmansuffix__=$(MANSUFFIX) -D__filemansuffix__=$(FILEMANSUFFIX) -D__libmansuffix__=$(LIBMANSUFFIX) -D__miscmansuffix__=$(MISCMANSUFFIX) -D__drivermansuffix__=$(DRIVERMANSUFFIX) -D__adminmansuffix__=$(ADMINMANSUFFIX) -D__projectroot__=$(PROJECTROOT) -D__xconfigfile__=$(XCONFIGFILE) -D__xconfigdir__=$(XCONFIGDIR) -D__xlogfile__=$(XLOGFILE) -D__xservername__=$(XSERVERNAME) $(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 = /usr/bin/cc

           MODCPP = /usr/bin/cpp
        MODCFLAGS = $(CFLAGS)
            MODAS = as
       MODASFLAGS =

            MODLD = ld

       MODLDFLAGS =
MODLDCOMBINEFLAGS = -X -r
            MODAR = ar clq

        MODRANLIB = ranlib

     STD_INCLUDES =
  STD_CPP_OPTIONS = -traditional -D__GNUC__
  STD_CPP_DEFINES = -traditional -D__GNUC__ -traditional -D__GNUC__ -D__x86_64__ -D__DARWIN__                                 -DNO_ALLOCA -DCSRG_BASED  $(PROJECT_DEFINES)
      STD_DEFINES = -D__x86_64__ -D__DARWIN__                                 -DNO_ALLOCA -DCSRG_BASED  $(PROJECT_DEFINES)
 EXTRA_LOAD_FLAGS =
  EXTRA_LDOPTIONS =
  EXTRA_LIBRARIES =
             TAGS = ctags

   PARALLELMFLAGS =

    SHAREDCODEDEF =
         SHLIBDEF =

     SHLIBLDFLAGS = -dynamiclib $(SHLIBGLOBALSFLAGS)

         NOSTDLIB = -nostdlib
     POSTNOSTDLIB = -Wl,-Bstatic -lgcc -Wl,-Bdynamic

         PICFLAGS = -dynamic

      CXXPICFLAGS = -dynamic

    PROTO_DEFINES =

     INSTPGMFLAGS =

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

      PROJECTROOT = /opt/local

      CDEBUGFLAGS = -Os
        CCOPTIONS = -Wall -Wpointer-arith -no-cpp-precomp

      ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(INSTALLED_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) $(INSTALLED_LIBS)
        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 = -X -r
      DEPENDFLAGS =
   DEPEND_DEFINES =

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

        MACROFILE = darwin.cf
           RM_CMD = $(RM)

    IMAKE_DEFINES =
   IMAKE_WARNINGS = -Wundef

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

     ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/X11.tmpl 			$(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) 			$(IRULESRC)/xfree86.cf $(IRULESRC)/xf86.rules $(IRULESRC)/xorgsite.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.6 2001/01/17 16:22:31 dawes Exp $

# ----------------------------------------------------------------------
# X Window System Build Parameters and Rules
# $XdotOrg: xc/config/cf/X11.tmpl,v 1.52 2005/09/22 23:54:18 alanc Exp $
# $Xorg: X11.tmpl,v 1.6 2000/08/17 19:41:46 cpqbld Exp $
#
#
#
#
# $XFree86: xc/config/cf/X11.tmpl,v 1.248 2004/02/16 04:07:37 dawes Exp $

XORGRELSTRING = `echo 7 6 0 | sed -e 's/ /./g' -e 's/^/Version\\\ /'`
  XORGMANNAME = X Version 11

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 = /opt/local/bin
     BUILDINCROOT = $(TOP)/exports
      BUILDINCDIR = $(BUILDINCROOT)/include
      BUILDINCTOP = ../..
      BUILDLIBDIR = $(TOP)/exports/lib
      BUILDLIBTOP = ../..
      BUILDBINDIR = $(TOP)/exports/bin
      BUILDBINTOP = ../..
   BUILDMODULEDIR = $(BUILDLIBDIR)/modules
     BUILDI18NDIR = $(BUILDLIBDIR)/locale
   BUILDMODULETOP = $(BUILDLIBTOP)/..
    XBUILDINCROOT = $(XTOP)/exports
     XBUILDINCDIR = $(XBUILDINCROOT)/include/X11
     XBUILDINCTOP = ../../..
     XBUILDBINDIR = $(XBUILDINCROOT)/bin
           INCDIR = $(INCROOT)
           ADMDIR = /usr/adm
           LIBDIR = /opt/local/lib/X11
         SHAREDIR = /opt/local/share/X11
       LIBEXECDIR = /opt/local/libexec
        MODULEDIR = $(USRLIBDIR)/modules
   TOP_X_INCLUDES =
          XBINDIR = $(PROJECTROOT)/bin

       INSTSRCDIR = /opt/local/src

        ETCX11DIR = /etc/X11

          CONFDIR = $(ETCX11DIR)

           DOCDIR = $(LIBDIR)/doc
       DOCHTMLDIR = $(DOCDIR)/html
         DOCPSDIR = $(DOCDIR)/PostScript
        DOCPDFDIR = $(DOCDIR)/PDF
          FONTDIR = ${datarootdir}/fonts/X11
      FONTROOTDIR = ${datarootdir}/fonts/X11
     ENCODINGSDIR = ${FONTROOTDIR}/encodings
         XINITDIR = $(LIBDIR)/xinit
           XDMDIR = $(LIBDIR)/xdm
        XDMVARDIR = $(VARLIBDIR)/xdm
           TWMDIR = $(LIBDIR)/twm
           XSMDIR = $(LIBDIR)/xsm
           NLSDIR = $(LIBDIR)/nls
       XLOCALEDIR = $(LIBDIR)/locale
      LBXPROXYDIR = $(LIBDIR)/lbxproxy
  PROXYMANAGERDIR = $(LIBDIR)/proxymngr
        XPRINTDIR = $(LIBDIR)/xserver
      XAPPLOADDIR = /opt/local/share/X11/app-defaults
       FONTCFLAGS = -t

     INSTAPPFLAGS = $(INSTDATFLAGS)

              RGB = $(XBINDIR)/rgb
            FONTC = $(XBINDIR)/bdftopcf
      MKFONTSCALE = $(XBINDIR)/mkfontscale
        MKFONTDIR = $(XBINDIR)/mkfontdir
      MKHTMLINDEX = $(XBINDIR)/mkhtmlindex
          UCS2ANY = $(XBINDIR)/ucs2any
      BDFTRUNCATE = $(XBINDIR)/bdftruncate
     UCSMAPPREFIX = $(FONTDIR)/util/map-
       XCURSORGEN = $(XBINDIR)/xcursorgen

     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 = FreeTypeSrcDir
        DRMSRCDIR = $(TOP)/extras/drm
       MESASRCDIR = $(TOP)/extras/Mesa
  OGLSAMPLESRCDIR = $(TOP)/extras/ogl-sample
        PSWRAPSRC = $(XTOP)/config/pswrap
     TRANSCOMMSRC = $(LIBSRC)/xtrans
   TRANS_INCLUDES = -I$(TRANSCOMMSRC)
 CONNECTION_FLAGS = -DTCPCONN -DUNIXCONN  $(STICKY_DEFINES) $(FCHOWN_DEFINES) -DIPv6
XTRANS_FAILDEFINES =

    VENDORMANNAME = X.Org
 VENDORMANVERSION = `echo 7 6 0 | sed -e 's/ /./g' -e 's/^/Version\\\ /'`
      XORGMANDEFS = -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\""
    VENDORMANDEFS = -D__vendorversion__="$(VENDORMANVERSION) $(VENDORMANNAME)"
       VENDORNAME = The X.Org Foundation
  VENDORNAMESHORT = X.Org

 VENDORWEBSUPPORT = http://wiki.X.Org

VENDORSUPPORTDEFS = -D__VENDORDWEBSUPPORT__='"$(VENDORWEBSUPPORT)"'

      XKBDEFRULES = xorg
  XKBDEFRULESDEFS = -D__XKBDEFRULES__='"$(XKBDEFRULES)"'

     XCONFIGFILE = xorg.conf
      XCONFIGDIR = $(LIBDIR)
        XLOGFILE = Xorg
     XSERVERNAME = Xorg

       XENVLIBDIR = $(USRLIBDIR)
   CLIENTENVSETUP = DYLD_LIBRARY_PATH=$(XENVLIBDIR) XLOCALEDIR=$(BUILDLIBDIR)/locale

# $XFree86: xc/config/cf/darwinLib.tmpl,v 1.19 2003/11/04 00:24:36 torrey Exp $

          XLIBSRC = $(LIBSRC)/X11

SOXLIBREV = 6.2
DEPXONLYLIB =
XONLYLIB =  -lX11

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

      DEPXLIBONLY = $(DEPXONLYLIB)
         XLIBONLY = $(XONLYLIB)
     LINTXONLYLIB = $(LINTXONLY)

      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

SOXSSREV = 1.0
DEPXSSLIB =
XSSLIB =  -lXss

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

    XXF86MISCLIBSRC = $(LIBSRC)/Xxf86misc

SOXXF86MISCREV = 1.1
DEPXXF86MISCLIB =
XXF86MISCLIB =  -lXxf86misc

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

    XXF86VMLIBSRC = $(LIBSRC)/Xxf86vm

SOXXF86VMREV = 1.0
DEPXXF86VMLIB =
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

SOXVREV = 1.0
DEPXVLIB =
XVLIB =  -lXv

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

    XVMCLIBSRC = $(LIBSRC)/XvMC

SOXVMCREV = 1.0
DEPXVMCLIB =
XVMCLIB =  -lXvMC

LINTXVMC = $(LINTLIBDIR)/llib-lXvMC.ln

    XINERAMALIBSRC = $(LIBSRC)/Xinerama

SOXINERAMAREV = 1.0
DEPXINERAMALIB =
XINERAMALIB =  -lXinerama

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

    XRESLIBSRC = $(LIBSRC)/XRes

SOXRESREV = 1.0
DEPXRESLIB =
XRESLIB =  -lXRes

LINTXRES = $(LINTLIBDIR)/llib-lXRes.ln

    DMXLIBSRC = $(LIBSRC)/dmx

DEPDMXLIB = $(USRLIBDIR)/libdmx.a
DMXLIB =  -ldmx

LINTDMX = $(LINTLIBDIR)/llib-ldmx.ln

    DPSLIBSRC = $(LIBSRC)/dps

DEPDPSLIB = $(USRLIBDIR)/libdps.a
DPSLIB =  -ldps

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

    DPSTKLIBSRC = $(LIBSRC)/dpstk

DEPDPSTKLIB = $(USRLIBDIR)/libdpstk.a
DPSTKLIB =  -ldpstk

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

    PSRESLIBSRC = $(LIBSRC)/psres

DEPPSRESLIB = $(USRLIBDIR)/libpsres.a
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.2.2
DEPXRENDERLIB =
XRENDERLIB =  -lXrender

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

    XRANDRLIBSRC = $(LIBSRC)/Xrandr

SOXRANDRREV = 2.0
DEPXRANDRLIB =
XRANDRLIB =  -lXrandr

LINTXRANDR = $(LINTLIBDIR)/llib-lXrandr.ln

    XFIXESLIBSRC = $(LIBSRC)/Xfixes

SOXFIXESREV = 3.0
DEPXFIXESLIB =
XFIXESLIB =  -lXfixes

LINTXFIXES = $(LINTLIBDIR)/llib-lXfixes.ln

   XDAMAGELIBSRC = $(LIBSRC)/Xdamage

SOXDAMAGEREV = 1.0
DEPXDAMAGELIB =
XDAMAGELIB =  -lXdamage

LINTXDAMAGE = $(LINTLIBDIR)/llib-lXdamage.ln

XCOMPOSITELIBSRC = $(LIBSRC)/Xcomposite

SOXCOMPOSITEREV = 1.0
DEPXCOMPOSITELIB =
XCOMPOSITELIB =  -lXcomposite

LINTXCOMPOSITE = $(LINTLIBDIR)/llib-lXcomposite.ln

XEVIELIBSRC = $(LIBSRC)/Xevie

SOXEVIEREV = 1.0
DEPXEVIELIB =
XEVIELIB =  -lXevie

LINTXEVIE = $(LINTLIBDIR)/llib-lXevie.ln

   XCURSORLIBSRC = $(LIBSRC)/Xcursor

SOXCURSORREV = 1.0.2
DEPXCURSORLIB =
XCURSORLIB =  -lXcursor

LINTXCURSOR = $(LINTLIBDIR)/llib-lXcursor.ln

   APPLEWMLIBSRC = $(LIBSRC)/apple

SOAPPLEWMREV = 1.0
DEPAPPLEWMLIB =
APPLEWMLIB =  -lAppleWM

LINTAPPLEWM = $(LINTLIBDIR)/llib-lAppleWM.ln

   WINDOWSWMLIBSRC = $(LIBSRC)/windows

DEPWINDOWSWMLIB = $(USRLIBDIR)/libWindowsWM.a
WINDOWSWMLIB =  -lWindowsWM

LINTWINDOWSWM = $(LINTLIBDIR)/llib-lWindowsWM.ln

    XFONTCACHELIBSRC = $(LIBSRC)/Xfontcache

SOXFONTCACHEREV = 1.2
DEPXFONTCACHELIB =
XFONTCACHELIB =  -lXfontcache

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

         XAUTHSRC = $(LIBSRC)/Xau

SOXAUTHREV = 6.0
DEPXAUTHLIB =
XAUTHLIB =  -lXau

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

      XDMCPLIBSRC = $(LIBSRC)/Xdmcp

SOXDMCPREV = 6.0
DEPXDMCPLIB =
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

SOOLDXREV = 6.0
DEPOLDXLIB =
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 = 8.0
DEPXAWLIB =
XAWLIB =  -lXaw

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

       AWIDGET7SRC = $(LIBSRC)/Xaw7

SOXAW7REV = 7.0
DEPXAW7LIB =
XAW7LIB =  -lXaw

LINTXAW7 = $(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

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

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

           ICESRC = $(LIBSRC)/ICE

SOICEREV = 6.4
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

SOFSREV = 6.0
DEPFSLIB =
FSLIB =  -lFS

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

         FONTLIBSRC = $(LIBSRC)/font

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

LINTXFONT = $(LINTLIBDIR)/llib-lXfont.ln
#
SOFONTREV = 1.5
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) $(FREETYPE2LIB)

         FONTENCLIBSRC = $(LIBSRC)/fontenc

SOFONTENCREV = 1.0
DEPXFONTENCLIB =
XFONTENCLIB =  -lfontenc

LINTXFONTENC = $(LINTLIBDIR)/llib-lfontenc.ln

          XPMLIBSRC = $(LIBSRC)/Xpm

SOXPMREV = 4.11
DEPXPMLIB =
XPMLIB =  -lXpm

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

          FREETYPE2LIBSRC = $(LIBSRC)/freetype2

SOFREETYPE2REV = 6.3.8
DEPFREETYPE2LIB =
FREETYPE2LIB = -lfreetype

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

FREETYPE2INCDIR=$(INCDIR)

FREETYPE2INCLUDES = -I$(FREETYPE2INCDIR) -I$(FREETYPE2INCDIR)/freetype2 -I$(FREETYPE2INCDIR)/freetype2/config

FREETYPE2DEFINES = -DFREETYPE2

          EXPATLIBSRC = $(LIBSRC)/expat

SOEXPATREV = 0.4
DEPEXPATLIB =
EXPATLIB =  -lexpat

LINTEXPAT = $(LINTLIBDIR)/llib-lexpat.ln

EXPATINCLUDES=$(TOP_X_INCLUDES)
EXPATDEFINES = -DEXPAT

          XFT1LIBSRC = $(LIBSRC)/Xft1

SOXFT1REV = 1.1
DEPXFT1LIB =
XFT1LIB =  -lXft

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

          XFTLIBSRC = $(LIBSRC)/Xft

SOXFTREV = 2.1.2
DEPXFTLIB =
XFTLIB =  -lXft

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

          FONTCONFIGLIBSRC = $(LIBSRC)/fontconfig

SOFONTCONFIGREV = 1.0.4
DEPFONTCONFIGLIB =
FONTCONFIGLIB =  -lfontconfig

LINTFONTCONFIG = $(LINTLIBDIR)/llib-lfontconfig.ln

FONTCONFIGINCDIR=$(INCDIR)

FONTCONFIGINCLUDES = -I$(FONTCONFIGINCDIR)

FCCACHE = $(BINDIR)/fc-cache

FONTCONFIGDEFINES = -DFONTCONFIG

XFTINCLUDES=$(FONTCONFIGINCLUDES) $(FREETYPE2INCLUDES)

LIBPNGINCDIR = /usr/include

LIBPNGINC=

LIBPNGDIR = /usr
LIBPNGLIBDIR = /usr/lib
LIBPNGINCDIR = /usr/include

LIBPNGLIB = -lpng

    XKBFILELIBSRC = $(LIBSRC)/xkbfile

SOXKBFILEREV =  1.0
DEPXKBFILELIB =
XKBFILELIB =  -lxkbfile

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

     XKBCOMPCMD = $(XBINDIR)/xkbcomp

    XKBUILIBSRC = $(LIBSRC)/xkbui

SOXKBUIREV =  1.0
DEPXKBUILIB =
XKBUILIB =  -lxkbui

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

EXTRAXAWREQS =

EXTRAXAWCLIENTDEPLIBS =

EXTRAXAWCLIENTLIBS =

        XTRAPLIBSRC = $(LIBSRC)/XTrap

SOXTRAPREV = 6.4
DEPXTRAPLIB =
XTRAPLIB =  -lXTrap

LINTXTRAP = $(LINTLIBDIR)/llib-lXTrap.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)

      FT2PRELOADPATTERN = libfreetype.so.?

       FCPRELOADPATTERN = libfontconfig.so.?

      XFTPRELOADPATTERN = libXft.so.?
  XRENDERPRELOADPATTERN = libXrender.so.?
    XFONTPRELOADPATTERN = libXfont*.so.?

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

        CONFIGDIR = /opt/local/lib/X11/config

    USRLIBDIRPATH = $(USRLIBDIR)
        LDPRELIBS =  -L$(USRLIBDIR)  $(INSTALLED_LIBS)
       LDPOSTLIBS =
     TOP_INCLUDES = -I$(INCROOT) $(TOP_X_INCLUDES)
  PROJECT_DEFINES =
   VENDOR_DEFINES = -DXVENDORNAME='"$(VENDORNAME)"' -DXVENDORNAMESHORT='"$(VENDORNAMESHORT)"'

CXXPROJECT_DEFINES =

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

# ##########################################################################
#                               RasMol 2.7.5                              #
#                                                                         #
#                                  RasMol                                 #
#                  Molecular Graphics Visualisation Tool                  #
#                               13 June 2009                              #
#                                                                         #
#                   Based on RasMol 2.6 by Roger Sayle                    #
# Biomolecular Structures Group, Glaxo Wellcome Research & Development,   #
#                      Stevenage, Hertfordshire, UK                       #
#         Version 2.6, August 1995, Version 2.6.4, December 1998          #
#                   Copyright (C) Roger Sayle 1992-1999                   #
#                                                                         #
#                          and Based on Mods by                           #
# Author             Version, Date             Copyright                   #
# Arne Mueller       RasMol 2.6x1   May 98     (C) Arne Mueller 1998       #
# Gary Grossman and  RasMol 2.5-ucb Nov 95     (C) UC Regents/ModularCHEM  #
# Marco Molinaro     RasMol 2.6-ucb Nov 96         Consortium 1995, 1996   #
#                                                                         #
# Philippe Valadon   RasTop 1.3     Aug 00     (C) Philippe Valadon 2000   #
#                                                                         #
# Herbert J.         RasMol 2.7.0   Mar 99     (C) Herbert J. Bernstein    #
# Bernstein          RasMol 2.7.1   Jun 99         1998-2008               #
#                   RasMol 2.7.1.1 Jan 01                                 #
#                   RasMol 2.7.2   Aug 00                                 #
#                   RasMol 2.7.2.1 Apr 01                                 #
#                   RasMol 2.7.2.1.1 Jan 04                               #
#                   RasMol 2.7.3   Feb 05                                 #
#                   RasMol 2.7.3.1 Apr 06                                 #
#                   RasMol 2.7.4   Nov 07                                 #
#                   RasMol 2.7.4.1 Jan 08                                 #
#                   RasMol 2.7.5   May 09                                 #
#                                                                         #
# RasMol 2.7.5 incorporates changes by T. Ikonen, G. McQuillan, N. Darakev#
# and L. Andrews (via the neartree package).  Work on RasMol 2.7.5        #
# supported in part by grant 1R15GM078077-01 from the National Institute  #
# of General Medical Sciences (NIGMS), U.S. National Institutes of Health #
# and by grant ER63601-1021466-0009501 from the Office of Biological &    #
# Environmental Research (BER), Office of Science, U. S. Department of    #
# Energy.  RasMol 2.7.4 incorporated  changes by G. Todorov, Nan Jia,     #
# N. Darakev, P. Kamburov, G. McQuillan, and J. Jemilawon. Work on RasMol #
# 2.7.4 supported in part by grant 1R15GM078077-01 from the NIGMS/NIH and #
# grant ER63601-1021466-0009501 from BER/DOE.  RasMol 2.7.3 incorporates  #
# changes by Clarice Chigbo, Ricky Chachra, and Mamoru Yamanishi.  Work   #
# on RasMol 2.7.3 supported in part by grants DBI-0203064, DBI-0315281    #
# and EF-0312612 from the U.S. National Science Foundation and grant      #
# DE-FG02-03ER63601 from BER/DOE. The content is solely the responsibility#
# of the authors and does not necessarily represent the official views of #
# the funding organizations.                                              #
#                                                                         #
# The code for use of RasMol under GTK in RasMol 2.7.4.2 and 2.7.5 was    #
# written by Teemu Ikonen.                                                #
#                                                                         #
#                    and Incorporating Translations by                    #
#  Author                               Item                     Language #
#  Isabel Servan Martinez,                                                #
#  Jose Miguel Fernandez Fernandez      2.6   Manual             Spanish  #
#  Jose Miguel Fernandez Fernandez      2.7.1 Manual             Spanish  #
#  Fernando Gabriel Ranea               2.7.1 menus and messages Spanish  #
#  Jean-Pierre Demailly                 2.7.1 menus and messages French   #
#  Giuseppe Martini, Giovanni Paolella, 2.7.1 menus and messages          #
#  A. Davassi, M. Masullo, C. Liotto    2.7.1 help file          Italian  #
#  G. Pozhvanov                         2.7.3 menus and messages Russian  #
#  G. Todorov                           2.7.3 menus and messages Bulgarian#
#  Nan Jia, G. Todorov                  2.7.3 menus and messages Chinese  #
#  Mamoru Yamanishi, Katajima Hajime    2.7.3 menus and messages Japanese #
#                                                                         #
#                             This Release by                             #
# Herbert J. Bernstein, Bernstein + Sons, 5 Brewster Ln, Bellport, NY, USA#
#                       yaya@bernstein-plus-sons.com                      #
#               Copyright(C) Herbert J. Bernstein 1998-2008               #
#                                                                         #
#                READ THE FILE NOTICE FOR RASMOL LICENSES                 #
# Please read the file NOTICE for important notices which apply to this    #
# package and for license terms (GPL or RASLIC).                           #
# ##########################################################################
#
# Imakefile
# RasMol2 Molecular Graphics
# Roger Sayle, June 1994
# Version 2.6.4
# Roger Sayle, December 1998
#
# Version 2.6.9
# Herbert J. Bernstein, March 1999
# yaya@bernstein-plus-sons.com

# Version 2.7.2.1+
# Herbert J. Bernstein, April 2002
# yaya@Bernstein-plus-sons.com

# Version 2.7.3
# Herbert J. Bernstein, February 2005
# yaya@Bernstein-plus-sons.com

# USER DEFINITIONS
#
#  At this point, you may define the cpp macro 8 as 8, 16 or 32

  DEPTHDEF = -DEIGHTBIT

  LOCALEDEF =

PKGDIR = $(HOME)

GUISRC = x11win.c
GUIOBJ = x11win.o
GUIDEF = -DX11WIN

# External Packages Directory
#
EXTPKGDIR = ../external_packages

# Definitions for XFORMSLIB
#
XFORMSLIB_LDLIB =
XFORMSLIB_OBJDEP =

GUIOPTION = -DXFORMSLIB

XFORMSLIB_VERSION = 1.0.91
XFORMSLIB_TARBALL = xforms-$(XFORMSLIB_VERSION).tar.gz
XFORMSLIB_TARBALLDIR = $(EXTPKGDIR)
XFORMSLIB_TARBALL_URL = http://download.savannah.gnu.org/releases-noredirect/xforms/$(XFORMSLIB_TARBALL)
XFORMSLIB_DIR = $(XFORMSLIB_TARBALLDIR)/xforms-$(XFORMSLIB_VERSION)
XFORMSLIB_INCLUDE_DIR = $(XFORMSLIB_DIR)/lib/include
XFORMSLIB_LDLIB = $(XFORMSLIB_DIR)/lib/.libs/libforms.a
XFORMSLIB_OBJDEP = $(XFORMSLIB_DIR)/lib/.libs/libforms.a

# Definitions for LIBXI
#
LIBXI_LDLIB =
LIBXI_OBJDEP =
LIBXI_DIR =

LIBXI_VERSION = 1.5.0
LIBXI_TARBALL = libXi-$(LIBXI_VERSION).tar.gz
LIBXI_TARBALLDIR = $(EXTPKGDIR)
LIBXI_TARBALL_URL = http://ftp.x.org/pub/individual/lib/$(LIBXI_TARBALL)
LIBXI_DIR = $(LIBXI_TARBALLDIR)/libXi-$(LIBXI_VERSION)
LIBXI_INCLUDE_DIR = $(LIBXI_DIR)/include/X11/extensions
LIBXI_LDLIB = $(LIBXI_DIR)/src/.libs/libXi.a
LIBXI_OBJDEP = $(LIBXI_DIR)/src/.libs/libXi.a

# Definitions for LIBXEXT
#
LIBXEXT_LDLIB =
LIBXEXT_OBJDEP =
LIBXEXT_DIR =

ifeq ($(strip $(LIBXEXT_DIR)),)

LIBXEXT_DIR = /usr/X11/lib

endif
LIBXEXT_INCLUDE_DIR = $(LIBXEXT_DIR)/../include/X11/extensions
LIBXEXT_LDLIB = -L$(LIBXEXT_DIR) -lXi

# Definitions for CBFLIB
#

CBFLIB_VERSION = 0.9.2.4
CBFLIB_TARBALL = CBFlib-$(CBFLIB_VERSION).tar.gz
CBFLIB_TARBALLDIR = $(EXTPKGDIR)
CBFLIB_TARBALL_URL = http://downloads.sf.net/cbflib/$(CBFLIB_TARBALL)
CBFLIB_DIR = $(CBFLIB_TARBALLDIR)/CBFlib-$(CBFLIB_VERSION)
CBFLIB_INCLUDE_DIR = $(CBFLIB_DIR)/include
CBFLIB_LDLIB = $(CBFLIB_DIR)/lib/libcbf.a
CBFLIB_OBJDEP = $(CBFLIB_DIR)/lib/libcbf.a

# Definitions for CQRLIB
#

CQRLIB_VERSION = 1.1.2
CQRLIB_TARBALL = CQRlib-$(CQRLIB_VERSION).tar.gz
CQRLIB_TARBALLDIR = $(EXTPKGDIR)
CQRLIB_TARBALL_URL = http://downloads.sf.net/cqrlib/$(CQRLIB_TARBALL)
CQRLIB_DIR = $(CQRLIB_TARBALLDIR)/CQRlib-$(CQRLIB_VERSION)
CQRLIB_INCLUDE_DIR = $(CQRLIB_DIR)
CQRLIB_LDLIB = $(CQRLIB_DIR)/cqrlib.o
CQRLIB_SRC = $(CQRLIB_DIR)/cqrlib.c
CQRLIB_OBJDEP = $(CQRLIB_DIR)/cqrlib.o

# Definitions for CVector
#

CVECTOR_VERSION = 1.0.3
CVECTOR_TARBALL = CVector-$(CVECTOR_VERSION).tar.gz
CVECTOR_TARBALLDIR = $(EXTPKGDIR)
CVECTOR_TARBALL_URL = http://downloads.sf.net/cvector/$(CVECTOR_TARBALL)
CVECTOR_DIR = $(CVECTOR_TARBALLDIR)/CVector-$(CVECTOR_VERSION)
CVECTOR_INCLUDE_DIR = $(CVECTOR_DIR)
CVECTOR_LDLIB = $(CVECTOR_DIR)/CVector.o
CVECTOR_SRC = $(CVECTOR_DIR)/CVector.c
CVECTOR_OBJDEP = $(CVECTOR_DIR)/CVector.o

# Definitions for NEARTREE
#

NEARTREE_VERSION = 3.1.1
NEARTREE_TARBALL = NearTree-$(NEARTREE_VERSION).tar.gz
NEARTREE_TARBALLDIR = $(EXTPKGDIR)
NEARTREE_TARBALL_URL = http://downloads.sf.net/neartree/$(NEARTREE_TARBALL)
NEARTREE_DIR = $(NEARTREE_TARBALLDIR)/NearTree-$(NEARTREE_VERSION)
NEARTREE_INCLUDE_DIR = $(NEARTREE_DIR)
NEARTREE_LDLIB = $(NEARTREE_DIR)/CNearTree.o
NEARTREE_SRC = -DCNEARTREE_FORCEFLIP $(NEARTREE_DIR)/CNearTree.c
NEARTREE_OBJDEP = $(NEARTREE_DIR)/CNearTree.o

# RasMol's on-line help direcory
#   e.g. /usr/local/lib/rasmol/rasmol.hlp
RASMOLDIR = $(USRLIBDIR)/rasmol/

DEFINES = $(GTKCFLAGS) $(GUIDEF) -DRASMOLDIR=\"$(RASMOLDIR)\" $(DEPTHDEF) $(LOCALEDEF) 	-D_USE_RASMOL_H_ $(GUIOPTION) -I$(CBFLIB_INCLUDE_DIR) 	-I$(CQRLIB_INCLUDE_DIR) 	-I$(CVECTOR_INCLUDE_DIR) 	-I$(NEARTREE_INCLUDE_DIR)   	-I$(XFORMSLIB_INCLUDE_DIR) -I$(LIBXI_INCLUDE_DIR) -I$(LIBXEXT_INCLUDE_DIR)

SRCS = rasmol.c rasmol.h molecule.c molecule.h abstree.c abstree.h        cmndline.c cmndline.h command.c command.h tokens.h transfor.c        transfor.h render.c render.h graphics.h pixutils.c        pixutils.h font.h outfile.c outfile.h script.c script.h infile.c        infile.h repres.c repres.h tokens.c cif_fract.c cif_fract.h cif.c        cif.h cif_ctonum.c cif_ctonum.h cif_stx.c        multiple.h multiple.c vector.h vector.c        wbrotate.c wbrotate.c langsel.h langsel_unix.c maps.h maps.c $(GUISRC)        $(CQRLIB_SRC) $(CVECTOR_SRC) $(NEARTREE_SRC)

OBJS = rasmol.o molecule.o abstree.o cmndline.o command.o transfor.o        render.o repres.o  pixutils.o outfile.o script.o        infile.o tokens.o  cif_fract.o cif.o cif_ctonum.o cif_stx.o        multiple.o vector.o wbrotate.o langsel_unix.o maps.o $(GUIOBJ)

# Previous Risc/Os definition
# LDLIBS = -lm -lXinput $(XLIB)

# Additional RS6000 AIX MITSHM Library
# LDLIBS = -lm -lXi -lXextSam $(XLIB)

LDLIBS = -lm $(XLIB) $(EXTRA_LIBRARIES)             $(GTKLIBS) 			$(CBFLIB_LDLIB) 			$(CQRLIB_LDLIB) 			$(CVECTOR_LDLIB) 			$(NEARTREE_LDLIB)             $(XFORMSLIB_LDLIB) $(LIBXI_LDLIB) $(LIBXEXT_LDLIB)

#
# Architecture Specific Rules
#
#    If running under HPUX, define the appropriate variant
#    with #define
#

        PROGRAM = rasmol

all:: rasmol

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

install:: rasmol
	@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)  rasmol $(DESTDIR)$(BINDIR)/rasmol

all:: rasmol.$(MANNEWSUFFIX)

rasmol.$(MANNEWSUFFIX): rasmol.$(MANSRCSUFFIX)
	$(RM) $@
	if test -z "$(PREPROCESSMANPAGES)" ; then \
	   cd `dirname rasmol` && \
	   $(LN) `basename rasmol.$(MANSRCSUFFIX)` `basename $@`; \
	else \
	      	     $(RAWCPP)  $(MANDEFS) $(EXTRAMANDEFS) \
	     < rasmol.$(MANSRCSUFFIX) | sed -e '/^#  *[0-9][0-9]*  *.*$$/d' 			-e '/^#line  *[0-9][0-9]*  *.*$$/d' 			-e '/^[ 	]*XCOMM$$/s/XCOMM/#/' 			-e '/^[ 	]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/#/' 			-e '/^[ 	]*XHASH/s/XHASH/#/' 			-e '/\@\@$$/s/\@\@$$/\\/' >$@; \
	fi

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

install.man:: rasmol.$(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) rasmol.$(MANNEWSUFFIX) $(DESTDIR)$(MANDIR)/rasmol.$(MANSUFFIX)

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

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

cleandir::
	$(RM) rasmol

install::
	@for flag in ${MAKEFLAGS} ""; do \
	  case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \
	for i in $(RASMOLDIR); do if [ -d $(DESTDIR)$$i ]; then \
		set +x; else (set -x; $(MKDIRHIER) $(DESTDIR)$$i); fi; \
	done

install:: ../doc/rasmol.hlp
	$(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) ../doc/rasmol.hlp $(DESTDIR)$(RASMOLDIR)

install:: ../data/1crn.pdb
	$(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) ../data/1crn.pdb $(DESTDIR)$(RASMOLDIR)

install:: ../data/3cro.pdb
	$(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) ../data/3cro.pdb $(DESTDIR)$(RASMOLDIR)

cleandir::
	   $(RM) gtkui.h rasmol.man

rasmol.man::	../doc/rasmol.1
		ln -s ../doc/rasmol.1 rasmol.man

../doc/rasmol.1:	../doc/rasmol.1.gz
		gunzip  <../doc/rasmol.1.gz > ../doc/rasmol.1

$(EXTPKGDIR):
		mkdir -p -v $(EXTPKGDIR)

$(XFORMSLIB_DIR):
		(cd $(XFORMSLIB_TARBALLDIR);		  wget $(XFORMSLIB_TARBALL_URL);		  touch $(XFORMSLIB_TARBALL);		  gunzip < $(XFORMSLIB_TARBALL) | tar xvf -)

$(XFORMSLIB_DIR)/lib/.libs/libforms.a: $(XFORMSLIB_DIR)
		(cd $(XFORMSLIB_DIR); ./configure --enable-static)
		(cd $(XFORMSLIB_DIR)/lib; make all)

$(LIBXI_DIR):
		(cd $(LIBXI_TARBALLDIR);		  wget $(LIBXI_TARBALL_URL);		  touch $(LIBXI_TARBALL);		  gunzip < $(LIBXI_TARBALL) | tar xvf -)

$(LIBXI_DIR)/src/.libs/libXi.a: $(LIBXI_DIR)
		(cd $(LIBXI_DIR); ./configure --enable-static)
		(cd $(LIBXI_DIR)/src; make all)

$(CBFLIB_DIR):
		(cd $(CBFLIB_TARBALLDIR);		  wget $(CBFLIB_TARBALL_URL);		  touch $(CBFLIB_TARBALL);		  gunzip < $(CBFLIB_TARBALL) | tar xvf -)

$(CBFLIB_DIR)/lib/libcbf.a: $(CBFLIB_DIR)
		(cd $(CBFLIB_DIR); make lib/libcbf.a)

$(CQRLIB_DIR):
		(cd $(CQRLIB_TARBALLDIR);		  wget $(CQRLIB_TARBALL_URL);		  touch $(CQRLIB_TARBALL);		  gunzip < $(CQRLIB_TARBALL) | tar xvf -)

$(CQRLIB_DIR)/cqrlib.c: $(CQRLIB_DIR)

$(CVECTOR_DIR):
		(cd $(CVECTOR_TARBALLDIR);		  wget $(CVECTOR_TARBALL_URL);		  touch $(CVECTOR_TARBALL);		  gunzip < $(CVECTOR_TARBALL) | tar xvf -)

$(CVECTOR_DIR)/CVector.c: $(CVECTOR_DIR)

$(NEARTREE_DIR):
		(cd $(NEARTREE_TARBALLDIR);		  wget $(NEARTREE_TARBALL_URL);	          touch $(NEARTREE_TARBALL);		  gunzip < $(NEARTREE_TARBALL) | tar xvf -)

$(NEARTREE_DIR)/CNearTree.c: $(NEARTREE_DIR)

$(OBJS):  $(EXTPKGDIR) $(CBFLIB_OBJDEP) 			$(CQRLIB_OBJDEP) 			$(CVECTOR_OBJDEP) 			$(NEARTREE_OBJDEP) 			$(XFORMSLIB_OBJDEP) $(LIBXI_OBJDEP) $(LIBXEXT_OBJDEP)

gtkwin.c: gtkui.h

gtkui.h: sizechooser.glade printing-resolution.glade actionmenu.gtk
	 echo "/* Automatically generated GTK ui definitions, do not edit! */" > gtkui.h
	 echo >> gtkui.h
	 echo "const gchar *actionmenu_str = \"\\" >> gtkui.h
	 cat actionmenu.gtk | sed "s/$$/\\\/" | sed 's/"/\\\"/g' >> gtkui.h
	 echo "\";" >> gtkui.h
	 echo >> gtkui.h
	 echo "const gchar *sizechooser_str = \"\\" >> gtkui.h
	 gtk-builder-convert -w sizechooser.glade - | sed "s/$$/\\\/" | sed 's/"/\\\"/g' >> gtkui.h
	 echo "\";" >> gtkui.h
	 echo >> gtkui.h
	 echo "const gchar *print_resolution_str = \"\\" >> gtkui.h
	 gtk-builder-convert -w printing-resolution.glade - | sed "s/$$/\\\/" | sed 's/"/\\\"/g' >> gtkui.h
	 echo "\";" >> gtkui.h
	 echo >> gtkui.h
	 gdk-pixbuf-csource --name=rasmol_icon --struct rasmol_48x48.xpm  >> gtkui.h

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

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

.SUFFIXES: .ii

.cc.ii:
	$(RM) $@
	 	$(CC) -E $(CFLAGS) $(_NOOP_) $*.cc > $@

.SUFFIXES: .s

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

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

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 Makefile.dep

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

