# Master Makefile to compile everything in /usr/src except the kernel.

MAKE	= exec make -$(MAKEFLAGS)

usage:
	@echo "Usage:" >&2
	@echo "	make world      # Compile everything (libraries & commands)" >&2
	@echo "	make libraries  # Compile libraries (lib, */lib)" >&2
	@echo "	make commands   # Compile commands (cmd, */cmd)" >&2
	@echo "	make clean      # Remove all compiler results" >&2
	@echo "	(Use @make for a build tree, see @build(8))" >&2; exit 1

world:	libraries commands	# (In this order of course)

libraries:
	cd lib/ack/mach/minix.`arch` && $(MAKE)
	cd lib/gcc/mach/minix.`arch` && $(MAKE)

commands:	install

install clean:
	cd cmd && $(MAKE) $@
	cd bsd/cmd && $(MAKE) $@
	cd gnu/cmd && $(MAKE) $@
	cd sys && $(MAKE) $@
	cd vmd/cmd && $(MAKE) $@
	cd vmd/man && $(MAKE) $@
