# Makefile generated by imake - do not edit!
# $XConsortium: imake.c /main/88 1995/12/08 16:33:13 gildea $

# ----------------------------------------------------------------------
# Makefile generated from "Imake.tmpl" and </tmp/IIf.a01490>
# $XConsortium: Imake.tmpl /main/r61_main/3 1996/02/02 18:57:32 gildea $
# $XFree86: xc/config/cf/Imake.tmpl,v 3.27 1996/09/14 13:05:02 dawes Exp $
#

.SUFFIXES: .i

# $XConsortium: Imake.cf /main/22 1995/12/05 16:39:53 mor $
# $XFree86: xc/config/cf/Imake.cf,v 3.28 1996/10/16 14:28:24 dawes Exp $

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

# site:  $XConsortium: site.sample /main/19 1995/12/14 13:03:29 matt $
# site:  $XFree86: xc/config/cf/site.def,v 3.10 1996/01/07 09:57:49 dawes Exp $

# $XFree86: xc/config/cf/xf86site.def,v 3.91 1996/10/19 15:12:30 dawes Exp $

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

# platform:  $XConsortium: linux.cf /main/18 1996/02/02 18:59:31 gildea $
# platform:  $XFree86: xc/config/cf/linux.cf,v 3.49 1996/10/19 15:12:28 dawes Exp $

# $XConsortium: lnxLib.rules /main/12 1996/01/03 14:51:18 kaleb $
# $XFree86: xc/config/cf/lnxLib.rules,v 3.24 1996/10/06 13:09:44 dawes Exp $

# $XFree86: xc/config/cf/xfree86.cf,v 3.117 1996/10/19 15:12:31 dawes Exp $

# $XConsortium: xfree86.cf /main/17 1996/01/03 14:50:55 kaleb $

LINKKITDIR = $(USRLIBDIR)/Server
XF98LINKKITDIR = $(USRLIBDIR)/Server

       XF86SRC = $(SERVERSRC)/hw/xfree86
  XF86ACCELSRC = $(XF86SRC)/accel
    XF86COMSRC = $(XF86SRC)/common
 XF86CONFIGSRC = $(XF86COMSRC)
     XF86HWSRC = $(XF86SRC)/common_hw
     XF86OSSRC = $(XF86SRC)/os-support
  VGADRIVERSRC = $(XF86SRC)/vga256/drivers
VGA16DRIVERSRC = $(XF86SRC)/vga16/drivers
 VGA2DRIVERSRC = $(XF86SRC)/vga2/drivers
 MONODRIVERSRC = $(XF86SRC)/mono/drivers
   S3DRIVERSRC = $(XF86SRC)/accel/s3/drivers
  S3VDRIVERSRC = $(XF86SRC)/accel/s3_virge/drivers

       XF68SRC = $(SERVERSRC)/hw/xfree68
    XF68COMSRC = $(XF68SRC)/common
 XF68CONFIGSRC = $(XF68COMSRC)
     XF68OSSRC = $(XF68SRC)/os-support

           XF98SRC = $(SERVERSRC)/hw/xfree98
      XF98ACCELSRC = $(XF98SRC)/accel
        XF98COMSRC = $(XF98SRC)/common
     XF98CONFIGSRC = $(XF98COMSRC)
         XF98HWSRC = $(XF98SRC)/common_hw/generic
      XF98HWNECSRC = $(XF98SRC)/common_hw/nec
    XF98HWPWSKBSRC = $(XF98SRC)/common_hw/pwskb
     XF98HWPWLBSRC = $(XF98SRC)/common_hw/pwlb
    XF98HWGA968SRC = $(XF98SRC)/common_hw/ga968
         XF98OSSRC = $(XF98SRC)/os-support
  XF98VGADRIVERSRC = $(XF98SRC)/vga256/drivers
XF98VGA16DRIVERSRC = $(XF98SRC)/vga16/drivers
 XF98VGA2DRIVERSRC = $(XF98SRC)/vga2/drivers
 XF98MONODRIVERSRC = $(XF98SRC)/mono/drivers
