# Makefile generated by imake - do not edit!
# $XConsortium: imake.c,v 1.51 89/12/12 12:37:30 jim 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.
#

SHELL=/bin/sh
MAKESHELL=/bin/sh

TOP = .
CWD = .
CONFIGSRC = /source/config
DESTDIR=

IRULESRC = $(CONFIGSRC)

IMAKE= imake
IFLAGS= -I$(IRULESRC) -DTOPDIR=/source
XIFLAGS= -I$(ATHXLIBDIR)/X11/config -DUseInstalled

ICONFIGFILE = ${IRULESRC}/Imake.tmpl ${IRULESRC}/Imake.rules \
	${IRULESRC}/site.def Imakefile
MKDIRHIER= sh $(IRULESRC)/mkdirhier.sh

ATHVERS = ${IRULESRC}/update.conf

ATHBASEDIR=/usr/athena

ATHLIBDIR=$(ATHBASEDIR)/lib
ATHBINDIR=$(ATHBASEDIR)/bin
ATHINCDIR=$(ATHBASEDIR)/include
ATHETCDIR=$(ATHBASEDIR)/etc
ATHCONFDIR=/etc/athena
ATHMANDIR=$(ATHBASEDIR)/man
ATHRBINDIR=/bin/athena
ATHRETCDIR=/etc/athena

ATHNEWDIR=$(ATHBINDIR)

ATHXAPPDIR=/usr/athena/lib/X11/app-defaults
ATHXBITDIR=/usr/athena/lib/X11/bitmaps
ATHXINCDIR=/usr/athena/include
ATHXLIBDIR=/usr/athena/lib

LINTCFLAG=-C
LINTFLAGS=$(DEFINES) -I/usr/athena/include

INSTALL=install -c
RANLIB=ranlib
CC=cc
LD=cc
AS=as
RM=rm -f
CDEBUG=-O2

CFLAGS=$(CDEBUG)  $(DEFINES) -I/usr/athena/include
LDFLAGS= $(LDDEFS)
LDPATH=-L$(ATHLIBDIR)
LDLIBS=

all::
install:: install_dirs
install_dirs::
install:: install.man
install.man::

clean::
depend::

FRC::

###########################################################################
# Project inclusion
###########################################################################

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

#
#       Makefile for UTREE 3.03-um
#       klin, Sun Feb 16 16:35:52 1992
#
#       Steps to create an utree executable:
#       - First check src/Makefile if all definitions are correct for
#         your system. There are some Makefiles for SYSV.2, SYSV.3 and
#         BSD. Check and change the correct Makefile for your system and
#         copy it to Makefile.
#       - Then check src/conf.h if all definitions are correct for
#         your system. There are some conf.h for SYSV.2, SYSV.3 and
#         BSD. Check and change the correct conf.h for your system and
#         copy it to conf.h.
#       - Call make or make utree to create utree. The executable
#         is written into the bin directory. Test utree.
#
#       Steps to create utree man page:
#       - Check all manual definitions in this Makefile and change them if
#         needed.
#       - Call make man to create the utree manual page if your
#         systems needs formatted and/or packed manual pages.
#
#       Steps to install utree:
#       - Check all install definitions in this Makefile and change them if
#         needed.
#       - Call make install to install utree executables and manual
#         page (you must be super user to do this).
#

# --------------------------------------------------------------------- #

# Utree executables
#   The utree utility
UTREE=utree
#   The tree list formatter
UTPRL=utree.prlist

# Utree support shell scripts
UHELP=  utree.help      # Utree help pages
UBACK=  utree.backup    # Utree backup shell script
ULIST=  utree.mklist    # Create directory lists for quicker startup

UTMAN=  utree.1         # Utree man page
UPMAN=  utree.prlist.1  # Utree.prlist man page

# --------------------------------------------------------------------- #

# Create utree executable

all::    $(UTREE) $(UTPRL) strip

clean::	clean.real
	( cd src; make -f ../Makefile clean.real )
	( cd bin; make -f ../Makefile clean.real )

clean.real:
	-rm -f *.o *.BAK *.CKP *~
	-rm -f core $(UTREE) $(UTPRL)

