Makefile
1.56 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
#! smake
#
# NINTENDO64 SAMPLE PROGRAM
#
# FILE : Makefile
#
# Copyright (C) 1998, NINTENDO Co,Ltd.
#
#DBG_FLAG = -D_NON_DEBUG
include $(ROOT)/usr/include/make/PRdefs
APP = sample
#if defined(DBG_FLAG) && $(DBG_FLAG) == "-D_NON_DEBUG"
ULTRALIB = ultra_rom
OPTIMIZER = -mips2 -O2
MAKEROMDEFS =
#else
ULTRALIB = ultra_d
OPTIMIZER = -g
MAKEROMDEFS = -m
#endif
TARGETS = rom
CODEFILES = system.c main.c mysched.c audio.c action.c\
cursor.c bg.c tile.c puzzle.c sprite.c
CODEOBJECTS = $(CODEFILES:.c=.o)
CODESEGMENT = codesegment.o
STATICFILES = static.c
STATICOBJECTS = $(STATICFILES:.c=.o)
OBJFILES = cursor_txtr.c
OBJOBJECTS = $(OBJFILES:.c=.o)
BGFILES = bg_txtr.c
BGOBJECTS = $(BGFILES:.c=.o)
STATICSEGMENT = staticsegment.o
DATAFILES = system_cfb.c system_rspbuf.c
DATAOBJECTS = $(DATAFILES:.c=.o)
OBJECTS = $(CODESEGMENT) $(DATAOBJECTS) $(STATICSEGMENT)
MAPFILE = load.map
LCINCS = -I.\
-I$(ROOT)/usr/include/PR
LCOPTS = -fullwarn -wlint,-f -woff 813,819,826,827,852 \
-non_shared -G 0 -Xcpluscomm
LCDEFS =
LDIRT = $(APP) *.dat *.dbg *.lst *.sym *~ $(MAPFILE) \
Makedepend
LDFLAGS = $(MKDEPOPT) -nostdlib\
-L$(ROOT)/usr/lib -ln_audio -l$(ULTRALIB)
default: $(TARGETS)
include $(COMMONRULES)
install: default
$(CODESEGMENT): $(CODEOBJECTS)
$(LD) -o $(CODESEGMENT) -r $(CODEOBJECTS) $(LDFLAGS)
$(STATICSEGMENT): $(STATICOBJECTS) $(OBJOBJECTS) $(BGOBJECTS)
$(LD) -o $(STATICSEGMENT)\
-r $(STATICOBJECTS) $(OBJOBJECTS) $(BGOBJECTS) $(LDFLAGS)
rom: spec $(OBJECTS)
$(MAKEROM) $(MAKEROMDEFS) -r rom spec > $(MAPFILE)