# Makefile generated by imake - do not edit!
# $XConsortium: imake.c,v 1.89 94/08/12 00:45:51 gildea Exp $

# -----------------------------------------------------------------------
# Makefile generated from "Imake.tmpl" and </tmp/IIf.a02433>
# $XConsortium: Imake.tmpl,v 1.220 94/08/30 17:25:36 matt Exp $
# $XFree86: xc/config/cf/Imake.tmpl,v 3.4 1994/09/24 15:09:46 dawes Exp $
#

.SUFFIXES: .i

# $XConsortium: Imake.cf,v 1.12 94/03/29 15:42:08 gildea Exp $
# $XFree86: xc/config/cf/Imake.cf,v 3.5 1994/09/24 15:09:40 dawes Exp $

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

# site:  $XConsortium: site.sample,v 1.9 94/04/08 17:02:06 rws Exp $
# site:  $XFree86: xc/config/cf/site.def,v 3.4 1994/05/29 02:01:47 dawes Exp $

# $XFree86: xc/config/cf/xf86site.def,v 3.16 1994/09/25 12:20:24 dawes Exp $

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

# platform:  $XConsortium: linux.cf,v 1.4 94/04/07 15:46:42 rws Exp $
# platform:  $XFree86: xc/config/cf/linux.cf,v 3.11 1994/09/19 13:36:22 dawes Exp $

# $XConsortium: lnxLib.rules,v 1.2 94/03/31 11:37:29 gildea Exp $
# $XFree86: xc/config/cf/lnxLib.rules,v 3.5 1994/09/11 06:53:26 dawes Exp $

# $XConsortium: xfree86.cf,v 1.2 94/03/31 11:37:26 gildea Exp $
# $XFree86: xc/config/cf/xfree86.cf,v 3.24 1994/09/25 12:20:27 dawes Exp $

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

XF86INIT   = $(XF86COMSRC)/xf86Init.o
XF86MINIT  = $(XF86COMSRC)/xf86Init_m.o
XF86CONFIG = $(XF86CONFIGSRC)/xf86_Option.o
XF86COMLIB = $(XF86COMSRC)/libxf86.a
XF86OSLIB  = $(XF86OSSRC)/libxf86_os.a
XF86HWLIB  = $(XF86HWSRC)/libxf86_hw.a
XF86LIBS   = $(XF86INIT) $(XF86CONFIG) $(XF86COMLIB) $(XF86HWLIB) $(XF86OSLIB)
XF86MLIBS  = $(XF86MINIT) $(XF86CONFIG) $(XF86COMLIB) $(XF86HWLIB) $(XF86OSLIB)

# $XConsortium: xf86.rules,v 1.1 94/03/29 15:34:48 gildea Exp $
# $XFree86: xc/config/cf/xf86.rules,v 3.1 1994/05/30 08:17:53 dawes Exp $

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

# site:  $XConsortium: site.sample,v 1.9 94/04/08 17:02:06 rws Exp $
# site:  $XFree86: xc/config/cf/site.def,v 3.4 1994/05/29 02:01:47 dawes Exp $

# -----------------------------------------------------------------------
# Imake rules for building libraries, programs, scripts, and data files
# rules:  $XConsortium: Imake.rules,v 1.194 94/08/30 17:25:36 matt Exp $
# rules:  $XFree86: xc/config/cf/Imake.rules,v 3.5 1994/09/24 15:09:43 dawes Exp $

 _NULLCMD_ = @ echo -n

          PATHSEP = /
            SHELL = 	/bin/sh

              TOP = .
      CURRENT_DIR = .

            IMAKE = imake
           DEPEND = makedepend
        MKDIRHIER = mkdirhier
        CONFIGSRC = $(TOP)/config
         IMAKESRC = $(CONFIGSRC)/imake
        DEPENDSRC = $(CONFIGSRC)/makedepend
           IXXSRC = $(UNSUPPORTEDSRC)/programs/ixx
              IXX = ixx
         IXXFLAGS = -s BaseObject -m TypeObj -r RequestObj -p Xf
      IXXINCLUDES = -i '<X11/Fresco/enter-scope.h>'

          INCROOT = /usr/X11R6/include
        USRLIBDIR = /usr/X11R6/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 = g++
    CXXDEBUGFLAGS = -O2 -m486
 CXXEXTRA_DEFINES =
