Makefile.sgi
2.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#############################################################
#
# 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 #