GNUmakefile 1.61 KB
# --------------------------------------------------------------------
#        Copyright (C) 1997 Nintendo. (Originated by SGI)
#        
#        $RCSfile: GNUmakefile,v $
#        $Revision: 1.1 $
#        $Date: 2003/04/05 15:49:44 $
# --------------------------------------------------------------------
include $(ROOT)/usr/include/make/PRdefs

APP	= spbench
TARGETS	= rom

HFILES	= spbench.h

BOOTSOURCES	= spbench.c meter.c controller.c param.c
DATASOURCES     = framebuf.c

BOOTOBJECTS	= $(BOOTSOURCES:.c=.o)
DATAOBJECTS	= $(DATASOURCES:.c=.o)
BOOTSEGMENT	= boot.o

OBJECTS	= $(BOOTSEGMENT) $(DATAOBJECTS)

IMAGEFILES = ball16x16x8.rgba ball32x16x4.rgba ball32x32x2.rgba ball64x32.rgba
GENHFILES  = $(IMAGEFILES:.rgba=.h)

LCINCS	= -I. -I$(ROOT)/usr/include/PR -I $(ROOT)/usr/include
LCOPTS	= -Wall -non_shared -G 0 -mips2
LDIRT	= $(APP) $(BOOTSEGMENT) $(GENHFILES)
LDFLAGS	= $(MKDEPOPT) -L$(ROOT)/usr/lib -L$(ROOT)/usr/lib/PR -lultra -lgcc

default: $(TARGETS)

include $(COMMONRULES)

param.o: $(GENHFILES)

install: default
	$(INSTALL) -m 444 -F /usr/src/PR/demos/spbench \
		$(BOOTSOURCES) $(DATASOURCES) $(HFILES) $(IMAGEFILES) \
		README Makefile spec

ball16x16x8.h: ball16x16x8.rgba
	$(RGB2C) -m ball16x16x8 -f RGBA -s 16 $? > $@

ball32x16x4.h: ball32x16x4.rgba
	$(RGB2C) -m ball32x16x4 -f RGBA -s 16 $? > $@

ball32x32x2.h: ball32x32x2.rgba
	$(RGB2C) -m ball32x32x2 -f RGBA -s 16 $? > $@

ball64x32.h: ball64x32.rgba
	$(RGB2C) -m ball64x32 -f RGBA -s 16 $? > $@

$(TARGETS) $(APP): spec $(OBJECTS) $(MAKEROM)
	$(MAKEROM) -r $(TARGETS) spec

$(BOOTSEGMENT): $(BOOTOBJECTS)
	$(LD) -o $(BOOTSEGMENT) -r $(BOOTOBJECTS) $(LDFLAGS)