CXXEXTRA_INCLUDES =
  CXXIDL_INCLUDES = -I$(TOP)/include
   CXXSTD_DEFINES = 		-Dlinux -D__i386__ -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE
       CXXOPTIONS =
      CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES) $(CXXIDL_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
               CP = cp

           RANLIB = ranlib
  RANLIBINSTFLAGS =

               RM = rm -f
        MANSUFFIX = 1x
     LIBMANSUFFIX = 3x
    FILEMANSUFFIX = 5x
            TROFF = psroff
         MSMACROS = -ms
              TBL = tbl
              EQN = eqn

     STD_INCLUDES =
  STD_CPP_DEFINES = -traditional 		-Dlinux -D__i386__ -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE
      STD_DEFINES = 		-Dlinux -D__i386__ -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE
 EXTRA_LOAD_FLAGS =
  EXTRA_LDOPTIONS =
  EXTRA_LIBRARIES =
             TAGS = ctags

    SHAREDCODEDEF =
         SHLIBDEF =

     SHLIBLDFLAGS =

         PICFLAGS = -B/usr/bin/jump

      CXXPICFLAGS = -B/usr/bin/jump

    PROTO_DEFINES = -DFUNCPROTO=15 -DNARROWPROTO

     INSTPGMFLAGS = -s

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

      PROJECTROOT = /usr/X11R6

     TOP_INCLUDES = -I$(INCROOT)

      CDEBUGFLAGS = -O2 -m486
        CCOPTIONS = -ansi  -DNO_ASM

      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 =

        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 $(EXTRA_ICONFIGFILES)

# -----------------------------------------------------------------------
# X Window System Build Parameters and Rules
# $XConsortium: Project.tmpl,v 1.244 94/08/17 18:57:34 matt Exp $
# $XFree86: xc/config/cf/Project.tmpl,v 3.5 1994/09/17 13:38:29 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
           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
       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.1 94/03/29 15:34:47 gildea Exp $
# $XFree86: xc/config/cf/lnxLib.tmpl,v 3.1 1994/07/16 10:18:41 dawes Exp $

SHLIBLDFLAGS =
PICFLAGS = -B/usr/bin/jump

          XLIBSRC = $(LIBSRC)/X11

SOXLIBREV = 6.0
DEPXONLYLIB =
XONLYLIB =  -lX11

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

         XLIBONLY = $(XONLYLIB)

      XEXTLIBSRC = $(LIBSRC)/Xext
   LBXXEXTLIBSRC = $(TOP)/workInProgress/lbx/lib/Xext

    XEXEXTLIBSRC = $(LIBSRC)/XExExt

SOXEXTREV = 6.0
DEPXEXTLIB =
XEXTLIB =  -lXext

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

SOXEXTREV = 6.0
DEPLBXXEXTLIB =
LBXXEXTLIB =  -llbxXext

LINTLBXXEXT = $(LINTLIBDIR)/llib-llbxXext.ln

DEPXEXEXTLIB = $(USRLIBDIR)/libXExExt.a
XEXEXTLIB =  -lXExExt

LINTXEXEXT = $(LINTLIBDIR)/llib-lXExExt.ln

     EXTENSIONLIB = $(XEXEXTLIB) $(XEXTLIB)
  DEPEXTENSIONLIB = $(DEPXEXEXTLIB) $(DEPXEXTLIB)
    LINTEXTENSION = $(LINTXEXEXT) $(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.0
DEPXAWLIB =
XAWLIB =  -lXaw

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

       XTFSRC = $(TOP)/workInProgress/Xtf

SOXTFREV = 0.7
DEPXTFLIB =
XTFLIB =  -lXtf

LINTXTF = $(LINTLIBDIR)/llib-lXtf.ln

       FRESCOSRC = $(TOP)/workInProgress/Fresco

SOFRESCOREV = 0.7
DEPFRESCOLIB =
FRESCOLIB =  -lFresco

LINTFRESCO = $(LINTLIBDIR)/llib-lFresco.ln

         XILIBSRC = $(LIBSRC)/Xi

SOXINPUTREV = 6.0
DEPXILIB =
XILIB =  -lXi

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

      XTESTLIBSRC = $(LIBSRC)/Xtst

SOXTESTREV = 6.0
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

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

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

        CONFIGDIR = $(LIBDIR)/config

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

# =====================================================================
# Imakefile - XGalaga v1.5 - ogre@netcom.com - July 7, 1995
# =====================================================================

# This is the only line you should have to change.  the high scores
# file will be written in this directory, change SCOREFILE to put
# it somewhere else or change the name.  The sounds directory and
# sound server executable also reside here if sound is supported on
# your system.  If not doing "make install", set this to where the
# files are now.

    XGALAGADIR = /usr/games/xgalaga

    SCOREFILE    	= $(XGALAGADIR)/.xgalscores
    SOUNDDIR		= $(XGALAGADIR)/sounds

# You can get libXpm from ftp.x.org.  If it is already installed
# with the standard X libs, you shouldn't need to change this.
# otherwise make these point at wherever you put it.

    XPMLIB 		= -lXpm
    XPMINCLUDE 		= -I/usr/include/X11

    XSPRITELIB          = -L./libsprite -lXsprite

# Should be defined automatically for appropriate systems
# #define SOUND

# Or, if you prefer, you can define NAS_SOUND for network audio
# #define NAS_SOUND

# define NOSCOREHOGS to make the high scores only allow one global
# high score per user.  So if you're at a large site, and one guy
# is 10x better than everyone else, he will just have the #1 score
# instead of all 20.
# Note that if you are upgrading from an old version and want to use
# this option, you will have to delete your old global high score file.
# #define NOSCOREHOGS

# define REALNAME if you'd rather have real names (From the passwd file)
# be used for high scores (if you don't define it, you will be prompted
# for a name when you get a high score)
# #define REALNAME

# You should not have to change IMAGEDIR unless you rerun
# mkimgsrc and set it to not compile images in.  IE
# don't mess with this unless you know what it does.

    IMAGEDIR            = $(XGALAGADIR)/images

# use gcc if at all possible.  If you can't make sure you set this
# to an ANSI compiler!
    CC = gcc

# **** System specific preprocessor flags.  If yours isn't here,
# **** and you need something changed, tell me about it!

    SYSDEFS = -Wall

    SOUNDSERVER = xgal.sndsrv.linux
    SOUNDOBJS = sound.o
    SOUNDDEV = /dev/dsp

# # ***********************************************************
# # ---> You shouldn't need to change anything below this <----
# # ***********************************************************

    EXTRA_INCLS = $(XPMINCLUDE)

    NAMEDEF =

    HOGDEF =

    INSTALLSOUND = True

    DEFINES = $(EXTRA_INCLS) $(SYSDEFS) -DSOUND $(NAMEDEF) $(HOGDEF)	-DSCOREFILE=\"$(SCOREFILE)\" 	-DIMAGEDIR=\"$(IMAGEDIR)\" 	-DSOUNDSERVER=\"$(XGALAGADIR)/$(SOUNDSERVER)\" 	-DSOUNDDIR=\"$(SOUNDDIR)\" 	-DSOUNDDEV=\"$(SOUNDDEV)\"

    LOCAL_LIBRARIES = $(XSPRITELIB) $(XPMLIB) $(NASLIB) $(XLIB)  -lm

    DEPLIBS = $(DEPXLIB) libsprite/libXsprite.a

    OBJS1 = main.o images.o data.o paths.o title.o 	explosions.o score.o highscore.o prize.o $(SOUNDOBJS)

    SRCS1 = `echo $(OBJS1) | sed -e 's/\.o/.c/g'`

    PROGRAMS = xgal

SUBDIRS       = libsprite

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

Makefiles::
	-@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	case '${MFLAGS}' in *n*) executeit="no";; esac; \
	for i in $(SUBDIRS) ;\
	do \
	case "$(CURRENT_DIR)" in \
	.) curdir= ;; \
	*) curdir=$(CURRENT_DIR)/ ;; \
	esac; \
	echo "making Makefiles in $$curdir$$i..."; \
	case "$$i" in \
	../../?*/?*/?*/?*/?*/?*) newtop=../../../.. ;; \
	../../?*/?*/?*/?*/?*)	 newtop=../../.. ;; \
	../../?*/?*/?*/?*)	 newtop=../.. ;; \
	../../?*/?*/?*)		 newtop=.. ;; \
	../../?*/?*)		 newtop=. ;; \
	../?*/?*/?*/?*/?*)	 newtop=../../../..;; \
	../?*/?*/?*)		 newtop=../../..;; \
	../?*/?*/?*)		 newtop=../..;; \
	../?*/?*)		 newtop=..;; \
	../?*)			 newtop=. ;; \
	./?*/?*/?*/?*)	newtop=../../../..;; \
	./?*/?*/?*)	newtop=../../..;; \
	./?*/?*)	newtop=../..;; \
	./?*)		newtop=..;; \
	*/?*/?*/?*)	newtop=../../../..;; \
	*/?*/?*)	newtop=../../..;; \
	*/?*)		newtop=../..;; \
	*)		newtop=..;; \
	esac; \
	case "$(TOP)" in \
	/?*) imaketop=$(TOP) \
	imakeprefix= ;; \
	.) imaketop=$$newtop \
	imakeprefix=$$newtop/ ;; \
	*) imaketop=$$newtop/$(TOP) \
	imakeprefix=$$newtop/ ;; \
	esac; \
	(cd $$i; \
	$(RM) Makefile.bak; \
	if [ -f Makefile ]; then \
	echo "	$(MV) Makefile Makefile.bak"; \
	if [ "$$executeit" != "no" ]; then \
	$(MV) Makefile Makefile.bak; \
	fi; \
	fi; \
	if [ "$$executeit" != "no" ]; then \
	$(IMAKE_CMD) -DTOPDIR=$$imaketop -DCURDIR=$$curdir$$i; \
	fi; \
	$(MAKE) $(MFLAGS) Makefiles;) \
	done

 OBJS = $(OBJS1) $(OBJS2) $(OBJS3)
 SRCS = $(SRCS1) $(SRCS2) $(SRCS3)

