#define IHaveSubdirs
#define PassCDebugFlags

      WORLDOPTS = -k

/**/#
/**/# The order given here is necessary for some things to build; note that in
/**/# R4beta, the "fonts" and "rgb" directories will become subdirectories of
/**/# server so that BuildServer is no longer necessary.
/**/#
#if BuildServer
SERVERDIRSTOMAKE = server
#endif
        SUBDIRS = config include lib extensions $(SERVERDIRSTOMAKE) \
			clients  util AF
  LNINSTALLDIRS = $(LIBSRC)

MakeSubdirs($(SUBDIRS))

MakeDirectories(install.ln, $(LINTLIBDIR))

MakeLintSubdirs($(LNINSTALLDIRS),install.ln,install.ln)

MakeLintSubdirs($(LNINSTALLDIRS),external.ln,lintlib)



/**/#
/**/# before depending, be sure to have run make includes
/**/#
/* depend::  includes */

DependSubdirs($(SUBDIRS))


/**/# 
/**/# install stuff; create the directories that we're going to need
/**/# 


DIRS_TO_CREATE = $(DIRS_SERVER) /* $(LINTLIBDIR) */ \
	$(USRLIBDIR) $(BINDIR) $(INCDIR) $(INCDIR)/extensions \
	$(LIBDIR) $(CONFIGDIR) $(LODDIR)

MakeDirectories(install, $(DIRS_TO_CREATE))

MakeDirectories(install.man, $(MANPATH) $(MANDIR) $(LIBMANDIR))


/**/# don't name your log file make.log when you run this ...
World::
	@echo ""
	@echo "Building Version 3 Release 1 of the AF System"
	@echo ""
	@echo "##############################################################"
	@echo "# Did you remember to check the configuration parameters in  #"
	@echo "# the directory ./config and set BOOTSTRAPCFLAGS if needed?  #"
	@echo "##############################################################"
	@echo ""
	@date
	@echo ""
	cd $(IMAKESRC); $(MAKE) -f Makefile.ini clean; $(MAKE) -f Makefile.ini BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)"
	-$(MV) Makefile Makefile.bak
	$(MAKE) -f Makefile.bak Makefile
	$(MAKE) Makefiles
	$(MAKE) clean
	$(MAKE) includes
	$(MAKE) depend
	$(MAKE) $(WORLDOPTS)
	@echo ""
	@echo "Full build of Version 3 Release 1 of the AF System complete."
	@date
	@echo ""
	@echo ""

Everything::
	@echo ""
	@echo "Rebuilding Version 3 Release 1 of the AF System"
	@echo ""
	@echo "##############################################################"
	@echo "# Did you remember to check the configuration parameters in  #"
	@echo "# the directory ./config and set BOOTSTRAPCFLAGS if needed?  #"
	@echo "##############################################################"
	@echo ""
	@date
	@echo ""
	cd $(IMAKESRC); $(MAKE) -f Makefile.ini BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)"
	-$(MV) Makefile Makefile.bak
	$(MAKE) -f Makefile.bak Makefile
	$(MAKE) Makefiles
	$(MAKE) includes
	$(MAKE) depend
	$(MAKE) $(WORLDOPTS)
	@echo ""
	@date
	@echo ""
	@echo "Rebuild of Version 3 Release 1 of the AF System complete."
	@echo ""


CHANGES.ALL::
	$(RM) $@
	(for i in `find . -name CHANGES -print`; do \
	echo $$i; echo ""; cat $$i; echo ""; \
	echo "==========================================================="; \
	done) >$@


InstallSubdirs(config)


/**/# rebuild the Makefiles in the master source tree
mastermakefiles::
	cd $(IMAKESRC); $(MAKE) -f Makefile.ini clean; $(MAKE) -f Makefile.ini BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)"
	-$(MV) Makefile Makefile.bak
	$(MAKE) -f Makefile.bak Makefile
	$(MAKE) Makefiles
	cd $(IMAKESRC); $(MAKE) clean

