## -*- Mode: makefile -*-
## 
## $Source: /n/manic/u/hucka/Projects/Soar/Interface/Src/RCS/Makefile,v $
## $Id: Makefile,v 0.2 1993/06/11 05:24:27 hucka Exp hucka $
## 
## Description       : Makefile for SDE
## Original author(s): Michael Hucka <hucka@pelican.eecs.umich.edu>
## Organization      : University of Michigan AI Lab
## 
## To use this makefile, first check the name of your emacs.  Then:
##
## 1) If the name of your emacs executable is the same as the
##    value of the definition of "EMACS" below, then you can make
##    this system by simply typing "make" in a shell.
##
## 2) If the name of your emacs executable is different, then
##    can make this system by typing
##               make EMACS=xxxx
##    where "xxxx" is the name of your emacs executable.

EMACS   = emacs

OBJS    = sde.elc \
	  sde-soar-mode.elc \
	  sde-find.elc \
	  sde-x-mouse.elc \
	  sde-compat.elc \
	  sde-header.elc \
	  sde-version.elc

EXTRAOBJS = gmhist.elc \
	  comint.elc \
	  header.elc \
	  popper.elc \
	  completer.elc \
	  help-screen.elc \
	  reporter.elc

SRCS    = sde.el \
	  sde-soar-mode.el \
	  sde-find.el \
	  sde-x-mouse.el \
	  sde-compat.el \
	  sde-header.el \
	  sde-version.el \
	  sde-site.el \
	  gmhist.el \
	  gmhist-app.el \
	  background.el \
	  comint.el \
	  cmushell.el \
          completer.el \
	  header.el \
	  popper.el \
	  epoch-pop.el \
	  completer.el \
	  help-screen.el \
	  reporter.el

MISC 	= COPYING \
	  Makefile \
	  README \
	  REFCARD \
	  RELEASE-NOTES \
	  completer.lcd \
	  popper.lcd \
	  epoch-pop.lcd \
	  gmhist.README \
	  gmhist.texi.Z

all:	${EXTRAOBJS} ${OBJS} tags

package: ${SRCS} ${MISC}
	rm -f sde.tar sde.tar.Z
	tar cLf sde.tar ${SRCS} ${MISC}
	compress sde.tar

clean:
	rm -f ${OBJS} ${EXTRAOBJS} TAGS

tags:
	etags *.el

.SUFFIXES: .elc .el .tar .Z .uu

${EXTRAOBJS}:
	${EMACS} -batch -q -f batch-byte-compile $(@:.elc=.el)

BASICLOADS =  -l ./gmhist.elc -l ./help-screen.elc -l ./comint.elc -l ./sde-version.el -l ./sde.elc

.el.elc:
	${EMACS} -batch -q ${BASICLOADS} -f batch-byte-compile $(@:.elc=.el)


# Special rules.

sde-version.elc:
	${EMACS} -batch -q -f batch-byte-compile sde-version.el

sde.elc:  
	${EMACS} -batch -q -l ./gmhist.elc -l ./help-screen.elc -l ./sde-version.elc -f batch-byte-compile sde.el

sde-header.elc:
	${EMACS} -batch -q ${BASICLOADS} -l ./header.elc  -f batch-byte-compile sde-header.el


# Dependencies.

sde.elc:            sde-version.elc gmhist.elc help-screen.elc sde.el 
sde-soar-mode.elc:  sde.elc comint.elc sde-soar-mode.el 
sde-find.elc:       sde.elc sde-find.el
sde-x-mouse.elc:    sde.elc sde-x-mouse.el
sde-compat.elc:     sde.elc sde-compat.el
sde-header.elc:     header.elc sde-header.el
