Makefile 3.6 KB
#! smake
#---------------------------------------------------------------------
#	Copyright (C) 1997, Nintendo.
#	
#	File		Makefile
#	Coded    by	Yoshitaka Yasumoto.	Mar 21, 1997.
#	Modified by	
#	Comments	
#	
#	$Id: Makefile,v 1.1.1.1 2002/05/02 03:29:12 blythe Exp $
#---------------------------------------------------------------------

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

RELEASE = 1.07
TAGNAME = S2DEX-107
OS_TAGNAME = latest_OS_V2_0I

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

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

default: clean
	make bin_pack
	make src_pack
	strings -10 $(BINPACK)/gsp*.o

bin_pack:
	mkdir -p $(BINPACK)/include
	mkdir -p $(BINPACK)/libultra
	mkdir -p $(BINPACK)/sample
	(cd ..; make )
	cp ../gspS2DEX.fifo*.o $(BINPACK)
	cp ../doc/README.jp $(BINPACK)
	cp $(ROOT)/PR/include/gs2dex.h $(BINPACK)/include
	(cd $(ROOT)/PR/apps/gs2dex; make clobber)
	cp -r $(ROOT)/PR/apps/gs2dex/* $(BINPACK)/sample
	rm -rf $(BINPACK)/sample/CVS
	(cd $(ROOT)/PR/libultra/gu; \
		make us2dex.o; make us2dex_emu.o; make us2dex2_emu.o)
	cp $(ROOT)/PR/libultra/gu/us2dex.o      \
	   $(ROOT)/PR/libultra/gu/us2dex_emu.o  \
	   $(ROOT)/PR/libultra/gu/us2dex2_emu.o $(BINPACK)/libultra
	rm $(ROOT)/PR/libultra/gu/us2dex.o      \
	   $(ROOT)/PR/libultra/gu/us2dex_emu.o  \
	   $(ROOT)/PR/libultra/gu/us2dex2_emu.o
	cp Makefile_libultra $(BINPACK)/libultra/Makefile
	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

src_pack:
	mkdir -p $(SRCPACK)
	mkdir -p $(SRCPACK)/include
	mkdir -p $(SRCPACK)/libultra
	(cd ..; make clobber)
	cp -r ../[A-OQ-Za-z]* $(SRCPACK)
	cp $(ROOT)/PR/include/gs2dex.h $(SRCPACK)/include
	cp $(ROOT)/PR/libultra/gu/us2dex.c      \
	   $(ROOT)/PR/libultra/gu/us2dex_emu.c  \
	   $(ROOT)/PR/libultra/gu/us2dex2_emu.c $(SRCPACK)/libultra
	find $(SRCPACK) -depth -name CVS -exec rm -rf {} \;
	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 $(BINPACK)/README $(BINPACK).tar $(SRCPACK).tar.gz $(FTPDIR)
	(cd $(FTPDIR); chmod 644 *)
	$(CVSEDITOR) $(WEB_UCODE) $(WEB_PR)

exports headers:

clean clobber:
	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) $(BINPACK).tar $(BINPACK).tar.gz.uu \
		$(SRCPACK) $(SRCPACK).tar.gz *~

LIBSRCS = Makefile Makefile.src us2dex.c us2dex_emu.c us2dex2_emu.c

commit:
	(cd $(ROOT)/PR/rspcode/graphics.S2DEX; cvs commit)
	(cd $(ROOT)/PR/include;     cvs commit Makefile gs2dex.h)
	(cd $(ROOT)/PR/apps;        cvs commit Makefile)
	(cd $(ROOT)/PR/apps/gs2dex; cvs commit)
	(cd $(ROOT)/PR/libultra/gu; cvs commit $(LIBSRCS))

tag:
	(cd $(ROOT)/PR/rspcode/graphics.S2DEX; cvs tag -F $(TAGNAME))
	(cd $(ROOT)/PR/include;     cvs tag -F $(TAGNAME) Makefile gs2dex.h)
	(cd $(ROOT)/PR/apps;        cvs tag -F $(TAGNAME) Makefile)
	(cd $(ROOT)/PR/apps/gs2dex; cvs tag -F $(TAGNAME))
	(cd $(ROOT)/PR/libultra/gu; cvs tag -F $(TAGNAME) $(LIBSRCS))

ostag-update:
	(cd $(ROOT)/PR/rspcode/graphics.S2DEX; cvs tag -b $(OS_TAGNAME))
	(cd $(ROOT)/PR/include;     cvs tag -b $(OS_TAGNAME) Makefile gs2dex.h)
	(cd $(ROOT)/PR/apps;        cvs tag -b $(OS_TAGNAME) Makefile)
	(cd $(ROOT)/PR/apps/gs2dex; cvs tag -b $(OS_TAGNAME))
	(cd $(ROOT)/PR/libultra/gu; cvs tag -b $(OS_TAGNAME) $(LIBSRCS))

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