Makefile
3.71 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#!smake -k
# --------------------------------------------------------------------
# Copyright (C) 1997,1998 Nintendo. (Originated by SGI)
#
# $RCSfile: Makefile,v $
# $Revision: 1.1.1.2 $
# $Date: 2002/10/29 08:05:56 $
# --------------------------------------------------------------------
#
# Makefile for game template
#
#
include $(ROOT)/usr/include/make/PRdefs
#ifdef FINAL
OPTIMIZER = -O2
LCDEFS = -D_FINALROM -DNDEBUG -DF3DEX_GBI_2
N64LIB = -lultra_rom
#else
OPTIMIZER = -g
LCDEFS = -DDEBUG -DF3DEX_GBI_2
N64LIB = -lultra_d
#endif
APP = game
TARGETS = rom
TEXHFILES = ./RGBA16molecule.h ./RGBA16moleculeMM.h \
./RGBA16moleculeHMM.h \
./RGBA16brick.h ./RGBA16brickMM.h \
./RGBA16brickHMM.h \
./RGBA16chainlink.h ./RGBA16chainlinkMM.h \
./RGBA16chainlinkHMM.h \
./RGBA16mymip.h ./RGBA16mymipMM.h \
./RGBA16mymipHMM.h \
./RGBA16checker.h ./RGBA16checkerMM.h \
./RGBA16checkerHMM.h
HFILES = $(TEXHFILES) boot.h game.h controller.h font.h font_ext.h \
static.h texture.h
CODEFILES = boot.c game.c controller.c font.c dram_stack.c
CODEOBJECTS = $(CODEFILES:.c=.o)
DATAFILES = gfxinit.c gfxstatic.c texture.c cfb.c rsp_cfb.c zbuffer.c
DATAOBJECTS = $(DATAFILES:.c=.o)
CODESEGMENT = codesegment.o
OBJECTS = $(CODESEGMENT) $(DATAOBJECTS)
LCDEFS += $(HW_FLAGS)
LCINCS = -I.
LCOPTS = -fullwarn -wlint,-f -woff 813,819,826,827,852 -non_shared -G 0
LDFLAGS = $(MKDEPOPT) -nostdlib -L$(ROOT)/usr/lib $(N64LIB)
LDIRT = $(APP) $(TEXHFILES)
default: $(TARGETS)
include $(COMMONRULES)
install: default
$(INSTALL) -m 444 -F /usr/src/PR/demos/mipmap \
$(CODEFILES) $(DATAFILES) Makefile spec \
boot.h game.h controller.h font.h \
font_ext.h static.h texture.h
$(INSTALL) -m 444 -F /usr/src/PR/demos/mipmap *.rgb *.rgba
gfxstatic.o: $(TEXHFILES)
$(CODESEGMENT): $(CODEOBJECTS)
$(LD) -o $(CODESEGMENT) -r $(CODEOBJECTS) $(LDFLAGS)
#ifdef FINAL
$(TARGETS) $(APP): spec $(OBJECTS)
$(MAKEROM) -s 9 -r $(TARGETS) spec
#ifndef NOMAKEMASK
makemask $(TARGETS)
#endif
#else
$(TARGETS) $(APP): spec $(OBJECTS)
$(MAKEROM) -r $(TARGETS) spec
#endif
./RGBA16molecule.h: molecule.rgba
$(RGB2C) -r -F -s 16 -m RGBA16molecule molecule.rgba > $@
./RGBA16moleculeMM.h: molecule.rgba
$(RGB2C) -r -F -s 16 -m RGBA16moleculeMM -o MIP molecule.rgba > $@
./RGBA16moleculeHMM.h: molecule[0-9].rgba
$(RGB2C) -r -F -s 16 -m RGBA16moleculeHMM -o MIPSUPPLIED molecule0.rgba > $@
./RGBA16mymip.h: mymip.rgb
$(RGB2C) -r -F -s 16 -m RGBA16mymip mymip.rgb > $@
./RGBA16mymipMM.h: mymip.rgb
$(RGB2C) -r -F -s 16 -m RGBA16mymipMM -o MIP mymip.rgb > $@
./RGBA16mymipHMM.h: mymip[0-9].rgb
$(RGB2C) -r -F -s 16 -m RGBA16mymipHMM -o MIPSUPPLIED mymip0.rgb > $@
./RGBA16brick.h: brick.rgb
$(RGB2C) -r -F -s 16 -m RGBA16brick brick.rgb > $@
./RGBA16brickMM.h: brick.rgb
$(RGB2C) -r -F -s 16 -m RGBA16brickMM -o MIP brick.rgb > $@
./RGBA16brickHMM.h: brick[0-9].rgb
$(RGB2C) -r -F -s 16 -m RGBA16brickHMM -o MIPSUPPLIED brick0.rgb > $@
./RGBA16chainlink.h: chainlink.rgb
$(RGB2C) -r -F -s 16 -m RGBA16chainlink chainlink.rgb > $@
./RGBA16chainlinkMM.h: chainlink.rgb
$(RGB2C) -r -F -s 16 -m RGBA16chainlinkMM -o MIP chainlink.rgb > $@
./RGBA16chainlinkHMM.h: chainlink[0-9].rgb
$(RGB2C) -r -F -s 16 -m RGBA16chainlinkHMM -o MIPSUPPLIED chainlink0.rgb > $@
./RGBA16checker.h: checker.rgba
$(RGB2C) -r -F -s 16 -m RGBA16checker checker.rgba > $@
./RGBA16checkerMM.h: checker.rgba
$(RGB2C) -r -F -s 16 -m RGBA16checkerMM -o MIP checker.rgba > $@
./RGBA16checkerHMM.h: checker[0-9].rgb
$(RGB2C) -r -F -s 16 -m RGBA16checkerHMM -o MIPSUPPLIED checker0.rgb > $@
texture.o: molecule*.rgba brick*.rgb checker*.rgb checker.rgba chainlink*.rgb mymip*.rgb