#
#	This file is part of cxmb
#	Copyright (C) 2008  Poison
#
#	This program is free software: you can redistribute it and/or modify
#	it under the terms of the GNU General Public License as published by
#	the Free Software Foundation, either version 3 of the License, or
#	(at your option) any later version.
#
#	This program is distributed in the hope that it will be useful,
#	but WITHOUT ANY WARRANTY; without even the implied warranty of
#	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#	GNU General Public License for more details.
#
#	You should have received a copy of the GNU General Public License
#	along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

#	File:		Makefile
#	Author:		Poison <hbpoison@gmail.com>
#	Date Created:	2008-03-06

all:
	make clean
	make -f Makefile.PSP
	
clean:
	make -f Makefile.PSP clean

lite:
	make clean
	CXMB_LITE=1 make -f Makefile.PSP
	
debug:
	make clean
	DEBUG=1 make -f Makefile.PSP

debug2:
	make clean
	DEBUG=2 make -f Makefile.PSP

debug3:
	make clean
	DEBUG=3 make -f Makefile.PSP

debug4:
	make clean
	DEBUG=4 make -f Makefile.PSP
	
debug5:
	make clean
	DEBUG=5 make -f Makefile.PSP

380:
	make clean
	PSP_FW_VERSION=380 make -f Makefile.PSP

380lite:
	make clean
	PSP_FW_VERSION=380 CXMB_LITE=1 make -f Makefile.PSP
	
380debug:
	make clean
	PSP_FW_VERSION=380 DEBUG=1 make -f Makefile.PSP

380debug2:
	make clean
	PSP_FW_VERSION=380 DEBUG=2 make -f Makefile.PSP

380debug3:
	make clean
	PSP_FW_VERSION=380 DEBUG=3 make -f Makefile.PSP

380debug4:
	make clean
	PSP_FW_VERSION=380 DEBUG=4 make -f Makefile.PSP
	
380debug5:
	make clean
	PSP_FW_VERSION=380 DEBUG=5 make -f Makefile.PSP
	
371:
	make clean
	PSP_FW_VERSION=371 make -f Makefile.PSP

371lite:
	make clean
	PSP_FW_VERSION=371 CXMB_LITE=1 make -f Makefile.PSP
	
371debug:
	make clean
	PSP_FW_VERSION=371 DEBUG=1 make -f Makefile.PSP

371debug2:
	make clean
	PSP_FW_VERSION=371 DEBUG=2 make -f Makefile.PSP

371debug3:
	make clean
	PSP_FW_VERSION=371 DEBUG=3 make -f Makefile.PSP

371debug4:
	make clean
	PSP_FW_VERSION=371 DEBUG=4 make -f Makefile.PSP
	
371debug5:
	make clean
	PSP_FW_VERSION=371 DEBUG=5 make -f Makefile.PSP

install:
	cp cxmb.prx /Volumes/NO\ NAME/cxmb/
	diskutil eject /Volumes/NO\ NAME/
	
release:
	rm -f cxmb_for_3.90.tar.gz
	rm -rf CXMB_for_3.90/
	make all
	install -d CXMB_for_3.90/CXMB_FULL/cxmb/
	install -d CXMB_for_3.90/CXMB_FULL/cxmb/support/
	install -d CXMB_for_3.90/CXMB_FULL/seplugins/
	install -C cxmb.prx CXMB_for_3.90/CXMB_FULL/cxmb/
	install -C support/decrypted\ official\ prx\ go\ here.txt CXMB_for_3.90/CXMB_FULL/cxmb/support/
	install -C seplugins/vsh.txt CXMB_for_3.90/CXMB_FULL/seplugins/
	make lite
	install -d CXMB_for_3.90/CXMB_LITE/cxmb/
	install -d CXMB_for_3.90/CXMB_FULL/seplugins/
	install -C cxmb.prx CXMB_for_3.90/CXMB_LITE/cxmb/
	install -C seplugins/vsh.txt CXMB_for_3.90/CXMB_FULL/seplugins/
	make clean
	install -d CXMB_for_3.90/SOURCE/
	cp cxmb.c CXMB_for_3.90/SOURCE/
	cp LICENSE CXMB_for_3.90/SOURCE/
	cp README CXMB_for_3.90/SOURCE/
	cp exports.exp CXMB_for_3.90/SOURCE/
	cp Makefile CXMB_for_3.90/SOURCE/
	cp Makefile.PSP CXMB_for_3.90/SOURCE/
	cp readme.txt CXMB_for_3.90/
	tar czf cxmb_3.1_for_3.90.tar.gz CXMB_for_3.90/

