Makefile 1.45 KB
#!smake
#
#  NINTENDO64 SAMPLE PROGRAM
#
#  FILE : Makefile
#
#  Copyright (C) 1997, NINTENDO Co,Ltd.
#


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

APP =		playseq

OPTIMIZER =	-g

#if defined(DBG_FLAG) && $(DBG_FLAG) == "-D_NON_DEBUG"
    DFLAG = -DNDEBUG
    ULTRALIB = ultra
    LEOLIB = leo
#else
    DFLAG = -D_DEBUG
    ULTRALIB = ultra_d
    LEOLIB = leo_d
#endif

TARGETS =	rom

HFILES =	playseq.h

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

CODESEGMENT =	codesegment.o

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

OBJECTS =	$(CODESEGMENT) $(DATAOBJECTS)

LCINCS =	-I. -I./lib
LCOPTS =	$(DFLAG) -fullwarn -non_shared -G 0

LDIRT  =	$(APP) $(APP_EM) sequence.aud load.map load_em.map gwrite *~

LDFLAGS =	$(MKDEPOPT) -nostdlib\
		-L$(ROOT)/usr/lib -l$(LEOLIB)\
		-L$(ROOT)/usr/lib -l$(ULTRALIB)

SEQFILE =	./seq/test.cmp

default:	spec $(OBJECTS)
		(cd tools; make)
		(cd bank;  make)
		$(ROOT)/usr/sbin/makedisk -t 0 -r $(TARGETS) spec

SUBDIRS =	bank lib tools

COMMONPREF =	playseq.disk

include $(COMMONRULES)

$(COMMONTARGS) : $(COMMONPREF)$$@
		$(SUBDIRS_MAKERULE)

install:	default
		(cd bank;  make install)
		(cd tools; make install)
		(cd lib;   make install)
		$(INSTALL) -m 444 -F /usr/src/PR/demos/playseq.disk\
			$(HFILES) $(CODEFILES) $(DATAFILES)\
			$(SEQFILE) Makefile spec README

$(CODESEGMENT):	$(CODEOBJECTS)
		(cd lib; make)
		$(LD) -m -o $(CODESEGMENT)\
			-r $(CODEOBJECTS) ./lib/dd_bnkf.o\
			$(LDFLAGS) > load.map