Makefile 4.74 KB
#! smake
#---------------------------------------------------------------------
#  $Id: Makefile,v 1.1.1.1 2002/05/02 03:29:11 blythe Exp $
#  
#  File : Makefile
#  
#  Coded     by Yoshitaka Yasumoto.   Mar 31, 1998.
#  Copyright by Nintendo, Co., Ltd.           1998.
#---------------------------------------------------------------------

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

RELEASE    = 2.08
PATCHID    = Nt990104_F3DEX2
PATCHVER   = 1025398800
N64DEV     = 2.0I
TAGNAME    = F3DEX2-208
LZHARC     = f3dex208
OS_TAGNAME = latest_OS_V2_0I

PERL    = perl
GENDIST = /usr/sbin/gendist

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

TMPROOT = tmproot

FTPDIR    = /disk02/ftp/reality/ucode/F3DEX2
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/gsp?3D?X2.*.o

version_number:
	(cd $(ROOT)/PR; make startversion)

bin_irix:
	(cd ..; make install)
	(cd $(ROOT)/PR/include; 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)
	$(PERL) ./maketree.perl ./release.files $(ROOT) $(TMPROOT)
	nkf -s ../doc/relnotes.jp > $(TMPROOT)/relnotes.tmp
	to_dos $(TMPROOT)/relnotes.tmp $(TMPROOT)/relnotes.f3dex2.jp
	rm $(TMPROOT)/relnotes.tmp
	( echo e:;						\
	  echo cd graphics.F3DEX2'\\'Package'\\'$(TMPROOT);	\
	  echo lha32 a -d1 '..\\'$(LZHARC) relnotes.f3dex2.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 '[ F3DEX2 Microcode Release X.XX ]'
	@echo '[ Enter ultra64 dev ROOT ...... ]'
	@echo '[ c:\ultra                      ]'
	@echo =================================
	@echo =================================
	@echo =================================

src_pack:
	cvs checkout -r $(TAGNAME) PR/rspcode/graphics.F3DEX2
	cvs checkout -r $(TAGNAME) PR/rspcode/graphics.S2DEX
	cvs checkout -r $(TAGNAME) PR/include
	find PR -depth -name CVS -exec rm -rf {} \;
	if test -r PR/rspasm; then rm -rf PR/rspasm; fi
	mkdir -p PR/rspasm
	cp $(ROOT)/usr/sbin/rspasm PR/rspasm
	cp $(ROOT)/PR/rspcode/doc/NEW_RSPASM PR/rspasm/README
	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
	rm -rf  $(BINPACK)
#	if test -r $(SRCPACK); then chmod -R u+w $(SRCPACK); fi
#	rm -rf  $(SRCPACK)
	rm -rf  *~ PR  $(LZHARC).lzh PR $(TMPROOT) makepc.bat

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

HEADERS = Makefile gbi.h ucode.h sptask.h gs2dex.h
LIBSRCS = Makefile Makefile.src us2dex.c us2dex_emu.c us2dex2_emu.c
S2DSRCS = gs2sprite.s gs2rect.s gs2tmem.s gs2bg.s gs2bg1cycL.s

commit:
	(cd $(ROOT)/PR/rspcode/graphics.F3DEX2; cvs commit)
	(cd $(ROOT)/PR/rspcode/graphics.S2DEX;  cvs commit $(S2DSRCS))
	(cd $(ROOT)/PR/include;     cvs commit $(HEADERS))
	(cd $(ROOT)/PR/libultra/gu; cvs commit $(LIBSRCS))

tag:
	(cd $(ROOT)/PR/rspcode/graphics.F3DEX2; cvs tag -F $(TAGNAME))
	(cd $(ROOT)/PR/rspcode/graphics.S2DEX; \
					cvs tag -F $(TAGNAME) $(S2DSRCS))
	(cd $(ROOT)/PR/include;		cvs tag -F $(TAGNAME) $(HEADERS))
	(cd $(ROOT)/PR/libultra/monegi/gu;	cvs tag -F $(TAGNAME) $(LIBSRCS))

ostag-update:
	(cd $(ROOT)/PR/rspcode/graphics.F3DEX2; cvs tag -b $(OS_TAGNAME))
	(cd $(ROOT)/PR/rspcode/graphics.S2DEX; \
					cvs tag -b $(OS_TAGNAME) $(S2DSRCS))
	(cd $(ROOT)/PR/include;		cvs tag -b $(OS_TAGNAME) $(HEADERS))
	(cd $(ROOT)/PR/libultra/gu;	cvs tag -b $(OS_TAGNAME) $(LIBSRCS))

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