Makefile.sgi 2.49 KB

#############################################################
#
#  Makefile : Nintendo 64 Music Tools Programmers Library
#  (c) Copyright 1997/1998, Software Creations (Holdings) Ltd.
#
#  Version 3.11
#
#  Make file for library.
#
#############################################################

# special option #
# If you are using older N64OS than OS2.0i with patch5, uncomment next line.
#USE_OLD_LIBRARY = -D_OLD_AUDIO_LIBRARY

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

# command names #
AR		= ar cq
RM		= rm -f
CC		= cc
LD		= ld
CP		= cp
VPATH		= .

.PATH:	..

# addition files used by make #
FILE_MAKEROM	= Makefile.makerom
FILE_DEPENDS	= $(VPATH)/Makefile.depend

# compilation and linking settings #
OPTIMIZER 	= -O2 -mips2

# standard compilation and linking settings #
CCOPTS		= -Wab,-r4300_mul $(DEFINES) -fullwarn\
	 	  -non_shared -G 0 -Xcpluscomm -I/usr/include/PR  -I../
LDFLAGS		= $(MKDEPOPT) -nostdlib -L$(ROOT)/usr/lib\
		  -L$(ROOT)/usr/lib/PR $(LIBS)

# files to be made #
LIBFILES	= player.c player_fx.c aud_dma.c aud_samples.c aud_sched.c aud_thread.c lib_memory.c
LIBOBJECTS	= $(LIBFILES:.c=.o)

# default builds all libraries...
default:	libmus.a libn_mus.a libmus_d.a libn_mus_d.a

include $(COMMONRULES)
include $(FILE_DEPENDS)

# generate music library file #
thislib:	$(LIBOBJECTS)
	$(AR) $(LIBNAME) $(LIBOBJECTS)
	$(CP) $(LIBNAME) ..

# remove generated files #
remove:
	$(RM) *.a */*.[ao]

# compile C files to object files #
.c.o:
	$(CC) $(CCOPTS) $(OPTIMIZER) $(USE_OLD_LIBRARY) -c ../$*.c


#############################################################
# build libraries
#############################################################

# standard library
libmus.a:
	@if [ ! -d libmus ]; then mkdir libmus; fi;
	cd  libmus ; make -f ../Makefile.sgi thislib LIBNAME='libmus.a' DEFINES='' OPTIMIZER='-O2 -mips2' VPATH='..'; cd ..

# n_audio library
libn_mus.a:
	@if [ ! -d libn_mus ]; then mkdir libn_mus; fi;
	cd  libn_mus ; make -f ../Makefile.sgi thislib LIBNAME='libn_mus.a' DEFINES='-DSUPPORT_NAUDIO' OPTIMIZER='-O2 -mips2' VPATH='..'; cd ..

# debug library
libmus_d.a:
	@if [ ! -d libmus_d ]; then mkdir libmus_d; fi;
	cd  libmus_d ; make -f ../Makefile.sgi thislib LIBNAME='libmus_d.a' DEFINES='-D_AUDIODEBUG' OPTIMIZER='-g0 -mips2' VPATH='..'; cd ..

# debug n_audio library
libn_mus_d.a:
	@if [ ! -d libn_mus_d ]; then mkdir libn_mus_d; fi;
	cd  libn_mus_d ; make -f ../Makefile.sgi thislib LIBNAME='libn_mus_d.a' DEFINES='-D_AUDIODEBUG -DSUPPORT_NAUDIO' OPTIMIZER='-g0 -mips2' VPATH='..'; cd ..


# end of file #