XF98NECS3DRIVERSRC = $(XF98SRC)/accel/s3nec/drivers
XF98PWSKBDRIVERSRC = $(XF98SRC)/accel/s3pwskb/drivers
 XF98PWLBDRIVERSRC = $(XF98SRC)/accel/s3pwlb/drivers
XF98GA968DRIVERSRC = $(XF98SRC)/accel/s3ga968/drivers

        XFREE86DOCDIR = $(LIBDIR)/doc
      XFREE86PSDOCDIR = $(XFREE86DOCDIR)/PostScript
    XFREE86HTMLDOCDIR = $(XFREE86DOCDIR)/html
XFREE86JAPANESEDOCDIR = $(XFREE86DOCDIR)/Japanese

# $XConsortium: xf86.rules,v 1.7 95/01/25 16:34:39 kaleb Exp $
# $XFree86: xc/config/cf/xf86.rules,v 3.15 1996/09/24 13:48:46 dawes Exp $

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

# site:  $XConsortium: site.sample /main/19 1995/12/14 13:03:29 matt $
# site:  $XFree86: xc/config/cf/site.def,v 3.10 1996/01/07 09:57:49 dawes Exp $

# ---------------------------------------------------------------------
# Imake rules for building libraries, programs, scripts, and data files
# rules:  $XConsortium: Imake.rules /main/208 1996/01/17 11:08:27 kaleb $
# rules:  $XFree86: xc/config/cf/Imake.rules,v 3.27 1996/09/01 04:12:46 dawes Exp $

 _NULLCMD_ = @ echo -n

          PATHSEP = /
            SHELL = /bin/sh

              TOP = ../..
      CURRENT_DIR = doc/playbook-html

            IMAKE = imake
           DEPEND = gccmakedep
        MKDIRHIER = mkdir -p
        CONFIGSRC = $(TOP)/config
         IMAKESRC = $(CONFIGSRC)/imake
        DEPENDSRC = $(CONFIGSRC)/util

          INCROOT = /usr/X11R6/include
        USRLIBDIR = /usr/X11R6/lib
        VARLIBDIR = /var/lib
         SHLIBDIR = /usr/X11R6/lib
       LINTLIBDIR = $(USRLIBDIR)/lint
          MANPATH = /usr/X11R6/man
    MANSOURCEPATH = $(MANPATH)/man
           MANDIR = $(MANSOURCEPATH)1
        LIBMANDIR = $(MANSOURCEPATH)3
       FILEMANDIR = $(MANSOURCEPATH)5

               AR = ar clq
  BOOTSTRAPCFLAGS =
               CC = gcc
               AS = as

.SUFFIXES: .cxx

              CXX = c++
    CXXDEBUGFLAGS = -O2 -fno-strength-reduce -m486
 CXXEXTRA_DEFINES =
CXXEXTRA_INCLUDES =
   CXXSTD_DEFINES = -Dlinux -D__i386__ -D_POSIX_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -DX_LOCALE
       CXXOPTIONS =
      CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES)
       CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(CXXEXTRA_DEFINES)
         CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES)

         COMPRESS = compress
              CPP = /lib/cpp $(STD_CPP_DEFINES)
    PREPROCESSCMD = gcc -E $(STD_CPP_DEFINES)
          INSTALL = install
     INSTALLFLAGS = -c
               LD = ld
              LEX = flex -l
           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
        MANSUFFIX = 1x
     LIBMANSUFFIX = 3x
    FILEMANSUFFIX = 5x
            TROFF = psroff
            NROFF = nroff
         MSMACROS = -ms
        MANMACROS = -man
              TBL = tbl
              EQN = eqn
             NEQN = neqn
              COL = col

            DVIPS = dvips
            LATEX = latex

     STD_INCLUDES =
  STD_CPP_DEFINES = -traditional -Dlinux -D__i386__ -D_POSIX_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -DX_LOCALE
      STD_DEFINES = -Dlinux -D__i386__ -D_POSIX_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -DX_LOCALE
 EXTRA_LOAD_FLAGS = -Wl,-rpath,$(SHLIBDIR)
  EXTRA_LDOPTIONS =
  EXTRA_LIBRARIES =
             TAGS = ctags

    SHAREDCODEDEF =
         SHLIBDEF =

     SHLIBLDFLAGS = -shared

         PICFLAGS = -fPIC

      CXXPICFLAGS = -fPIC

    PROTO_DEFINES = -DFUNCPROTO=15 -DNARROWPROTO

     INSTPGMFLAGS = -s

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

      PROJECTROOT = /usr/X11R6

     TOP_INCLUDES = -I$(INCROOT)

      CDEBUGFLAGS = -O2 -fno-strength-reduce -m486
        CCOPTIONS =

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

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

           CCLINK = $(CC)

          CXXLINK = $(CXX)

     LDSTRIPFLAGS = -x
   LDCOMBINEFLAGS = -r
      DEPENDFLAGS =

