Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem compiling crossfire



I am currently trying to compile Crossfire 0.92.1 on a Sun Sparc 10 
running SunOS 4.1.3 with X11R6 windowing system using GCC version 2.7.2 
compiler.

I have attached the Imakefile and the resulting Makefile after I did xmkmf.

After I did the xmkmf, I typed make Makefiles and the error that I go was:

Makefile:577: *** missing `endef', unterminated `define'.  Stop.

I know my way around makefiles, like what to add and delete, but I've 
never gotten this error before.  So I am at a loss.  Any help or 
suggestions would be appreciated.

Thank You

Andrew Wrobel
awrobel@jedi.cis.temple.edu
# Makefile generated by imake - do not edit!
# $XConsortium: imake.c,v 1.65 91/07/25 17:50:17 rws Exp $
#
# The cpp used on this machine replaces all newlines and multiple tabs and
# spaces in a macro expansion with a single space.  Imake tries to compensate
# for this, but is not always successful.
#

# -------------------------------------------------------------------------
# Makefile generated from "Imake.tmpl" and <Imakefile>
# $XConsortium: Imake.tmpl,v 1.139 91/09/16 08:52:48 rws Exp $
#
# Platform-specific parameters may be set in the appropriate <vendor>.cf
# configuration files.  Site-specific parameters should be set in the file
# site.def.  Full rebuilds are recommended if any parameters are changed.
#
# If your C preprocessor does not define any unique symbols, you will need
# to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
# "make World" the first time).
#

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

# site:  $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $

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

# platform:  $XConsortium: sun.cf,v 1.68 91/07/30 11:34:39 rws Exp $

# operating system:  SunOS 4.1.3

# $XConsortium: sunLib.rules,v 1.7 91/12/20 11:19:47 rws Exp $

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

