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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

