SUBDIRS = src

all::
	-@for i in $(SUBDIRS); do \
	(cd $$i && $(MAKE)); \
	done

clean::
	-@for i in $(SUBDIRS); do \
	(cd $$i && $(MAKE) clean); \
	done

debug::
	-@for i in $(SUBDIRS); do \
	(cd $$i && $(MAKE) debug); \
	done

runtime::
	-@for i in $(SUBDIRS); do \
	(cd $$i && $(MAKE) runtime); \
	done

static::
	-@for i in $(SUBDIRS); do \
	(cd $$i && $(MAKE) static); \
	done

static-debug::
	-@for i in $(SUBDIRS); do \
	(cd $$i && $(MAKE) static-debug); \
	done

include sys/config/mkflags
install::
	@cd ..;
	@if [ -d $(WS_DEFAULT_DIR) ]; then set +x;\
	else (set -x; mkdir $(WS_DEFAULT_DIR)); fi
	pwd;
	-(\cp -r bin $(WS_DEFAULT_DIR));
	-(\cp -r include $(WS_DEFAULT_DIR));
	-(\cp -r samples $(WS_DEFAULT_DIR));
	-(\cp -r sys $(WS_DEFAULT_DIR));
	-(\cp -r lib $(WS_DEFAULT_DIR));
	-(\cp -r doc $(WS_DEFAULT_DIR));
	-(\cp -r COPYRIGHT $(WS_DEFAULT_DIR));
	-(\cp -r Changelog $(WS_DEFAULT_DIR));
	-(\cp -r README $(WS_DEFAULT_DIR));
	-(\cp -r README.eucjp $(WS_DEFAULT_DIR));
	-\ln -s $(WS_DEFAULT_DIR)/lib/* $(WS_INST_DIR)/lib
	-\ln -s $(WS_DEFAULT_DIR)/bin/ws* $(WS_INST_DIR)/bin

uninstall::
	-@for i in $(SUBDIRS); do \
	(cd $$i && $(MAKE) uninstall); \
	done