# Not sure this belongs here
         TKLIBDIR =
         TKINCDIR =
        TKLIBNAME =
        TKLIBRARY = -LTkLibDir -lTkLibName
        TCLLIBDIR =
        TCLINCDIR =
       TCLLIBNAME =
       TCLLIBRARY = -LTclLibDir -lTclLibName

        MACROFILE = linux.cf
           RM_CMD = $(RM)

    IMAKE_DEFINES =

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

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

# ----------------------------------------------------------------------
# X Window System Build Parameters and Rules
# $XConsortium: Project.tmpl /main/r61_main/6 1996/01/15 12:26:59 gildea $
# $XFree86: xc/config/cf/Project.tmpl,v 3.34 1996/10/03 08:28:05 dawes Exp $

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

           BINDIR = /usr/X11R6/bin
     BUILDINCROOT = $(TOP)
      BUILDINCDIR = $(BUILDINCROOT)/X11
      BUILDINCTOP = ..
      BUILDLIBDIR = $(TOP)/usrlib
      BUILDLIBTOP = ..
           INCDIR = $(INCROOT)/X11
           ADMDIR = /usr/adm
           LIBDIR = $(USRLIBDIR)/X11

          FONTDIR = $(LIBDIR)/fonts
         XINITDIR = $(LIBDIR)/xinit
           XDMDIR = $(LIBDIR)/xdm
        XDMVARDIR = $(VARLIBDIR)/xdm
           TWMDIR = $(LIBDIR)/twm
           XSMDIR = $(LIBDIR)/xsm
           NLSDIR = $(LIBDIR)/nls
       XLOCALEDIR = $(LIBDIR)/locale
        PEXAPIDIR = $(LIBDIR)/PEX
      XAPPLOADDIR = $(LIBDIR)/app-defaults
       FONTCFLAGS = -t

     INSTAPPFLAGS = $(INSTDATFLAGS)

              RGB = rgb
            FONTC = bdftopcf
        MKFONTDIR = mkfontdir

       DOCUTILSRC = $(TOP)/doc/util
        CLIENTSRC = $(TOP)/clients
          DEMOSRC = $(TOP)/demos
       XDOCMACROS = $(DOCUTILSRC)/macros.t
       XIDXMACROS = $(DOCUTILSRC)/indexmacros.t
       PROGRAMSRC = $(TOP)/programs
           LIBSRC = $(TOP)/lib
          FONTSRC = $(TOP)/fonts
       INCLUDESRC = $(TOP)/X11
        SERVERSRC = $(TOP)/programs/Xserver
       CONTRIBSRC = $(TOP)/../contrib
   UNSUPPORTEDSRC = $(TOP)/unsupported
           DOCSRC = $(TOP)/doc
           RGBSRC = $(TOP)/programs/rgb
      BDFTOPCFSRC = $(PROGRAMSRC)/bdftopcf
     MKFONTDIRSRC = $(PROGRAMSRC)/mkfontdir
    FONTSERVERSRC = $(PROGRAMSRC)/xfs
       FONTINCSRC = $(TOP)/include/fonts
        EXTINCSRC = $(TOP)/include/extensions
     TRANSCOMMSRC = $(LIBSRC)/xtrans
   TRANS_INCLUDES = -I$(TRANSCOMMSRC)

# $XConsortium: lnxLib.tmpl,v 1.5 95/01/11 21:44:44 kaleb Exp $
# $XFree86: xc/config/cf/lnxLib.tmpl,v 3.9 1996/02/24 04:32:52 dawes Exp $

          XLIBSRC = $(LIBSRC)/X11

