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

APP =		music

OPTIMIZER =	-O

TARGETS =	rom

TEXDIR  =	Texture

TEXTURES = 	${TEXDIR}/crsr.rgb  ${TEXDIR}/rew.rgb \
		${TEXDIR}/stop.rgb  ${TEXDIR}/play.rgb \
		${TEXDIR}/fwd.rgb   ${TEXDIR}/cueb.rgb \
		${TEXDIR}/cuef.rgb  ${TEXDIR}/lpen.rgb \
		${TEXDIR}/autoq.rgb ${TEXDIR}/sfxplay.rgb \
		${TEXDIR}/minus.rgb ${TEXDIR}/plus.rgb \
		${TEXDIR}/nbox.rgb \
		${TEXDIR}/letters.rgb	${TEXDIR}/pinfont1.rgb ${TEXDIR}/digit6.rgb


TEXHFILES = 	./${TEXDIR}/crsr_imgs.h        ./${TEXDIR}/crsr_bms.h \
		./${TEXDIR}/rew_imgs.h         ./${TEXDIR}/rew_bms.h \
		./${TEXDIR}/stop_imgs.h        ./${TEXDIR}/stop_bms.h \
		./${TEXDIR}/play_imgs.h        ./${TEXDIR}/play_bms.h \
		./${TEXDIR}/fwd_imgs.h         ./${TEXDIR}/fwd_bms.h \
		./${TEXDIR}/cueb_imgs.h         ./${TEXDIR}/cueb_bms.h \
		./${TEXDIR}/cuef_imgs.h         ./${TEXDIR}/cuef_bms.h \
		./${TEXDIR}/minus_imgs.h       ./${TEXDIR}/minus_bms.h \
		./${TEXDIR}/plus_imgs.h        ./${TEXDIR}/plus_bms.h \
		./${TEXDIR}/sfxplay_imgs.h     ./${TEXDIR}/sfxplay_bms.h \
		./${TEXDIR}/lpen_imgs.h		./${TEXDIR}/lpen_bms.h \
		./${TEXDIR}/autoq_imgs.h	./${TEXDIR}/autoq_bms.h \
		./${TEXDIR}/nbox_imgs.h		./${TEXDIR}/nbox_bms.h \
		./${TEXDIR}/letters_imgs.h \
		./${TEXDIR}/pinfont1_imgs.h \
		./${TEXDIR}/digit6_imgs.h

SPRITES =       ./crsr_sprite.h ./rew_sprite.h ./stop_sprite.h ./play_sprite.h \
		./fwd_sprite.h ./cueb_sprite.h ./cuef_sprite.h ./nbox_sprite.h \
		./minus_sprite.h ./plus_sprite.h ./sfxplay_sprite.h ./lpen_sprite.h \
		./autoq_sprite.h

HFILES =	music.h \
		audio.h \
		gfx.h \
		transport.h \
		sndplayUI.h \
		cursor.h \
		musicUI.h \
		UI.h \
		UIpane.h \
		utils.h \
		sequence.h \
		font.h \
		font_ext.h \
		misc.h \
		performance.h \
		channelUI.h

CODEFILES =	music.c \
		audio.c \
		gfx.c \
		transport.c \
		UIutils.c \
		sndplayUI.c \
		cursor.c \
		musicUI.c \
		UIpane.c \
		utils.c \
		sequence.c \
		misc.c \
		font.c \
		hist.c \
		controller.c \
		performance.c \
		channelUI.c

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

CODESEGMENT =	codesegment.o

DATAFILES =	gfxdynamic.c gfxzbuffer.c gfxinit.c gfxstatic.c gfxcfb.c gfxyield.c

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

OBJECTS =	$(SPRITES) $(CODESEGMENT) $(DATAOBJECTS)

LCINCS =	-I. -I$(ROOT)/usr/include/PR 
LCOPTS =	-D_DEBUG -Wall -non_shared -G 0 -mips2
LCDEFS =

LDIRT  =	$(APP) $(TEXHFILES) *.so $(SPRITES) load.map sequence.aud