all:: $(PROGRAMS)

$(PROGRAMS): $(OBJS1) $(DEPLIBS1)
	$(RM) $@
	$(CCLINK) -o $@ $(LDOPTIONS) $(OBJS1)  $(LOCAL_LIBRARIES) $(LDLIBS)   $(EXTRA_LOAD_FLAGS)

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

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

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

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

clean::
	$(RM) $(PROGRAMS)

$(SOUNDSERVER):  $(SOUNDSERVER).o
	$(RM) $@
	$(CCLINK) -o $@ $(LDOPTIONS)  $(SOUNDSERVER).o  $(LDLIBS)  $(EXTRA_LOAD_FLAGS)

clean::
	$(RM) $(SOUNDSERVER)

# libsprite/libXsprite.a:
# 	cd libsprite ; xmkmf ; make

install:: $(PROGRAMS) $(SOUNDSERVER)
	@echo "XGalaga directory is " $(XGALAGADIR)
	@:
	@echo "Creating directory " $(XGALAGADIR)
	@if [ ! -d $(XGALAGADIR) ]; then mkdir $(XGALAGADIR); fi
	@echo "Making an empty high score file"
	@touch $(SCOREFILE)
	@chmod a+rw $(SCOREFILE)
	@:
	@if [ "$(INSTALLSOUND)" = "True" ]; 					 then										echo "Creating directory " $(SOUNDDIR); 				if [ ! -d $(SOUNDDIR) ]; then mkdir $(SOUNDDIR); fi;    		echo "Copying sound server to directory " $(SOUNDDIR); 		$(INSTALL) -c -s $(INSTBINFLAGS) $(SOUNDSERVER) $(XGALAGADIR); 		echo "Copying sound files into directory " $(SOUNDDIR); 		cd ./sounds; set -x;							for file in *.raw; do							    $(INSTALL) -c $(INSTDATFLAGS) $$file $(SOUNDDIR);			done;   							 fi