# site:  $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $

            SHELL = /bin/sh

              TOP = .
      CURRENT_DIR = .

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

         COMPRESS = compress
              CPP = /lib/cpp $(STD_CPP_DEFINES)
    PREPROCESSCMD = cc -E $(STD_CPP_DEFINES)
          INSTALL = install
               LD = ld
             LINT = lint
      LINTLIBFLAG = -C
         LINTOPTS = -axz
               LN = ln -s
             MAKE = make
               MV = mv
               CP = cp

           RANLIB = ranlib
  RANLIBINSTFLAGS =

               RM = rm -f
            TROFF = psroff
         MSMACROS = -ms
              TBL = tbl
              EQN = eqn
     STD_INCLUDES =
  STD_CPP_DEFINES =
      STD_DEFINES =
 EXTRA_LOAD_FLAGS =
  EXTRA_LIBRARIES =
             TAGS = ctags

    SHAREDCODEDEF = -DSHAREDCODE
         SHLIBDEF = -DSUNSHLIB

    PROTO_DEFINES =

     INSTPGMFLAGS =

     INSTBINFLAGS = -m 0755
     INSTUIDFLAGS = -m 4755
     INSTLIBFLAGS = -m 0644
     INSTINCFLAGS = -m 0444
     INSTMANFLAGS = -m 0444
     INSTDATFLAGS = -m 0444
    INSTKMEMFLAGS = -g kmem -m 2755

      PROJECTROOT = /usr/local

     TOP_INCLUDES = -I$(INCROOT)

      CDEBUGFLAGS = -O2
        CCOPTIONS = -pipe

      ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
       ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES)
           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)

           LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)

        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) -L$(USRLIBDIR)

   LDCOMBINEFLAGS = -X -r
      DEPENDFLAGS =

        MACROFILE = sun.cf
           RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut

    IMAKE_DEFINES =

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

     ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \
			$(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \
			$(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)

# -------------------------------------------------------------------------
# X Window System Build Parameters
# $XConsortium: Project.tmpl,v 1.138.1.1 92/11/11 09:49:19 rws Exp $

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

          PATHSEP = /
        USRLIBDIR = /usr/local/lib
           BINDIR = /home/yoda/awrobel/bin
          INCROOT = /usr/local/include
     BUILDINCROOT = $(TOP)
      BUILDINCDIR = $(BUILDINCROOT)/X11
      BUILDINCTOP = ..
           INCDIR = $(INCROOT)/X11
           ADMDIR = /usr/adm
           LIBDIR = $(USRLIBDIR)/X11
        CONFIGDIR = $(LIBDIR)/config
       LINTLIBDIR = $(USRLIBDIR)/lint

          FONTDIR = $(LIBDIR)/fonts
         XINITDIR = $(LIBDIR)/xinit
           XDMDIR = $(LIBDIR)/xdm
           TWMDIR = $(LIBDIR)/twm
          MANPATH = /home/yoda/awrobel/man
    MANSOURCEPATH = $(MANPATH)/man
        MANSUFFIX = 1
     LIBMANSUFFIX = 3
           MANDIR = $(MANSOURCEPATH)$(MANSUFFIX)
        LIBMANDIR = $(MANSOURCEPATH)$(LIBMANSUFFIX)
           NLSDIR = $(LIBDIR)/nls
        PEXAPIDIR = $(LIBDIR)/PEX
      XAPPLOADDIR = $(LIBDIR)/app-defaults
       FONTCFLAGS = -t

     INSTAPPFLAGS = $(INSTDATFLAGS)

            IMAKE = imake
           DEPEND = makedepend
              RGB = rgb

            FONTC = bdftopcf

        MKFONTDIR = /usr/local/bin/mkfontdir
        MKDIRHIER = /bin/sh /usr/local/bin/mkdirhier

        CONFIGSRC = $(TOP)/config
       DOCUTILSRC = $(TOP)/doc/util
        CLIENTSRC = $(TOP)/clients
          DEMOSRC = $(TOP)/demos
           LIBSRC = $(TOP)/lib
          FONTSRC = $(TOP)/fonts
       INCLUDESRC = $(TOP)/X11
        SERVERSRC = $(TOP)/server
          UTILSRC = $(TOP)/util
        SCRIPTSRC = $(UTILSRC)/scripts
       EXAMPLESRC = $(TOP)/examples
       CONTRIBSRC = $(TOP)/../contrib
           DOCSRC = $(TOP)/doc
           RGBSRC = $(TOP)/rgb
        DEPENDSRC = $(UTILSRC)/makedepend
         IMAKESRC = $(CONFIGSRC)
         XAUTHSRC = $(LIBSRC)/Xau
          XLIBSRC = $(LIBSRC)/X
           XMUSRC = $(LIBSRC)/Xmu
       TOOLKITSRC = $(LIBSRC)/Xt
       AWIDGETSRC = $(LIBSRC)/Xaw
       OLDXLIBSRC = $(LIBSRC)/oldX
      XDMCPLIBSRC = $(LIBSRC)/Xdmcp
      BDFTOSNFSRC = $(FONTSRC)/bdftosnf
      BDFTOSNFSRC = $(FONTSRC)/clients/bdftosnf
      BDFTOPCFSRC = $(FONTSRC)/clients/bdftopcf
     MKFONTDIRSRC = $(FONTSRC)/clients/mkfontdir
         FSLIBSRC = $(FONTSRC)/lib/fs
    FONTSERVERSRC = $(FONTSRC)/server
     EXTENSIONSRC = $(TOP)/extensions
         XILIBSRC = $(EXTENSIONSRC)/lib/xinput
        PEXLIBSRC = $(EXTENSIONSRC)/lib/PEXlib
      PHIGSLIBSRC = $(EXTENSIONSRC)/lib/PEX

# $XConsortium: sunLib.tmpl,v 1.14.1.2 92/11/11 09:55:02 rws Exp $

SHLIBLDFLAGS = -assert pure-text
PICFLAGS = -pic

  DEPEXTENSIONLIB =
     EXTENSIONLIB = -lXext

          DEPXLIB = $(DEPEXTENSIONLIB)
             XLIB = $(EXTENSIONLIB) -lX11

        DEPXMULIB = $(USRLIBDIR)/libXmu.sa.$(SOXMUREV)
       XMULIBONLY = -lXmu
           XMULIB = -lXmu

       DEPOLDXLIB =
          OLDXLIB = -loldX

      DEPXTOOLLIB = $(USRLIBDIR)/libXt.sa.$(SOXTREV)
         XTOOLLIB = -lXt

        DEPXAWLIB = $(USRLIBDIR)/libXaw.sa.$(SOXAWREV)
           XAWLIB = -lXaw

        DEPXILIB =
           XILIB = -lXi

        DEPPEXLIB =
           PEXLIB = -lPEX5

        SOXLIBREV = 4.10
          SOXTREV = 4.10
         SOXAWREV = 5.0
        SOOLDXREV = 4.10
         SOXMUREV = 4.10
        SOXEXTREV = 4.10
      SOXINPUTREV = 4.10
         SOPEXREV = 1.0

      DEPXAUTHLIB = $(USRLIBDIR)/libXau.a
         XAUTHLIB =  -lXau
      DEPXDMCPLIB = $(USRLIBDIR)/libXdmcp.a
         XDMCPLIB =  -lXdmcp

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

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

 LINTEXTENSIONLIB = $(LINTLIBDIR)/llib-lXext.ln
         LINTXLIB = $(LINTLIBDIR)/llib-lX11.ln
          LINTXMU = $(LINTLIBDIR)/llib-lXmu.ln
        LINTXTOOL = $(LINTLIBDIR)/llib-lXt.ln
          LINTXAW = $(LINTLIBDIR)/llib-lXaw.ln
           LINTXI = $(LINTLIBDIR)/llib-lXi.ln
          LINTPEX = $(LINTLIBDIR)/llib-lPEX5.ln
        LINTPHIGS = $(LINTLIBDIR)/llib-lphigs.ln

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

         DEPLIBS1 = $(DEPLIBS)
         DEPLIBS2 = $(DEPLIBS)
         DEPLIBS3 = $(DEPLIBS)

# -------------------------------------------------------------------------
# Imake rules for building libraries, programs, scripts, and data files
# rules:  $XConsortium: Imake.rules,v 1.123 91/09/16 20:12:16 rws Exp $

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

IMAKE_DEFINES=-I$(NEWTOP)/.. -I$(NEWTOP)/config -I$(NEWTOP)
EXTRA_INCLUDES = -I/home/yoda/awrobel/include
EXTRA_LIBRARIES = -L/home/yoda/awrobel/lib

define ForceCCOPTIONS -O2

AWK = gawk

VERSION = crossfire-0.92.1

MANSUFFIX = 6
MANPATH = /usr/local/man

MANPATH = /home/yoda/awrobel/man

MANSUFFIX = 6

CDEBUGFLAGS = $(DEBUGFLAGS) $(EXTRA_FLAGS)

NOLONGJUMPS = -DLONGJUMP

STUPIDSUNHEADERS = -DStupidSunHeaders

XPM_LIBDIR = -L/home/yoda/awrobel/lib/

XPM_DEFINES = -DXpm_Pix -I/home/yoda/awrobel/include

XPM_LIBS = $(XPM_LIBDIR) -lXpm

EUTL_LIBDIR = -L/home/yoda/awrobel/lib

EUTL_INCLUDES = -I/home/yoda/awrobel/include/eutl

EUTL_LIBS = $(EUTL_LIBDIR) -leutl
EUTL_DEFINES = -DERIC_SERVER=1

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

CC = gcc

C_BINDIR = /home/yoda/awrobel/bin

C_LIBDIR = /home/yoda/awrobel/lib

ADMDIR = $(C_LIBDIR)/adm

FONTDIR = /home/yoda/awrobel/lib/X11/fonts

FONTNAME=crossfire

FONTTYPE=pcf

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)\"

