Makefile 2.53 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 = 	Fast3D F3DNoN Turbo3D Line3D Sprite2D

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

COMMONPREF = graphics
include $(COMMONRULES)

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

install exports: $(_FORCE) ${TARGETS}
	$(SUBDIRS_MAKERULE)
	$(INSTALL) -m 555 -F /usr/src/PR/rspcode/graphics labeltest sizecheck Makefile fillnops.c $(COMMON_UCODE)

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
	$(CC) -o fillnops fillnops.c

MBI2BIN_OBJS =	mbi2bin.o

MBI2READ_OBJS =	mbi2read.o

mbi2bin:	${MBI2BIN_OBJS}
	$(CC) -o $@ ${MBI2BIN_OBJS} ${LDFLAGS}

mbi2read:	${MBI2READ_OBJS}
	$(CC) -o $@ ${MBI2READ_OBJS} ${LDFLAGS}

gbi2read:	parse_gbi.c
	$(CC) -o $@ parse_gbi.c -DGBI_STANDALONE ${LCINCS} ${LDFLAGS}

setup:	setup.o
	$(CC) -o $@ setup.o ${LDFLAGS} -limage

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