# These variables are configurable.
#---------------------------------------#
DIRS := lib client login player tm update util
#---------------------------------------#

.PHONY: all depend clean dependall cleanall

include make/UtilMakefile

# Productions:
#	all: Make everything
#	depend: Modify the makefiles to reflect the local setup.
#	dependall: Make depend in all the directories.
#	cleanall: Make clean in all the directories.
#	archall: (If the ARCH env var is set).  mkdir $ARCH in all subdirs.

all: dirs

ifdef SRCDIR
depend:
	mkmf -df make/GenMakefile SRCDIR=$(SRCDIR)
else
depend:
	mkmf -df make/GenMakefile SRCDIR=`pwd`
endif

clean:

dependall:
	$(MAKE) COMMAND=depend recursive

cleanall:
	$(MAKE) COMMAND=clean recursive

installall:
	$(MAKE) COMMAND=install recursive

install:

ifdef ARCH
eviscerate:
	find . -name $(ARCH) -a -type d -exec rm -rf \{\} \;

archall:
	$(MAKE) COMMAND=arch recursive
endif
