# _____     ___ ____     ___ ____
#  ____|   |    ____|   |        | |____|
# |     ___|   |____ ___|    ____| |    \    PS2DEV Open Source Project.
#-----------------------------------------------------------------------
# Copyright 2001-2004, ps2dev - http://www.ps2dev.org
# Licenced under Academic Free License version 2.0
# Review ps2sdk README & LICENSE files for further details.
#
# $Id$


RELEASE_IOP_DIRS = iop/ iop/include/ iop/irx/ iop/lib
RELEASE_IOP_DIRS := $(RELEASE_IOP_DIRS:%=$(PS2SDK)/%)

$(RELEASE_IOP_DIRS):
	$(MKDIR) -p $(RELEASE_IOP_DIRS)

release: all $(RELEASE_IOP_DIRS)
	@if test $(IOP_BIN) ; then \
	   $(ECHO) Installing $(IOP_BIN) to $(PS2SDK)/iop/irx ; \
	   cp -f $(IOP_BIN) $(PS2SDK)/iop/irx/ ; \
	fi;
	@if test $(IOP_LIB) ; then \
	   $(ECHO) Installing $(IOP_LIB) to $(PS2SDK)/iop/lib ; \
	   cp -f $(IOP_LIB) $(PS2SDK)/iop/lib/ ; \
	fi;
	@if test -d include ; then \
	   for file in include/*; do \
	     if test -f $$file ; then \
	       $(ECHO) Installing $$file to $(PS2SDK)/iop/include ; \
	       cp -f $$file $(PS2SDK)/iop/include ; \
	     fi \
	   done; \
	fi;

release-clean:
	rm -f $(PS2SDK)/iop/include/*.*
	rm -f $(PS2SDK)/iop/lib/*.*