MAKE = make

SUBDIRS = common doc server client utils crossedit include config lib

FILES = CHANGES CREDITS DEVELOPERS DONE Imakefile INSTALL License README \
	TODO

all:: emptyrule

World::
	@echo ""
	@echo "Starting to build crossfire.  Time to start praying 8)"
	@echo ""
	@date
	@echo ""
	$(XMKMF)
	make Makefiles
	$(MAKE) $(MFLAGS) clean
	$(MAKE) $(MFLAGS) includes
	$(MAKE) $(MFLAGS) depend
	$(MAKE) $(MFLAGS) all
	@echo ""
	@date
	@echo ""
	@echo "Complete build of crossfire (hopefully) finished."
	@echo ""

all::
	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	for i in $(SUBDIRS) ;\
	do \
	(cd $$i ; echo "making" all "in $(CURRENT_DIR)/$$i..."; \
	$(MAKE) $(MFLAGS) 'CDEBUGFLAGS=$(CDEBUGFLAGS)' all); \
	done

depend::
	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	for i in $(SUBDIRS) ;\
	do \
	(cd $$i ; echo "depending" "in $(CURRENT_DIR)/$$i..."; \
	$(MAKE) $(MFLAGS)  depend); \
	done

relink:
	$(RM) server/crossfire
	$(RM) client/crossclient
	$(RM) crossedit/crossedit
	$(RM) images/xbmtobdf
	$(MAKE) $(MKFLAGS) all

ifi:
	(cd common; $(MAKE) $(MKFLAGS) all)
	(cd server; $(MAKE) $(MKFLAGS) ifi)
	(cd client; $(MAKE) $(MKFLAGS) ifi)

	(cd images; $(MAKE) $(MKFLAGS) install)

maps:
	$(RM) $(VERSION).maps.tar.Z $(VERSION).maps.tar
	tar cvfh $(VERSION).maps.tar lib/README lib/archetypes lib/artifacts lib/treasures lib/mapindex lib/motd lib/maps lib/rplay.conf lib/sounds
	compress $(VERSION).maps.tar

