GNUmakefile 1.95 KB
#!smake -k
# --------------------------------------------------------------------
#        Copyright (C) 1997,1998 Nintendo. (Originated by SGI)
#        
#        $RCSfile: GNUmakefile,v $
#        $Revision: 1.1 $
#        $Date: 2003/04/08 01:00:35 $
# --------------------------------------------------------------------
#
# Makefile for tile_rect demo application 
#
#

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

#FINAL =

#ifdef FINAL
OPTIMIZER       = -O2
LCDEFS          = -DNDEBUG -D_FINALROM -DF3DEX_GBI_2
N64LIB          = -lultra_rom
#else
OPTIMIZER       = -g
LCDEFS          = -DDEBUG -DF3DEX_GBI_2
N64LIB          = -lultra_d
#endif

APP =		tile_rect

TARGETS =	rom

TEXHFILES =	./RGBA16cv01.h ./RGBA16cv02.h ./RGBA16cv03.h ./RGBA16cv04.h

HFILES =	$(TEXHFILES) tile_rect.h controller.h

CODEFILES   =	main.c tile_rectangle.c controller.c dram_stack.c

CODEOBJECTS =	$(CODEFILES:.c=.o)

DATAFILES   =	static.c cfb.c rsp_cfb.c

DATAOBJECTS =	$(DATAFILES:.c=.o)

CODESEGMENT =	codesegment.o

OBJECTS =	$(CODESEGMENT) $(DATAOBJECTS)

LCDEFS +=	$(HW_FLAGS)
LCINCS =	-I.
LCOPTS =	-Wall -non_shared -G 0 -mips2
LDFLAGS =	$(MKDEPOPT) -L$(ROOT)/usr/lib $(N64LIB) -lgcc

LDIRT  =	$(APP) $(TEXHFILES)

default:	$(TARGETS)

include $(COMMONRULES)

install:	default
		$(INSTALL) -m 444 -F /usr/src/PR/demos/$(APP)2d \
			$(CODEFILES) $(DATAFILES) Makefile spec \
			tile_rect.h controller.h *.rgb

main.o:	$(TEXHFILES)

$(CODESEGMENT):	$(CODEOBJECTS)
		$(LD) -o $(CODESEGMENT) -r $(CODEOBJECTS) $(LDFLAGS)

#ifdef FINAL
$(TARGETS) $(APP):      spec $(OBJECTS)
	$(MAKEROM) -s 9 -r $(TARGETS) spec
#ifndef NOMAKEMASK
	makemask $(TARGETS)
#endif
#else
$(TARGETS) $(APP):      spec $(OBJECTS)
	$(MAKEROM) -r $(TARGETS) spec
#endif

./RGBA16cv01.h: cv01.rgb
	$(RGB2C) -F -s 16 -m RGBA16cv01 $^ > $@

./RGBA16cv02.h: cv02.rgb
	$(RGB2C) -F -s 16 -m RGBA16cv02 $^ > $@

./RGBA16cv03.h: cv03.rgb
	$(RGB2C) -F -s 16 -m RGBA16cv03 $^ > $@

./RGBA16cv04.h: cv04.rgb
	$(RGB2C) -F -s 16 -m RGBA16cv04 $^ > $@