SOXLIBREV = 6.1
DEPXONLYLIB =
XONLYLIB =  -lX11

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

         XLIBONLY = $(XONLYLIB)

      XEXTLIBSRC = $(LIBSRC)/Xext

SOXEXTREV = 6.1
DEPXEXTLIB =
XEXTLIB =  -lXext

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

    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

     EXTENSIONLIB = $(XEXTLIB)
  DEPEXTENSIONLIB = $(DEPXEXTLIB)
    LINTEXTENSION = $(LINTXEXT)

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

         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.0
DEPXMULIB =
XMULIB =  -lXmu

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

       OLDXLIBSRC = $(LIBSRC)/oldX

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

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

       AWIDGETSRC = $(LIBSRC)/Xaw

SOXAWREV = 6.1
DEPXAWLIB =
XAWLIB =  -lXaw

LINTXAW = $(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.0
DEPICELIB =
ICELIB =  -lICE

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

            SMSRC = $(LIBSRC)/SM

SOSMREV = 6.0
DEPSMLIB =
SMLIB =  -lSM

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

         FSLIBSRC = $(LIBSRC)/FS

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

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

         FONTLIBSRC = $(LIBSRC)/font

DEPFONTLIB = $(USRLIBDIR)/libfont.a
FONTLIB =  -lfont

LINTFONT = $(LINTLIBDIR)/llib-lfont.ln

          XPMLIBSRC = $(LIBSRC)/Xpm

DEPXPMLIB = $(USRLIBDIR)/libXpm.a
XPMLIB =  -lXpm

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

    XKBFILELIBSRC = $(LIBSRC)/xkbfile

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

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

     XKBCOMPCMD = 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)

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

        CONFIGDIR = $(LIBDIR)/config

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

VERSION = crossfire-0.93.7

AWK = gawk

MANSUFFIX = 6
MANPATH = /usr/local/man

MANSUFFIX = 6

CDEBUGFLAGS = $(DEBUGFLAGS) $(EXTRA_FLAGS)

NOLONGJUMPS = -DLONGJUMP

XPM_DEFINES = -DXpm_Pix

XPM_LIBS = $(XPM_LIBDIR) -lXpm

MALLOC_DEFINES = -DDMALLOC
MALLOC_LIBS = /usr/local/lib/libdmalloc.a

EXTRA_FLAGS = -DDEBUG -ggdb -Wall -pedantic -ansi

EXTRA_DEFINES = $(NOLONGJUMPS) $(STUPIDSUNHEADERS) $(XPM_DEFINES) 	$(MALLOC_DEFINES)  $(SOUND_DEF) $(EUTL_DEFINES)

C_BINDIR = /home/hugin/a/crossfire/crossfire/bin

C_LIBDIR = /home/hugin/a/crossfire/crossfire/lib

ADMDIR = $(C_LIBDIR)/adm

FONTDIR = $(LIBDIR)/fonts/misc

FONTNAME=crossfire

FONTTYPE=pcf

RPLAY_LIBDIR = /usr/local/lib
SOUND_LIBS = -L$(RPLAY_LIBDIR) -lrplay

RPLAY_INCDIR = -I/usr/local/include

SOUND_DEF = -DSOUND_EFFECTS

EXTRA_LIBRARIES = -lcrypt

IMAKE_DEFINES = -DCrossFire -I$(TOP)/../.. -I$(TOP)/../config

      TAR = tar
     PERL = perl
 BASENAME = basename
     SHAR = shar

MKDIRHIER = mkdirhier

DEFINES = -DFONTDIR=\"${FONTDIR}\" -DFONTNAME=\"$(FONTNAME)\" $(TARGET)         -DLIBDIR=\"$(C_LIBDIR)\"

FILES = Imakefile handbook.html chap1.html chap2.shtml chap3.shtml 	chap4.shtml chap5.shtml chap6.shtml chap7.html appA.html appB.html 	appC.shtml 	bonus-extract char-extract spellpath-extract skills2-extract 	empty.pbm statskmod-extract treas1-extract treas2-extract	skills-extract makeps items-extract generic-extract sorter 	levels-extract gods-extract