# Compile and link utree executables
$(UTREE):
	@echo "Make $(UTREE)"
	cd src; make $@

$(UTPRL):
	@echo "Make $(UTPRL)"
	cd src; make $@

# Strip off symbols
strip:
	@echo "Make stripped $(UTREE)"
	cd src; make $@

# --------------------------------------------------------------------- #

# Utree manual pages. Edit and change the following lines if needed!

# Commands needed for utree manual page
TBL=    tbl
NROFF=  nroff
CP=     cp
RM=     rm
PACK=   pack
COMP=   compress

man:
# Unformatted manual pages
	$(CP)   doc/utree.m        doc/$(UTMAN).1
	$(CP)   doc/utree.prlist.m doc/$(UPMAN).1
# Formatted manual pages
#        $(TBL)  doc/utree.m        | $(NROFF) -man > doc/$(UTMAN)
#        $(TBL)  doc/utree.prlist.m | $(NROFF) -man > doc/$(UPMAN)
# Packed formatted manual pages
#         $(RM)   -f doc/$(UTMAN).z doc/$(UPMAN).z
#         $(PACK) doc/$(UTMAN) doc/$(UPMAN)
# Compressed formatted manual pages
#        $(RM)   -f doc/$(UTMAN).Z doc/$(UPMAN).Z
#        $(COMP) doc/$(UTMAN) doc/$(UPMAN)

# --------------------------------------------------------------------- #

# Install utree. Change the following lines if needed!
# WARNING: You must be super user to do this!

# Bin, lib and man directories for utree files
BINDIR= $(DESTDIR)/usr/sipb/bin
LIBDIR= $(DESTDIR)/usr/sipb/lib
MANDIR= $(DESTDIR)/usr/sipb/man/man1
#MANDIR= /usr/local/man/cat1

# Commands needed for installation of utree files
CHMOD=  chmod
CHOWN=  chown
CHGRP=  chgrp
MKDIR=	mkdir -p

# Access modes and owner/group of utree binaries, help and man pages
XMODE=  0755
RMODE=  0644
OWNER=  bin
GROUP=  bin

# Sorry, not all UNIXes have the (BSD) install utility!
install::
	@echo "Install $(UTREE)"
	-test -d $(BINDIR) || $(MKDIR) $(BINDIR)
	-test -d $(LIBDIR) || $(MKDIR) $(LIBDIR)
	-test -d $(MANDIR) || $(MKDIR) $(MANDIR)
	$(CP)    bin/$(UTREE) $(BINDIR)
	$(CHMOD) $(XMODE)     $(BINDIR)/$(UTREE)
#	$(CHOWN) $(OWNER)     $(BINDIR)/$(UTREE)
#	$(CHGRP) $(GROUP)     $(BINDIR)/$(UTREE)
	@echo "Install $(UTPRL)"
	$(CP)    bin/$(UTPRL) $(BINDIR)
	$(CHMOD) $(XMODE)     $(BINDIR)/$(UTPRL)
#	$(CHOWN) $(OWNER)     $(BINDIR)/$(UTPRL)
#	$(CHGRP) $(GROUP)     $(BINDIR)/$(UTPRL)
	@echo "Install $(UHELP) in $(LIBDIR)"
	$(CP)    lib/$(UHELP) $(LIBDIR)
	$(CHMOD) $(RMODE)     $(LIBDIR)/$(UHELP)
#	$(CHOWN) $(OWNER)     $(LIBDIR)/$(UHELP)
#	$(CHGRP) $(GROUP)     $(LIBDIR)/$(UHELP)
	@echo "Install $(UBACK) in $(BINDIR)"
	$(CP)    bin/$(UBACK) $(BINDIR)
	$(CHMOD) $(XMODE)     $(BINDIR)/$(UBACK)
#	$(CHOWN) $(OWNER)     $(BINDIR)/$(UBACK)
#	$(CHGRP) $(GROUP)     $(BINDIR)/$(UBACK)
	@echo "Install $(ULIST) in $(BINDIR)"
	$(CP)    bin/$(ULIST) $(BINDIR)
	$(CHMOD) $(XMODE)     $(BINDIR)/$(ULIST)
