Makefile 1.84 KB
#-----------------------------------------------------------------------------
#  $Id: Makefile,v 1.1.1.1 2002/05/02 03:29:12 blythe Exp $
#
#  File : Makefile
#
#  Coded     by Yoshitaka Yasumoto.   Jun 16, 1997.
#  Copyright by Nintendo, Co., Ltd.           1997.
#-----------------------------------------------------------------------------

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

DEFINES =	-DDEBUG
#DEFINES =

UCODE =		gspZSort
UCODES =	$(UCODE).fifo.o $(UCODE).pl.fifo.o
TARGET =	$(UCODES)

MAIN =		gzmain.s
SRCS =		$(MAIN) gzgfx.s gzinit.s gzloaduc.s gzoutfifo.s gzrdp.s \
		gzdone.s gzobj.s gzshtri.s gztxtri.s gzsubdl.s gzmath.s
HEADERS = 	gzdmem.h gzmacros.h gzregs.h
PR_HEADERS =	$(ROOT)/PR/include/gzsort.h
LDIRT =		$(UCODE).fifo $(UCODE).pl.fifo *.u *.dat \
		*.lst *.sym *.dbg *.elf *.tvd \
		*~ doc.jp/*~ Tech/*~ Tools/*~ Package/*~
PERL =          perl
DMEMHACK =	Tools/dmemHack.perl
MV =            mv

default:	$(TARGET)
		@strings -10 *.o

include $(COMMONRULES)

install exports: default
	$(INSTALL) -m 555 -F /usr/lib/PR $(UCODES)
	$(INSTALL) -m 444 -F /usr/src/PR/rspcode/graphics.ZSort \
		$(SRCS) $(HEADERS) Makefile $(DMEMHACK)
	(cd doc; \
	$(INSTALL) -m 444 -F /usr/src/PR/doc/gfxucode.ZSort README.jp )

$(UCODE).fifo.o:	$(SRCS) $(HEADERS)
	$(RSPASM) $(DEFINES) -I$(ROOT)/usr/include -I$(ROOT)/usr/include/PR \
		-o $(UCODE).fifo $(MAIN)
	$(PERL) $(DMEMHACK) END_OF_DMEM_INIT $(UCODE).fifo \
		> $(UCODE).fifo.dat.tmp
	$(MV)   $(UCODE).fifo.dat.tmp $(UCODE).fifo.dat
	$(RSP2ELF) -p -r $(UCODE).fifo

$(UCODE).pl.fifo.o:	$(SRCS) $(HEADERS)
	$(RSPASM) $(DEFINES) -DSUBDLNICE -I$(ROOT)/usr/include \
		-I$(ROOT)/usr/include/PR -o $(UCODE).pl.fifo $(MAIN)
	$(PERL) $(DMEMHACK) END_OF_DMEM_INIT $(UCODE).pl.fifo \
		>$(UCODE).pl.fifo.dat.tmp
	$(MV)   $(UCODE).pl.fifo.dat.tmp $(UCODE).pl.fifo.dat
	$(RSP2ELF) -p -r $(UCODE).pl.fifo

#---- End of Makefile ----