ATOP = /tmp/$(VERSION)
TAR = gtar
archive: subarchive
	$(RM) $(VERSION).tar.Z
	(cd $(ATOP);cd ..;\
	$(RM) $(VERSION).tar $(VERSION).tar.Z;\
	$(TAR) cvfhz $(VERSION).tar.gz `$(BASENAME) $(ATOP)`;\
)
	$(MV) $(ATOP)/../$(VERSION).tar.gz .
	$(RM) -r $(ATOP)

subarchive::
	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	for i in $(SUBDIRS) ;\
	do \
	(cd $$i ; echo "archiving" "in $(CURRENT_DIR)/$$i..."; \
	$(MAKE) $(MFLAGS) 'ATOP=$(ATOP)' subarchive); \
	done

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

dist: archive

shar:
	$(RM) $(VERSION).shar.*
	shar -n $(VERSION) -a -s frankj@ifi.uio.no -c -o $(VERSION).shar -L50 $(FILES) $(SUBDIRS)

proto:
	(cd common; make proto)
	(cd client; make proto)
	(cd server; make proto)
	(cd crossedit; make proto)

clean::
	(cd include; $(RM) *~ *proto.h.orig)
	(cd crossedit; $(RM) *proto.h.orig)
	(cd client; $(RM) *proto.h.orig)

distclean: clean
	$(RM) */Makefile Makefile

love::
	@echo UmuwzG niCtB.  Kwzm lCuxml. | tr I-Za-zA-H A-Za-z

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

emptyrule::

clean::
	$(RM_CMD) "#"*

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

saber:
	# load $(ALLDEFINES) $(SRCS)

osaber:
	# load $(ALLDEFINES) $(OBJS)

# -------------------------------------------------------------------------
# rules for building in SUBDIRS - do not edit

install::
	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	for i in $(SUBDIRS) ;\
	do \
	(cd $$i ; echo "installing" "in $(CURRENT_DIR)/$$i..."; \
	$(MAKE) $(MFLAGS) DESTDIR='$(DESTDIR)' install); \
	done

install.man::
	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	for i in $(SUBDIRS) ;\
	do \
	(cd $$i ; echo "installing man pages" "in $(CURRENT_DIR)/$$i..."; \
	$(MAKE) $(MFLAGS) DESTDIR='$(DESTDIR)' install.man); \
	done

clean::
	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	for i in $(SUBDIRS) ;\
	do \
	(cd $$i ; echo "cleaning" "in $(CURRENT_DIR)/$$i..."; \
	$(MAKE) $(MFLAGS) RM_CMD='$(RM_CMD)' clean); \
	done

tags::
	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	for i in $(SUBDIRS) ;\
	do \
	(cd $$i ; echo "tagging" "in $(CURRENT_DIR)/$$i..."; \
	$(MAKE) $(MFLAGS) TAGS='$(TAGS)' tags); \
	done

Makefiles::
	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	for i in $(SUBDIRS) ;\
	do \
	echo "making Makefiles in $(CURRENT_DIR)/$$i..."; \
	case "$$i" in \
	./?*/?*/?*/?*) newtop=../../../../ sub=subsubsubsub;; \
	./?*/?*/?*) newtop=../../../ sub=subsubsub;; \
	./?*/?*) newtop=../../ sub=subsub;; \
	./?*) newtop=../ sub=sub;; \
	*/?*/?*/?*) newtop=../../../../ sub=subsubsubsub;; \
	*/?*/?*) newtop=../../../ sub=subsubsub;; \
	*/?*) newtop=../../ sub=subsub;; \
	*) newtop=../ sub=sub;; \
	esac; \
	case "$(TOP)" in \
	/?*) newtop= upprefix= ;; \
	*) upprefix=../ ;; \
	esac; \
	$(MAKE) $${sub}dirMakefiles UPPREFIX=$$upprefix NEWTOP=$$newtop \
	MAKEFILE_SUBDIR=$$i NEW_CURRENT_DIR=$(CURRENT_DIR)/$$i;\
	done

subdirMakefiles:
	$(RM) $(MAKEFILE_SUBDIR)/Makefile.bak
	-@if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then set -x; \
	$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \
	else exit 0; fi
	cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=$(UPPREFIX)$(TOP) -DCURDIR=$(NEW_CURRENT_DIR); \
	$(MAKE) $(MFLAGS) Makefiles