FIG = fig/earrow.gif    fig/nearrow.gif   fig/sarrow.gif    fig/swarrow.gif 	fig/narrow.gif fig/nwarrow.gif fig/searrow.gif fig/warrow.gif 	fig/screen_dia.gif fig/book.gif fig/stairdown.gif fig/stairup.gif

 CROSSRC = ../..
  INCDIR = $(CROSSRC)/include
  IMGDIR = $(CROSSRC)/doc/spoiler
CROSSBIN = $(CROSSRC)/server/crossfire

all::

handbook:: chap2.html chap3.html chap4.html chap5.html chap6.html appC.html

$(CROSSBIN):
	@$(RM) dump_switches
	@$(CROSSBIN) -m >/dev/null 2>&1 && touch dump_switches ||	(echo "You need to define DUMP_SWITCHES in include/config.h and";	echo "recompile before you can create the spoilers.")

	@$(MAKE) $(MFLAGS) check_ok

check_ok: dump_switches
	@$(RM) dump_switches

.bmaps: $(C_LIBDIR)/archetypes
	$(RM) *.gif
	touch .bmaps

items: .bmaps in_items makeps items.gif
	$(AWK) -v libdir=$(CROSSRC)/lib -v archdir=$(CROSSRC)/lib/ -v size=0.4 -v input=in_items -f makeps $(C_LIBDIR)/archetypes > items

in_items: items-extract $(C_LIBDIR)/archetypes $(CROSSRC)/common/living.c
	$(AWK) -v living_c=$(CROSSRC)/common/living.c 		-f items-extract $(C_LIBDIR)/archetypes > in_items

chap2.html: bonus.html char.html equip.html skills.html chap2.shtml
	../include_html.pl chap2.shtml chap2.html

bonus.html:
	$(AWK) -v living_c=../../common/living.c 	-f bonus-extract > bonus.html

in_char: char-extract $(C_LIBDIR)/archetypes $(CROSSRC)/common/living.c
	$(AWK) -v living_c=$(CROSSRC)/common/living.c 		-f char-extract $(C_LIBDIR)/archetypes > in_char

char.html: .bmaps in_char makeps characters.gif
	$(AWK) -v libdir=$(CROSSRC)/lib -v archdir=$(CROSSRC)/lib/ -v size=0.4 -v input=in_char -f makeps $(C_LIBDIR)/archetypes > char.html

in_stats: stats-extract $(C_LIBDIR)/archetypes $(CROSSRC)/common/living.c
	$(AWK) -v living_c=$(CROSSRC)/common/living.c 		-f stats-extract $(C_LIBDIR)/archetypes > in_stats

stats.html: .bmaps in_stats makeps stats.gif
	$(AWK) -v libdir=$(CROSSRC)/lib -v archdir=$(CROSSRC)/lib/ -v size=0.4 -v input=in_stats -f makeps $(C_LIBDIR)/archetypes > stats.html

equip.html: in_equip treas2-extract
	$(AWK) -v eqitems=in_equip -f treas2-extract 	../../lib/treasures > equip.html

in_equip: treas1-extract $(C_LIBDIR)/archetypes $(CROSSRC)/common/living.c
	$(AWK) -v living_c=$(CROSSRC)/common/living.c 		-f treas1-extract $(C_LIBDIR)/archetypes | sort -d > in_equip

skills.html: in_equip skills-extract
	$(AWK) -v eqitems=in_equip -f skills-extract 	../../lib/treasures > skills.html

chap3.html: chap3.shtml bows.html br_wall.html dir_spin.html foodone.html 	fr_wall.html gatedoor.html guild.html handbutt.html 	holysymbol.html horns.html keys.html pit.html potions.html 	rods.html savebed.html scrolls.html sign.html corpse.html 	talisman.html wands.html levels.html gravestone.html

	../include_html.pl chap3.shtml chap3.html

bows.html: items generic-extract
	egrep -e "^14 " items | $(AWK) -F'&'  -f generic-extract | sort > bows.html

br_wall.html: items sorter
	egrep -e "^45 " items | $(AWK) -F'&' -f generic-extract | sort > br_wall.html

dir_spin.html: items sorter
	egrep -e "^90 " items | $(AWK) -F'&' -f generic-extract | sort > dir_spin.html
	egrep -e "^112 " items | $(AWK) -F'&' -f generic-extract | sort >> dir_spin.html