LDFLAGS =	$(MKDEPOPT) -L$(ROOT)/usr/lib -L$(ROOT)/usr/lib/PR \
		-lultra_d -lgcc

default:	$(TARGETS)

include $(COMMONRULES)

install:	default
		$(INSTALL) -m 444 -F /usr/src/PR/demos/music \
			$(HFILES) $(CODEFILES) $(SPECIFICCODEFILES) \
			$(DATAFILES) $(TEXTURES) Makefile spec log.fmt

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

rom $(APP):	spec $(OBJECTS) $(MAKEROM)
		$(MAKEROM) spec


#
# Font images
#
./${TEXDIR}/letters_imgs.h:        ${TEXDIR}/letters.rgb
	cd ${TEXDIR}; $(RGB2C) -F -m letters_imgs -f I -s 4 letters.rgb > letters_imgs.h


./${TEXDIR}/digit6_imgs.h:        ${TEXDIR}/digit6.rgb
	cd ${TEXDIR}; $(RGB2C) -F -m digit6_imgs -f I -s 4 digit6.rgb > digit6_imgs.h


./${TEXDIR}/pinfont1_imgs.h:        ${TEXDIR}/pinfont1.rgb
	cd ${TEXDIR}; $(RGB2C) -F -m pinfont1_imgs -f I -s 4 pinfont1.rgb > pinfont1_imgs.h

font.o:         ./${TEXDIR}/letters_imgs.h ./${TEXDIR}/pinfont1_imgs.h ./${TEXDIR}/digit6_imgs.h


#
# Sprite images
#
./crsr_sprite.h:	${TEXDIR}/crsr.rgb
	cd ${TEXDIR}; $(MKSPRITE) crsr crsr.rgb 5 7 0 > ../crsr_sprite.h

./rew_sprite.h:		${TEXDIR}/rew.rgb
	cd ${TEXDIR}; $(MKSPRITE) rew rew.rgb 9 9 0 > ../rew_sprite.h

./stop_sprite.h:	${TEXDIR}/stop.rgb
	cd ${TEXDIR}; $(MKSPRITE) stop stop.rgb 9 9 0 > ../stop_sprite.h

./play_sprite.h:	${TEXDIR}/play.rgb
	cd ${TEXDIR}; $(MKSPRITE) play play.rgb 9 9 0 > ../play_sprite.h

./fwd_sprite.h:		${TEXDIR}/fwd.rgb
	cd ${TEXDIR}; $(MKSPRITE) fwd  fwd.rgb 9 9 0 > ../fwd_sprite.h

./cueb_sprite.h:	${TEXDIR}/cueb.rgb
	cd ${TEXDIR}; $(MKSPRITE) cueb cueb.rgb 9 9 0 > ../cueb_sprite.h

./cuef_sprite.h:	${TEXDIR}/cuef.rgb
	cd ${TEXDIR}; $(MKSPRITE) cuef cuef.rgb 9 9 0 > ../cuef_sprite.h

./minus_sprite.h:	${TEXDIR}/minus.rgb
	cd ${TEXDIR}; $(MKSPRITE) minus minus.rgb 5 5 0 > ../minus_sprite.h

./plus_sprite.h:	${TEXDIR}/plus.rgb
	cd ${TEXDIR}; $(MKSPRITE) plus plus.rgb 5 5 0 > ../plus_sprite.h

./sfxplay_sprite.h:	${TEXDIR}/sfxplay.rgb
	cd ${TEXDIR}; $(MKSPRITE) sfxplay sfxplay.rgb 12 10 0 > ../sfxplay_sprite.h

./lpen_sprite.h:	${TEXDIR}/lpen.rgb
	cd ${TEXDIR}; $(MKSPRITE) lpen lpen.rgb 9 9 0 > ../lpen_sprite.h

./nbox_sprite.h:	${TEXDIR}/nbox.rgb
	cd ${TEXDIR}; $(MKSPRITE) nbox nbox.rgb 40 14 0 > ../nbox_sprite.h

./autoq_sprite.h:	${TEXDIR}/autoq.rgb
	cd ${TEXDIR}; ${MKSPRITE} autoq autoq.rgb 9 9 0 > ../autoq_sprite.h