Makefile 2.41 KB
##########################################################################
#
# Makefile for RSP sprite graphics microcode
#
##########################################################################

PRDEPTH=../../../
include $(ROOT)/usr/include/make/PRdefs

# local defs
LCDEFS = $(HW_FLAGS) -DSPRITE2D

LCINCS = -I. -I$(ROOT)/usr/include -I$(ROOT)/usr/include/PR

LDIRT  = *.dat *.lst *.sym *.dbg *.elf *.tvd

#
# this is the subset of the "common" code that we use here:
#
COMMON_GFX_CODE =	../gfx_regs.h ../gyield.s ../gdone.s		\
			../ginit.s ../gboot.s ../goutxbus.s	\
			../goutdram.s ../goutfifo.s

SPRITE_CODE =	gsmain.s gsprite.s

INST_LIB_TARGETS = 	gspSprite2D.o gspSprite2D.dram.o gspSprite2D.fifo.o

TARGETS = 	gspSprite2D gspSprite2D.dram gspSprite2D.fifo ${INST_LIB_TARGETS}

default: ${TARGETS} checksize

install exports: ${TARGETS} checksize
	$(INSTALL) -m 555 -F /usr/lib/PR $(INST_LIB_TARGETS)
	$(INSTALL) -m 555 -F /usr/src/PR/rspcode/graphics/Sprite2D Makefile $(SPRITE_CODE)

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

##########################################################################
#
# use the RSP linker 'buildtask' to construct the tasks from the objects.
# use the rsp2elf program to construct the debug executables and library
# executables.
#

#
# the Sprite 2D polygon ucode: (fast with greatly reduced features)
#
gspSprite2D:	${COMMON_GFX_CODE} ${SPRITE_CODE}
	@echo "****"
	@echo "**** Building $@:"
	@echo "****"
	${RSPASM} ${LCINCS} ${LCDEFS} -o $@ gsmain.s
	@echo " "

gspSprite2D.o:	gspSprite2D
	${RSP2ELF} -p -r $?

gspSprite2D.tvd:	gspSprite2D
	${RSP2ELF} -p gspSprite2D

#
# .dram version
#
gspSprite2D.dram:	${COMMON_GFX_CODE} ${SPRITE_CODE}
	@echo "****"
	@echo "**** Building $@:"
	@echo "****"
	${RSPASM} ${LCINCS} ${LCDEFS} -DOUTPUT_DRAM -o $@ gsmain.s
	@echo " "

gspSprite2D.dram.o:	gspSprite2D.dram
	${RSP2ELF} -p -r $?

gspSprite2D.dram.tvd:	gspSprite2D.dram
	${RSP2ELF} -p gspSprite2D.dram

#
# .fifo version
#
gspSprite2D.fifo:	${COMMON_GFX_CODE} ${SPRITE_CODE}
	@echo "****"
	@echo "**** Building $@:"
	@echo "****"
	${RSPASM} ${LCINCS} ${LCDEFS} -DOUTPUT_FIFO -o $@ gsmain.s
	@echo " "

gspSprite2D.fifo.o:	gspSprite2D.fifo
	${RSP2ELF} -p -r $?

gspSprite2D.fifo.tvd:	gspSprite2D.fifo
	${RSP2ELF} -p gspSprite2D.fifo

#
# Ensure IMEM size does not overflow
#
checksize:	${INST_LIB_TARGETS}
	../sizecheck ${INST_LIB_TARGETS}
	../labeltest

# DO NOT DELETE THIS LINE -- make depend depends on it.