subsubdirMakefiles:
	$(RM) $(MAKEFILE_SUBDIR)/Makefile.bak
	-@if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then set -x; \
	$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \
	else exit 0; fi
	cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=$(UPPREFIX)$(UPPREFIX)$(TOP) -DCURDIR=$(NEW_CURRENT_DIR); \
	$(MAKE) $(MFLAGS) Makefiles

subsubsubdirMakefiles:
	$(RM) $(MAKEFILE_SUBDIR)/Makefile.bak
	-@if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then set -x; \
	$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \
	else exit 0; fi
	cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=$(UPPREFIX)$(UPPREFIX)$(UPPREFIX)$(TOP) -DCURDIR=$(NEW_CURRENT_DIR); \
	$(MAKE) $(MFLAGS) Makefiles

subsubsubsubdirMakefiles:
	$(RM) $(MAKEFILE_SUBDIR)/Makefile.bak
	-@if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then set -x; \
	$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \
	else exit 0; fi
	cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=$(UPPREFIX)$(UPPREFIX)$(UPPREFIX)$(UPPREFIX)$(TOP) -DCURDIR=$(NEW_CURRENT_DIR); \
	$(MAKE) $(MFLAGS) Makefiles

includes::
	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	for i in $(SUBDIRS) ;\
	do \
	(cd $$i ; echo including "in $(CURRENT_DIR)/$$i..."; \
	$(MAKE) $(MFLAGS)  includes); \
	done

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

/*   CrossFire, A Multiplayer game for X-windows
 *
 *   $Id: Imakefile,v 1.16 1995/11/13 07:59:12 master Exp master $
 *
 *   Copyright (C) 1992 Frank Tore Johansen
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program; if not, write to the Free Software
 *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 *   The author can be reached via e-mail to frankj@ifi.uio.no.
 */

IMAKE_DEFINES=-I$(NEWTOP)/.. -I$(NEWTOP)/config -I$(NEWTOP)
EXTRA_INCLUDES = -I/home/yoda/awrobel/include
EXTRA_LIBRARIES = -L/home/yoda/awrobel/lib
#include "config/crosssite.def"
#include "config/crossfire.tmpl"

MAKE = make
#define IHaveSubdirs

SUBDIRS = common doc server client utils crossedit include config lib

FILES = CHANGES CREDITS DEVELOPERS DONE Imakefile INSTALL License README \
	TODO 

AllTarget(emptyrule)

World::
	@echo ""
	@echo "Starting to build crossfire.  Time to start praying 8)"
	@echo ""
	@date
	@echo ""
	$(XMKMF)
	make Makefiles
	$(MAKE) $(MFLAGS) clean
	$(MAKE) $(MFLAGS) includes
	$(MAKE) $(MFLAGS) depend
	$(MAKE) $(MFLAGS) all
	@echo ""
	@date
	@echo ""
	@echo "Complete build of crossfire (hopefully) finished."
	@echo ""


MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))

relink:
	$(RM) server/crossfire
	$(RM) client/crossclient
	$(RM) crossedit/crossedit
	$(RM) images/xbmtobdf
	$(MAKE) $(MKFLAGS) all

ifi:
	(cd common; $(MAKE) $(MKFLAGS) all)
	(cd server; $(MAKE) $(MKFLAGS) ifi)
	(cd client; $(MAKE) $(MKFLAGS) ifi)
/*	(cd crossedit; $(MAKE) $(MKFLAGS) ifi)*/
	(cd images; $(MAKE) $(MKFLAGS) install)

maps:
	$(RM) $(VERSION).maps.tar.Z $(VERSION).maps.tar
	tar cvfh $(VERSION).maps.tar lib/README lib/archetypes lib/artifacts lib/treasures lib/mapindex lib/motd lib/maps lib/rplay.conf lib/sounds
	compress $(VERSION).maps.tar

PackArchive($(VERSION))

MakeArchive($(SUBDIRS))

InsertArchive($(FILES),.)

dist: archive

shar: /* Doesn't work anymore */
	$(RM) $(VERSION).shar.*
	shar -n $(VERSION) -a -s frankj@ifi.uio.no -c -o $(VERSION).shar -L50 $(FILES) $(SUBDIRS)

proto:
	(cd common; make proto)
	(cd client; make proto)
	(cd server; make proto)
	(cd crossedit; make proto)

clean::
	(cd include; $(RM) *~ *proto.h.orig)
	(cd crossedit; $(RM) *proto.h.orig)
	(cd client; $(RM) *proto.h.orig)

distclean: clean
	$(RM) */Makefile Makefile

love::
	@echo UmuwzG niCtB.  Kwzm lCuxml. | tr I-Za-zA-H A-Za-z