Makefile 2.96 KB
#!smake -k
# --------------------------------------------------------------------
#        Copyright (C) 1997,1998 Nintendo. (Originated by SGI)
#
#        $RCSfile: Makefile,v $
#        $Revision: 1.1.1.2 $
#        $Date: 2002/10/29 08:05:48 $
# --------------------------------------------------------------------
#
# Makefile for ddspgame demo application
#
#

#START_FROM_CASSETTE = YES
#FINAL =

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

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

APP =		main
TARGETS =	rom

TEXDIR  =	Texture

TEXTURES = 	${TEXDIR}/L2_TV.rgb  \
		${TEXDIR}/ball.rgba

TEXHFILES = 	./${TEXDIR}/lit_imgs.h          ./${TEXDIR}/lit_bms.h \
		./${TEXDIR}/ball_imgs.h         ./${TEXDIR}/ball_bms.h

SPRITES =       ./sp_lit.h ./sp_ball.h

HFILES =	cont.h font.h hdd.h herr.h hscr.h htry.h \
		main.h sysassigned.h hdd_internal.h	

CODEFILES   =	main.c spgame.c font.c pics.c \
		cont.c dd.c messages.c static.c \
		heap.c try.c test_64dd.c err.c dram_stack.c

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

DATAFILES   =	cfb.c rsp_cfb.c kbuffer.c

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

DOCFILES = 	README.jp command.jp funcs.jp

CODESEGMENT =	codesegment.o

OBJECTS =	$(CODESEGMENT) $(DATAOBJECTS)

LCDEFS += -DEUC_CODE 

#ifdef START_FROM_CASSETTE
LCDEFS += -DSTART_FROM_CASSETTE
#endif

LCINCS =	-I. -I$(ROOT)/usr/include/PR \
		-I$(ROOT)/PR/libultra/io -I$(ROOT)/PR/libultra/os 
LCOPTS =	-fullwarn -wlint,-f -woff 813,819,822,826,827,852  \
		-non_shared -G 0 -Xcpluscomm

LDFLAGS =	$(MKDEPOPT) -nostdlib -L$(ROOT)/usr/lib $(N64LIB)

LDIRT  =	$(APP) gwrite  $(TEXHFILES) $(SPRITES) disk

default:	$(TARGETS)

include $(COMMONRULES)

install:	default
		$(INSTALL) -m 444 -F /usr/src/PR/demos/ddspgame \
		    $(HFILES) $(CODEFILES) $(DATAFILES) $(TEXTURES) \
		    dd_core.c dd_func.c dd_checksum.c	\
		    Makefile spec n64mdisk.cfg		\
		    $(DOCFILES)

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

#ifdef START_FROM_CASSETTE
#ifdef FINAL
$(TARGETS) $(APP):	spec $(OBJECTS) $(MAKEROM)
		$(MAKEROM) -s 9 -r $(TARGETS) spec
#ifndef NOMAKEMASK
		makemask $(TARGETS)
#endif
#else
$(TARGETS) $(APP):	spec $(OBJECTS) $(MAKEROM)
		$(MAKEROM) -r $(TARGETS) spec
#endif
#else
#ifdef FINAL
$(TARGETS) $(APP):	spec $(OBJECTS) $(MAKEROM)
		$(ROOT)/usr/sbin/makedisk -t 0 -R $(TARGETS) spec
		$(ROOT)/usr/sbin/n64mdisk n64mdisk.cfg
#else
$(TARGETS) $(APP):	spec $(OBJECTS) $(MAKEROM)
		$(ROOT)/usr/sbin/makedisk -t 0 -R $(TARGETS) spec
#endif
#endif


spgame.o:	$(TEXHFILES) $(SPRITES)

pics.o:		./sp_lit.h

./sp_lit.h:	${TEXDIR}/L2_TV.rgb
	cd ${TEXDIR}; $(MKSPRITE) lit L2_TV.rgb 64 16 0 > ../sp_lit.h

./${TEXDIR}/lit_imgs.h ./${TEXDIR}/lit_bms.h:	./sp_lit.h


./sp_ball.h:	${TEXDIR}/ball.rgba
	cd ${TEXDIR}; $(MKSPRITE) ball ball.rgba 15 15 1 > ../sp_ball.h


./${TEXDIR}/ball_imgs.h ./${TEXDIR}/ball_bms.h:	./sp_ball.h


# DO NOT DELETE