Makefile.dos 2.39 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

# command names #
LIB		= $(ROOT)/usr/lib
LPR		= $(LIB)/PR
INC		= $(ROOT)/usr/include
AR		= ar rc
RM		= del
CC		= gcc
LD		= ld
CP		= copy
VPATH		= .

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

# compile C files to object files #
.c.o:
	$(CC) $(OPTIMIZER) $(DEFINES) $(USE_OLD_LIBRARY) -G 0 -c -I.. -I$(INC) -I$(INC)/PR -D_MIPS_SZLONG=32 -D_MIPS_SZINT=32 $<

# 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:	libgmus.a libn_gmus.a libgmus_d.a libn_gmus_d.a

include $(FILE_DEPENDS)

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

# remove generated files #
remove:
	$(RM) libgmus\*.o
	$(RM) libgmus\libgmus.a
	$(RM) libgmus.a
	$(RM) libn_gmus\*.o
	$(RM) libn_gmus\libn_gmus.a
	$(RM) libn_gmus.a
	$(RM) libgmus_d\*.o
	$(RM) libgmus_d\libgmus_d.a
	$(RM) libgmus_d.a
	$(RM) libn_gmus_d\*.o
	$(RM) libn_gmus_d\libn_gmus_d.a
	$(RM) libn_gmus_d.a

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

# standard library
libgmus.a:	$(LIBFILES)
	mkdir libgmus
	make -C libgmus -f ../Makefile.dos thislib LIBNAME='libgmus.a' DEFINES='' OPTIMIZER='-O3' VPATH='..'


# n_audio library
libn_gmus.a:	$(LIBFILES)
	-mkdir libn_gmus
	make -C libn_gmus -f ../Makefile.dos thislib LIBNAME='libn_gmus.a' DEFINES='-DSUPPORT_NAUDIO' OPTIMIZER='-O3' VPATH='..'

# debug library
libgmus_d.a:	$(LIBFILES)
	-mkdir libgmus_d
	make -C libgmus_d -f ../Makefile.dos thislib LIBNAME='libgmus_d.a' DEFINES='-D_AUDIODEBUG' OPTIMIZER='-O0 -g' VPATH='..'

# debug n_audio library
libn_gmus_d.a:	$(LIBFILES)
	-mkdir libn_gmus_d
	make -C libn_gmus_d -f ../Makefile.dos thislib LIBNAME='libn_gmus_d.a' DEFINES='-D_AUDIODEBUG -DSUPPORT_NAUDIO' OPTIMIZER='-O0 -g' VPATH='..'


# end of file #