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