380release:
	rm -f cxmb_for_3.80.tar.gz
	rm -rf CXMB_for_3.80/
	make 380
	install -d CXMB_for_3.80/CXMB_FULL/cxmb/
	install -d CXMB_for_3.80/CXMB_FULL/cxmb/support/
	install -d CXMB_for_3.80/CXMB_FULL/seplugins/
	install -C cxmb.prx CXMB_for_3.80/CXMB_FULL/cxmb/
	install -C support/decrypted\ official\ prx\ go\ here.txt CXMB_for_3.80/CXMB_FULL/cxmb/support/
	install -C seplugins/vsh.txt CXMB_for_3.80/CXMB_FULL/seplugins/
	make 380lite
	install -d CXMB_for_3.80/CXMB_LITE/cxmb/
	install -d CXMB_for_3.80/CXMB_FULL/seplugins/
	install -C cxmb.prx CXMB_for_3.80/CXMB_LITE/cxmb/
	install -C seplugins/vsh.txt CXMB_for_3.80/CXMB_FULL/seplugins/
	make clean
	install -d CXMB_for_3.80/SOURCE/
	cp cxmb.c CXMB_for_3.80/SOURCE/
	cp LICENSE CXMB_for_3.80/SOURCE/
	cp README CXMB_for_3.80/SOURCE/
	cp exports.exp CXMB_for_3.80/SOURCE/
	cp Makefile CXMB_for_3.80/SOURCE/
	cp Makefile.PSP CXMB_for_3.80/SOURCE/
	cp readme.txt CXMB_for_3.80/
	tar czf cxmb_3.1_for_3.80.tar.gz CXMB_for_3.80/
	
371release:
	rm -f cxmb_for_3.71.tar.gz
	rm -rf CXMB_for_3.71/
	make 371
	install -d CXMB_for_3.71/CXMB_FULL/cxmb/
	install -d CXMB_for_3.71/CXMB_FULL/cxmb/support/
	install -d CXMB_for_3.71/CXMB_FULL/seplugins/
	install -C cxmb.prx CXMB_for_3.71/CXMB_FULL/cxmb/
	install -C support/decrypted\ official\ prx\ go\ here.txt CXMB_for_3.71/CXMB_FULL/cxmb/support/
	install -C seplugins/vsh.txt CXMB_for_3.71/CXMB_FULL/seplugins/
	make 371lite
	install -d CXMB_for_3.71/CXMB_LITE/cxmb/
	install -d CXMB_for_3.71/CXMB_FULL/seplugins/
	install -C cxmb.prx CXMB_for_3.71/CXMB_LITE/cxmb/
	install -C seplugins/vsh.txt CXMB_for_3.71/CXMB_FULL/seplugins/
	make clean
	install -d CXMB_for_3.71/SOURCE/
	cp cxmb.c CXMB_for_3.71/SOURCE/
	cp LICENSE CXMB_for_3.71/SOURCE/
	cp README CXMB_for_3.71/SOURCE/
	cp exports.exp CXMB_for_3.71/SOURCE/
	cp Makefile CXMB_for_3.71/SOURCE/
	cp Makefile.PSP CXMB_for_3.71/SOURCE/
	cp readme.txt CXMB_for_3.71/
	tar czf cxmb_3.1_for_3.71.tar.gz CXMB_for_3.71/