# make all of the linux files in /system
#

all: makes

makes:
	@if [ -d /system ]; then \
		cd nbinclude; \
			/usr/bin/make -f Makefile install; \
		cd ..; \
		cd bin; \
			/usr/bin/make -f Makefile install; \
		cd ..; \
		cd lib; \
			/usr/bin/make -f Makefile install; \
		cd ..; \
		cd util; \
			/usr/bin/make -f Makefile install; \
		cd ..; \
		cd doc; \
			/usr/bin/make -f Makefile install; \
		cd ..; \
		echo "all files installed"; \
	else \
		echo ""; \
		echo "*NOTE*NOTE*NOTE*NOTE*NOTE*NOTE*NOTE*"; \
		echo "*You must create /system directory *"; \
		echo "*as root and chmod to 777,         *"; \
		echo "*then rerun this makefile.         *"; \
		echo "*NOTE*NOTE*NOTE*NOTE*NOTE*NOTE*NOTE*"; \
		echo ""; \
		exit; \
	fi

clean:
	@cd nbinclude; \
	/usr/bin/make -f Makefile clean
	@cd bin; \
	/usr/bin/make -f Makefile clean
	@cd lib; \
	/usr/bin/make -f Makefile clean
	@cd util; \
	/usr/bin/make -f Makefile clean
	@cd doc; \
	/usr/bin/make -f Makefile clean
	@if [ -d /system ]; then \
		rmdir /system; \
	fi
	echo "all files cleaned"

