include $(ROOT)/usr/include/make/DSdefs

headers: 
	-mkdir -p $(NITROSDK_ROOT)/build/buildtools
	-mkdir -p $(NITROSDK_ROOT)/build/libraries
	-mkdir -p $(NITROSDK_ROOT)/build/tools
	-mkdir -p $(NITROSDK_ROOT)/include/netcard
	$(INSTALL) commondefs $(NITROSDK_ROOT)/build/buildtools
	$(INSTALL) Makefile.libraries $(NITROSDK_ROOT)/build/libraries/Makefile
	$(INSTALL) Makefile.tools $(NITROSDK_ROOT)/build/tools/Makefile
	-mkdir -p $(NITRODWC_ROOT)/build/buildtools
	-mkdir -p $(NITRODWC_ROOT)/build/libraries
	-mkdir -p $(NITRODWC_ROOT)/build/demos
	$(INSTALL) commondefs.dwc $(NITRODWC_ROOT)/build/buildtools
	$(INSTALL) Makefile.libraries.dwc $(NITRODWC_ROOT)/build/libraries/Makefile
	$(INSTALL) Makefile.demos.dwc $(NITRODWC_ROOT)/build/demos/Makefile
	#
	# Kludge to get automated build to work:  to install the EC lib source
	# from bcc/wii, we need to run a makefile that requires commondefs
	# and modulerules.
	#
	touch $(NITRODWC_ROOT)/build/buildtools/commondefs
	touch $(NITRODWC_ROOT)/build/buildtools/modulerules

install: 
	cat header.list | \
		(cd $(ROOT)/usr/include; tar cf - -T -) |\
		(cd $(NITROSDK_ROOT)/include/netcard; tar xf -)

include $(COMMONRULES)
