# $Id: Makefile,v 1.2 95/01/13 05:39:10 jhawk Exp $

BUILDDIR=/build
SRCDIR=/afs/sipb/project/sipb-athena
CONFIGDIR=$(SRCDIR)/config

nothing:
	@echo "Make nothing. This script is still being tested."

all: AL dash delete gms hesiod kerberos mh moira olc

# These with Athena Imakefiles
delete gms hesiod AL:
	@echo Building link tree for $@
	(mkdir $(BUILDDIR)/$@;						\
	  lndir /afs/sipb/project/sipb-athena/$@ $(BUILDDIR)/$@)
	@echo Running imake for $@
	(cd $(BUILDDIR)/$@; imake -I$(CONFIGDIR))
	@echo Making $@
	(cd $(BUILDDIR)/$@; make all)
# Athena Imakefilles AND BSD Makefiles beneath
mh telnet:
	@echo Building link tree for $@
	(mkdir $(BUILDDIR)/$@;						\
	  lndir /afs/sipb/project/sipb-athena/$@ $(BUILDDIR)/$@)
	@echo Running imake for $@
	(cd $(BUILDDIR)/$@; imake -I$(CONFIGDIR))
	@echo Makeing Makefiles
	(cd $(BUILDDIR)/$@; make Makefiles)
	@echo Making $@
	(cd $(BUILDDIR)/$@; make all)

# These with custom (?) Imakefiles
moira olc:
	@echo Building link tree for $@
	(mkdir $(BUILDDIR)/$@;						\
	  lndir /afs/sipb/project/sipb-athena/$@ $(BUILDDIR)/$@)
	@echo Running imake for $@
	(cd $(BUILDDIR)/$@; imake -Iconfig)
	@echo Makeing Makefiles
	(cd $(BUILDDIR)/$@; make Makefiles)
	@echo Making $@
	(cd $(BUILDDIR)/$@; make all)

#More custom stuff.
zephyr:
	@echo Building link tree for $@
	(mkdir $(BUILDDIR)/$@;						\
	  lndir /afs/sipb/project/sipb-athena/$@ $(BUILDDIR)/$@)
	@echo Running xmkmf for $@
	(cd $(BUILDDIR)/$@; xmkmf `pwd`)
	@echo Makeing Makefiles
	(cd $(BUILDDIR)/$@; make Makefiles)
	@echo Making $@
	(cd $(BUILDDIR)/$@; make all)

# These with X11 Imakefiles
dash:
	@echo Building link tree for $@
	(mkdir $(BUILDDIR)/$@;						\
	  lndir /afs/sipb/project/sipb-athena/$@ $(BUILDDIR)/$@)
	@echo Running xmkmf for $@
	(cd $(BUILDDIR)/$@; xmkmf)
	@echo Makeing Makefiles
	(cd $(BUILDDIR)/$@; make Makefiles)
	@echo Making $@
	(cd $(BUILDDIR)/$@; make all)

# These with configure:
kerberos:
	@echo I'm current broken, sorry :-(
#	@echo Building link tree for $@
#	(mkdir $(BUILDDIR)/$@;						\
#	  lndir /afs/sipb/project/sipb-athena/$@ $(BUILDDIR)/$@)
#	@echo Running configure
#	(cd $(BUILDDIR)/$@; ./configure --site=athena)
#	@echo Making $@
	