foodone.html: items sorter
	egrep -e "^6 " items | $(AWK) -F'&'  -f generic-extract | grep "food" > foodone.html

fr_wall.html: items sorter
	egrep -e "^62 " items | $(AWK) -F'&' -f generic-extract | sort > fr_wall.html

gatedoor.html: items sorter
	egrep -e "^20 " items | $(AWK) -F'&' -f generic-extract | sort > gatedoor.html
	egrep -e "^23 " items | $(AWK) -F'&' -f generic-extract | sort >> gatedoor.html
	egrep -e "^91 " items | $(AWK) -F'&' -f generic-extract | sort >> gatedoor.html

guild.html: items generic-extract
	egrep -e "^66 " items | grep "guild" | $(AWK) -F'&'  	-f generic-extract | sort > guild.html

handbutt.html: items sorter
	egrep -e "^92 " items | $(AWK) -F'&' -f generic-extract | sort > handbutt.html
	egrep -e "^93 " items | $(AWK) -F'&' -f generic-extract | sort >> handbutt.html

holysymbol.html: items generic-extract
	egrep -e "^43 " items | grep "holy" | $(AWK) -F'&'  	-f generic-extract | sort > holysymbol.html

horns.html: items sorter
	egrep -e "^35 " items | $(AWK) -F'&'  -f generic-extract | sort > horns.html

keys.html: items sorter
	egrep -e "^21 " items | $(AWK) -F'&' -f generic-extract | sort > keys.html
	egrep -e "^24 " items | $(AWK) -F'&' -f generic-extract | sort >> keys.html

levels.html:
	$(AWK) -v living_c=../../common/living.c 	-f levels-extract > levels.html

pit.html: items sorter
	egrep -e "^95 " items | $(AWK) -F'&' -f generic-extract | sort > pit.html

potions.html: items sorter
	egrep -e "^5 " items | $(AWK) -F'&'  -f generic-extract | sort > potions.html

rods.html: items sorter
	egrep -e "^3 " items | $(AWK) -F'&'  -f generic-extract | sort > rods.html

savebed.html: items sorter
	egrep -e "^106 " items | $(AWK) -F'&'  -f generic-extract | sort > savebed.html

scrolls.html: items sorter
	egrep -e "^111 " items | $(AWK) -F'&'  -f generic-extract | sort > scrolls.html

sign.html: items sorter
	egrep -e "^98 " items | $(AWK) -F'&' -f generic-extract | sort > sign.html

talisman.html: items generic-extract
	egrep -e "^43 " items | grep "talisman" | $(AWK) -F'&'  	-f generic-extract | sort > talisman.html

wands.html: items sorter
	egrep -e "^109 " items | $(AWK) -F'&'  -f generic-extract | sort > wands.html

gravestone.html: items sorter
	egrep -e "^38 " items | $(AWK) -F'&' -f generic-extract | sort > gravestone.html

corpse.html: items sorter
	egrep -e "^157 " items | $(AWK) -F'&' -f generic-extract | sort > corpse.html

chap4.html: chap4.shtml spellpath.html altar.html cauldron.html 	runefire.html runefrost.html runeblast.html runeshock.html	 runedeath.html  runegen.html runemark.html

	../include_html.pl chap4.shtml chap4.html

spellpath.html:
	$(AWK) -v living_c=../../include/spellist.h 	-f spellpath-extract |sort > spellpath.html

altar.html: items sorter
	egrep -e "^18 " items | $(AWK) -F'&' -f generic-extract | sort > altar.html

cauldron.html: items sorter
	egrep -e "^122 " items | grep "cauldron" | 		$(AWK) -F'&' -f generic-extract | sort > cauldron.html

runeblast.html: items sorter
	egrep -e "^154 " items | grep "rune-blast" | 	$(AWK) -F'&' -f generic-extract | sort > runeblast.html

runedeath.html: items sorter
	egrep -e "^154 " items | grep "rune-death" | 	$(AWK) -F'&' -f generic-extract | sort > runedeath.html

runegen.html: items sorter
	egrep -e "^154 " items | grep "generic-rune" | 	$(AWK) -F'&' -f generic-extract | sort > runegen.html

