GNUmakefile 2.56 KB
##########################################################################
#
# Makefile for RSP graphics microcode
#
# There are several different microcode targets, each set
# of microcode is for a slightly different purpose; a game developer
# might use several per frame.
#
# Microcode objects are built in their respective subdirectories;
# this directory contains common tools and common microcode source
# code files.
#
# Ideally, all these different executables would share as much
# source code as possible. In order to do that, the following 
# #defines are used:
#
#	FASTLIGHT3D	- the 'default', lighting swaps over clipping.
#	TURBO3D		- turbo 3D ucode.
#	LINE3D		- line ucode.
#       SPRITE2D        - sprite ucode.
#	OUTPUT_DRAM	- modifies any of the above targets, sending
#			  RDP data to DRAM rather than XBUS.
#	OUTPUT_FIFO	- modifies any of the above targets, sending
#			  RDP data to DRAM in FIFO mode.
#	
##########################################################################

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

OPTIMIZER = -g

# local defs
LCDEFS =

# local includes
LCINCS = -I. -I$(ROOT)/usr/include -I$(ROOT)/usr/include/PR
LDOPTS = -L. -L$(ROOT)/usr/lib/PR
LDLIBS = -ll -lm

LDIRT  = 

TARGETS =	fillnops

SUBDIRS =	F3DEX F3DEX.NoN F3DLP.Rej F3DLX F3DLX.NoN F3DLX.Rej L3DEX \
		Zelda Paint NewCom Yukes

COMMON_UCODE =	gdmem.h gboot.s gclip.s gcliptest.s gdma.s gdone.s	\
		gflight.s gfx_regs.h gimm.s ginit.s gloaduc.s gmain.s	\
		gmtx.s goutdram.s goutdump.s goutfifo.s goutxbus.s	\
		goverlays.s grdp.s gsetup.s gsetup1.s gvtx.s gyield.s newt.s

COMMONPREF = graphics.F3DEX
include $(COMMONRULES)

default: $(_FORCE) ${TARGETS}
	$(SUBDIRS_MAKERULE)

install exports: $(_FORCE) ${TARGETS}
	$(SUBDIRS_MAKERULE)
	$(INSTALL) -m 555 -F /usr/src/PR/rspcode/graphics.F3DEX \
		labeltest sizecheck
	$(INSTALL) -m 444 -F /usr/src/PR/rspcode/graphics.F3DEX \
		Makefile fillnops.c $(COMMON_UCODE)
	(cd doc; $(INSTALL) -m 444 -F /usr/src/PR/doc/gfxucode.F3DEX \
		NewFunctions ChangeLog README)
	(cd doc.jp; $(INSTALL) -m 444 -F /usr/src/PR/doc/gfxucode.F3DEX \
		NewFunctions.jp ChangeLog.jp README.jp)

clobber: clean rmtargets $(_FORCE)
	$(SUBDIRS_MAKERULE)
	rm -rf $(MKDEPFILE)

clean: $(_FORCE)
	$(SUBDIRS_MAKERULE)
	rm -rf $(DIRT)

rmtargets: $(_FORCE)
	$(SUBDIRS_MAKERULE)
	rm -rf $(TARGETS)

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

##############################################################################
#
# utility (tool) programs...
#

fillnops: fillnops.c
	$(HOST_CCF) -o fillnops fillnops.c

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