#	$(CHOWN) $(OWNER)     $(BINDIR)/$(ULIST)
#	$(CHGRP) $(GROUP)     $(BINDIR)/$(ULIST)
	@echo "Install $(UTMAN) $(UPMAN) in $(MANDIR)"
	$(CP)    doc/$(UTMAN) doc/$(UPMAN) $(MANDIR)
	$(CHMOD) $(RMODE)    $(MANDIR)/$(UTMAN) $(MANDIR)/$(UPMAN)
#	$(CHOWN) $(OWNER)    $(MANDIR)/$(UTMAN) $(MANDIR)/$(UPMAN)
#	$(CHGRP) $(GROUP)    $(MANDIR)/$(UTMAN) $(MANDIR)/$(UPMAN)

# --------------------------------------------------------------------- #

Makefile:: $(ICONFIGFILE)
	-@if [ -f Makefile ]; then \
	echo "  $(RM) Makefile.bak; mv Makefile Makefile.bak"; \
	$(RM) Makefile.bak; mv Makefile Makefile.bak; \
	else exit 0; fi
	$(IMAKE) $(IFLAGS) $(IPROJ) -DNEWTOP=$(TOP) -DNEWCWD=$(CWD)

XMakefile::
	-@if [ -f Makefile ]; then \
	echo "  $(RM) Makefile.bak; mv Makefile Makefile.bak"; \
	$(RM) Makefile.bak; mv Makefile Makefile.bak; \
	else exit 0; fi
	$(IMAKE) $(XIFLAGS)

clean::
	rm -f *~ *.o *.a core a.out

Makefiles:: Makefile
	@echo "### Making Makefiles in $(CWD)"
	@-for d in src; \
	do \
	case "$$d" in \
	./?*/?*/?*/?*) newtop=../../../.. ;; \
	./?*/?*/?*) newtop=../../.. ;; \
	./?*/?*) newtop=../.. ;; \
	./?*) newtop=.. ;; \
	*/?*/?*/?*) newtop=../../../.. ;; \
	*/?*/?*) newtop=../../.. ;; \
	*/?*) newtop=../.. ;; \
	*) newtop=.. ;; \
	esac; \
	( cd $$d; \
	echo "### Making Makefile in $(CWD)/$$d"; \
	if [ -f Makefile ]; then \
	$(RM) Makefile.bak; \
	mv Makefile Makefile.bak; fi; \
	make -f $${newtop}/Makefile TOP=$${newtop}/$(TOP) \
	CWD=$(CWD)/$$d Makefile; \
	make $(MFLAGS) Makefiles; \
	echo "### Done with $(CWD)/$$d" ) ; \
	done

all:: FRC
	@for d in  src; \
	do \
	(cd $$d; echo "### Making" all "in $(CWD)/$$d"; \
	make $(MFLAGS)   DESTDIR=$(DESTDIR) all; \
	echo "### Done with $(CWD)/$$d"); \
	done

install:: FRC
	@for d in  src; \
	do \
	(cd $$d; echo "### Making" install "in $(CWD)/$$d"; \
	make $(MFLAGS)   DESTDIR=$(DESTDIR) install; \
	echo "### Done with $(CWD)/$$d"); \
	done

clean:: FRC
	@for d in  src; \
	do \
	(cd $$d; echo "### Making" clean "in $(CWD)/$$d"; \
	make $(MFLAGS)   DESTDIR=$(DESTDIR) clean; \
	echo "### Done with $(CWD)/$$d"); \
	done

depend:: FRC
	@for d in  src; \
	do \
	(cd $$d; echo "### Making" depend "in $(CWD)/$$d"; \
	make $(MFLAGS)   DESTDIR=$(DESTDIR) depend; \
	echo "### Done with $(CWD)/$$d"); \
	done
src:: FRC
	@(cd $@; echo "### Making" all "in $(CWD)/$@"; \
	make $(MFLAGS)  DESTDIR=$(DESTDIR) all ; \
	echo "### Done with $(CWD)/$@")

Makefiles::

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