runefrost.html: items sorter
	egrep -e "^154 " items | grep "rune-frost." | 	$(AWK) -F'&' -f generic-extract | sort > runefrost.html

runefire.html: items sorter
	egrep -e "^154 " items | grep "rune-fire." | 	$(AWK) -F'&' -f generic-extract | sort > runefire.html

runemark.html: items sorter
	egrep -e "^98 " items | grep "rune-mark." | 	$(AWK) -F'&' -f generic-extract | sort > runemark.html

runeshock.html: items sorter
	egrep -e "^154 " items | grep "rune-shock." | 	$(AWK) -F'&' -f generic-extract | sort > runeshock.html

chap5.html: chap5.shtml skill_stat.html statskmod.html lockpicks.html
	../include_html.pl chap5.shtml chap5.html

skill_stat.html: skills2-extract $(CROSSBIN)
		$(AWK) -F, -v crosscmd="$(CROSSBIN) -m5" 			-f skills2-extract | sort > skill_stat.html

version.html: $(CROSSBIN)
	$(CROSSBIN) -v 2>&1 | grep "^This is" | 		cut -d" " -f3- > version.html

statskmod.html:
	$(AWK) -v living_c=../../server/skill_util.c 	-f statskmod-extract > statskmod.html

lockpicks.html: items sorter
	egrep -e "^43 " items | grep "lockpicks" | 	$(AWK) -F'&' -f generic-extract | sort > lockpicks.html

chap6.html: chap6.shtml shop.html shopmat.html money.html books.html 	scrolls.html potions.html wands.html rods.html horns.html 	rings.html food.html flesh.html potion.html

	../include_html.pl chap6.shtml chap6.html

shop.html: items sorter
	egrep -e "^66 " items | grep "store" | 	$(AWK) -F'&' -f generic-extract | sort > shop.html

shopmat.html: items sorter
	egrep -e "^69 " items | 	$(AWK) -F'&' -f generic-extract | sort > shopmat.html

money.html: items sorter
	egrep -e "^36 " items | 	$(AWK) -F'&' -f generic-extract | sort > money.html

books.html: items sorter
	egrep -e "^8 " items | 	$(AWK) -F'&' -f generic-extract | sort > books.html

rings.html: items sorter
	egrep -e "^70 " items | 	$(AWK) -F'&' -f generic-extract | sort > rings.html

food.html: items sorter
	egrep -e "^6 " items | 	$(AWK) -F'&' -f generic-extract | sort > food.html

flesh.html: items sorter
	egrep -e "^72 " items | 	$(AWK) -F'&' -f generic-extract | sort > flesh.html

potion.html: items sorter
	egrep -e "^5 " items | grep "potiongen" | 	$(AWK) -F'&' -f generic-extract | sort > potion.html

stats.gif items.gif monsters.gif spells.gif characters.gif:
	touch $@

appC.html: appC.shtml gods.html
	../include_html.pl appC.shtml appC.html

gods.html: gods-extract $(CROSSBIN)
	$(AWK) -F, -v crosscmd="$(CROSSBIN) -m8" -f gods-extract > gods.html

install::

depend::

clean::
	$(RM) items .bmaps in_monput in_items in_spells in_stats
	$(RM) *x*.ppm tmp.ppm work.ppm

subarchive::
	@if [ -d $(ATOP)/doc/playbook-html ]; then set +x; \
	else (set -x; $(MKDIRHIER) $(ATOP)/doc/playbook-html); fi
	$(CP) $(FILES) $(ATOP)/doc/playbook-html

subarchive::
	@if [ -d $(ATOP)/doc/playbook-html/fig ]; then set +x; \
	else (set -x; $(MKDIRHIER) $(ATOP)/doc/playbook-html/fig); fi
	$(CP) $(FIG) $(ATOP)/doc/playbook-html/fig

patchlist::
	echo $(FILES) > .patchlist

# Depends:

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

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

emptyrule::

clean::
	$(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::

# ----------------------------------------------------------------------
# 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.linkkit::
	@echo "install.linkkit in $(CURRENT_DIR) done"

Makefiles::

includes::

depend::

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

