Makefile 3.93 KB
#! smake
#---------------------------------------------------------------------
#  $Id: Makefile,v 1.1.1.1 2002/05/02 03:29:12 blythe Exp $
#  
#  File : Makefile
#  
#  Coded     by Yoshitaka Yasumoto.   Mar 21, 1997.
#  Copyright by Nintendo, Co., Ltd.           1997.
#---------------------------------------------------------------------

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

RELEASE  = 0.34
PATCHID  = Nt980804_ZSort
# PATCHVER は $ROOT/PR で make startversion することで判明する
PATCHVER = 1024898600
N64DEV   = 2.0I
TAGNAME  = ZSort-034
LZHARC   = zsort034

PERL    = perl
GENDIST = /usr/sbin/gendist

BINPACK = ZSort-$(RELEASE)
SRCPACK = ZSort-$(RELEASE)src

TMPROOT = tmproot

FTPDIR    = /disk02/ftp/reality/ucode/ZSort
WEB_ROOT  = /hosts/lupin/disk2/reality/public_html
WEB_PR    = $(WEB_ROOT)/index.html
WEB_UCODE = $(WEB_ROOT)/Public/RD3/GfxUcode/index.html

default: clobber
	make bin_irix
	make bin_pc
	make src_pack
	strings -10 $(ROOT)/usr/lib/PR/gspZSort*.o

bin_irix:
	(cd ..; make install)
	(cd $(ROOT)/PR/include; make install)
	(cd $(ROOT)/PR/apps/gzsort; make install)
	$(PERL) ./makeidb.perl ./release.files $(PATCHID) | \
	sort +5 -6 > /tmp/$(PATCHID).idb
	mkdir -p $(BINPACK)/dist
	RELEASE=$(RELEASE); PATCHID=$(PATCHID); PATCHVER=$(PATCHVER);	\
	N64DEV=$(N64DEV); export RELEASE PATCHID PATCHVER N64DEV;	\
	$(GENDIST) -rbase / -sbase $(ROOT) -idb /tmp/$(PATCHID).idb	\
		-spec release.spec -dist $(BINPACK)/dist -all
	cp ../doc/relnotes.jp $(BINPACK)
	cp ../doc/README.jp   $(BINPACK)
	chmod -R -w $(BINPACK)
	tar cvf $(BINPACK).tar $(BINPACK)
	gzip -c $(BINPACK).tar > $(BINPACK).tar.gz
	uuencode $(BINPACK).tar.gz $(BINPACK).tar.gz > $(BINPACK).tar.gz.uu
	rm $(BINPACK).tar.gz

bin_pc:
	if test -r $(TMPROOT); then rm -rf $(TMPROOT); fi
	mkdir -p $(TMPROOT)
	(cd ..; make install)
	(cd $(ROOT)/PR/include; make install)
	(cd $(ROOT)/PR/apps/gzsort; make install-pc)
	$(PERL) ./maketree.perl ./release.files $(ROOT) $(TMPROOT)
	nkf -s ../doc/relnotes.jp > $(TMPROOT)/relnotes.tmp
	to_dos $(TMPROOT)/relnotes.tmp $(TMPROOT)/relnotes.zsort.jp	
	rm $(TMPROOT)/relnotes.tmp
	( echo e:;						\
	  echo cd graphics.ZSort'\\'Package'\\'$(TMPROOT);	\
	  echo lha32 a -d1 ..\\$(LZHARC) relnotes.zsort.jp usr;	\
	  echo cd ..;						\
	  echo lha32 s -gw3x1 $(LZHARC) ) > makepc.bat
	to_dos makepc.bat $(ROOT)/PR/rspcode/makepc.bat
	rm makepc.bat 
	@echo ================================
	@echo ================================
	@echo ================================
	@echo PC 側でツールを起動してください.
	@echo ================================
	@echo '[ ZSort Microcode Release X.XX ]'
	@echo '[ Enter ultra64 dev ROOT ......]'
	@echo '[ c:\ultra                     ]'
	@echo ================================
	@echo ================================
	@echo ================================

src_pack:
	cvs checkout -r $(TAGNAME) PR/rspcode/graphics.ZSort
	cvs checkout -r $(TAGNAME) PR/include
	find PR -depth -name CVS -exec rm -rf {} \;
	mv PR $(SRCPACK)
	chmod -R -w $(SRCPACK)
	tar cvf $(SRCPACK).tar $(SRCPACK)
	gzip $(SRCPACK).tar
	chmod -R u+w $(SRCPACK)
	rm -rf $(SRCPACK)

install: $(BINPACK).tar $(SRCPACK).tar.gz
	cp ../doc/README.jp \
		$(BINPACK).tar $(SRCPACK).tar.gz $(LZHARC).exe $(FTPDIR)
	(cd $(FTPDIR); chmod 644 *)
	$(CVSEDITOR) $(WEB_UCODE) $(WEB_PR)

exports headers:

clean:
	if test -r $(BINPACK); then chmod -R u+w $(BINPACK); fi
	if test -r $(SRCPACK); then chmod -R u+w $(SRCPACK); fi
	rm -rf  $(BINPACK) $(SRCPACK) *~ PR  $(LZHARC).lzh \
		PR $(TMPROOT) makepc.bat

clobber:
	make clean
	rm -rf	$(BINPACK).tar $(BINPACK).tar.gz.uu $(SRCPACK).tar.gz \
		$(LZHARC).exe

tag:
	(cd $(ROOT)/PR/rspcode/graphics.ZSort; cvs tag $(TAGNAME))
	(cd $(ROOT)/PR/include;     cvs tag $(TAGNAME) gzsort.h rcp.h gbi.h sptask.h)
	(cd $(ROOT)/PR/apps/gzsort; cvs tag $(TAGNAME))

commit:
	(cd $(ROOT)/PR/rspcode/graphics.ZSort; cvs commit)
	(cd $(ROOT)/PR/include;     cvs commit gzsort.h rcp.h gbi.h sptask.h)
	(cd $(ROOT)/PR/apps/gzsort; cvs commit)

#======== End of Makefile ========