all:: $(SOUNDSERVER)

clean::
	cd libsprite ; make clean

dist:
	@make clean
	@rm -f $(EXE) TAGS core
	@makedepend
	@:
	cd .. ; tar czvf $(PROGRAMS).tar.gz $(PROGRAMS)/

proto:
	@cproto $(CDEFS) $(INCLUDEDIRS) $(SRCS) > proto.h

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

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

emptyrule::

clean::
	$(RM_CMD) *.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

# -----------------------------------------------------------------------
# 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

# DO NOT DELETE

main.o: copyright.h /usr/include/stdio.h /usr/include/libio.h
main.o: /usr/include/_G_config.h /usr/include/sys/cdefs.h
main.o: /usr/include/stdlib.h /usr/include/features.h /usr/include/stddef.h
main.o: /usr/include/errno.h /usr/include/linux/errno.h /usr/include/float.h
main.o: /usr/include/alloca.h /usr/include/sys/time.h
main.o: /usr/include/linux/types.h /usr/include/asm/types.h
main.o: /usr/include/linux/time.h /usr/include/sys/time.h
main.o: /usr/include/sys/types.h /usr/include/unistd.h
main.o: /usr/include/posix_opt.h /usr/include/gnu/types.h libsprite/Wlib.h
main.o: /usr/X11R6/include/X11/Xlib.h /usr/X11R6/include/X11/X.h
main.o: /usr/X11R6/include/X11/Xfuncproto.h /usr/X11R6/include/X11/Xosdefs.h
main.o: copyright2.h Wproto.h data.h Wlib.h images.h defs.h struct.h paths.h
main.o: proto.h sound.h
images.o: /usr/include/stdlib.h /usr/include/features.h
images.o: /usr/include/sys/cdefs.h /usr/include/stddef.h /usr/include/errno.h
images.o: /usr/include/linux/errno.h /usr/include/float.h
images.o: /usr/include/alloca.h Wlib.h Wproto.h images.h struct.h proto.h
data.o: Wlib.h Wproto.h images.h defs.h data.h struct.h
paths.o: struct.h Wlib.h Wproto.h defs.h paths.h data.h proto.h
title.o: /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h
title.o: /usr/include/sys/cdefs.h Wlib.h Wproto.h defs.h images.h data.h
title.o: struct.h proto.h
explosions.o: /usr/include/stdlib.h /usr/include/features.h
explosions.o: /usr/include/sys/cdefs.h /usr/include/stddef.h
explosions.o: /usr/include/errno.h /usr/include/linux/errno.h
explosions.o: /usr/include/float.h /usr/include/alloca.h Wlib.h Wproto.h
explosions.o: images.h struct.h data.h proto.h sound.h
score.o: /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h
score.o: /usr/include/sys/cdefs.h Wlib.h Wproto.h images.h data.h defs.h
score.o: struct.h proto.h
highscore.o: /usr/include/stdio.h /usr/include/libio.h
highscore.o: /usr/include/_G_config.h /usr/include/sys/cdefs.h
highscore.o: /usr/include/stdlib.h /usr/include/features.h
highscore.o: /usr/include/stddef.h /usr/include/errno.h
highscore.o: /usr/include/linux/errno.h /usr/include/float.h
highscore.o: /usr/include/alloca.h /usr/include/sys/types.h
highscore.o: /usr/include/linux/types.h /usr/include/asm/types.h
highscore.o: /usr/include/unistd.h /usr/include/posix_opt.h
highscore.o: /usr/include/gnu/types.h /usr/include/sys/stat.h
highscore.o: /usr/include/linux/stat.h /usr/include/fcntl.h
highscore.o: /usr/include/linux/fcntl.h /usr/include/ctype.h
highscore.o: /usr/include/pwd.h /usr/include/string.h
highscore.o: /usr/include/netinet/in.h /usr/include/sys/socket.h
highscore.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
highscore.o: /usr/include/linux/in.h /usr/include/asm/byteorder.h Wlib.h
highscore.o: Wproto.h defs.h struct.h proto.h data.h
prize.o: /usr/include/stdlib.h /usr/include/features.h
prize.o: /usr/include/sys/cdefs.h /usr/include/stddef.h /usr/include/errno.h
prize.o: /usr/include/linux/errno.h /usr/include/float.h
prize.o: /usr/include/alloca.h Wlib.h Wproto.h images.h struct.h data.h
prize.o: defs.h proto.h sound.h
sound.o: /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h
sound.o: /usr/include/sys/cdefs.h /usr/include/stdlib.h
sound.o: /usr/include/features.h /usr/include/stddef.h /usr/include/errno.h
sound.o: /usr/include/linux/errno.h /usr/include/float.h
sound.o: /usr/include/alloca.h /usr/include/unistd.h /usr/include/posix_opt.h
sound.o: /usr/include/gnu/types.h /usr/include/sys/types.h
sound.o: /usr/include/linux/types.h /usr/include/asm/types.h
sound.o: /usr/include/sys/time.h /usr/include/linux/time.h
sound.o: /usr/include/sys/time.h /usr/include/fcntl.h
sound.o: /usr/include/linux/fcntl.h /usr/include/signal.h
sound.o: /usr/include/linux/signal.h /usr/include/sys/stat.h
sound.o: /usr/include/linux/stat.h data.h Wlib.h Wproto.h
