Makefile
2.66 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
#!smake -k
#
# Makefile for topgun demo application
#
#
#
DDPROCDIR = ../ddproc
PRDEPTH = ../../..
include $(ROOT)/usr/include/make/PRdefs
#FINAL =
#ifdef FINAL
OPTIMIZER = -O2
LCDEFS =
N64LIB = -lleo -lultra_rom
ARGS = FINAL=
#else
OPTIMIZER = -g
LCDEFS = -DDEBUG
N64LIB = -lleo_d -lultra_d
#endif
APP = topgun
TARGETS = topgun.rom
TEXHFILES = ground.h sky.h tree.h
TEXTURES = Textures/clouds.rgb Textures/harrier_num.rgba \
Textures/stree1.rgba Textures/terrain.rgb \
Textures/camo2.int Textures/decal.inta
MODELS = Models/av8b.flt
HFILES = topgun.h herr.h hmenu.h
CODEFILES = topgun.c dram_stack.c rdp_output.c rdp_output_len.c \
dd_proc.c dd_rtc.c dd_summon.c err.c \
menu.c
CODEOBJECTS = $(CODEFILES:.c=.o)
DATAFILES = av8b.c \
cfb.c \
ground.c \
static.c \
zbuffer.c
DATAOBJECTS = $(DATAFILES:.c=.o)
DDPROCOBJECT = ddproc.o
CODESEGMENT = codesegment.o
OBJECTS = $(CODESEGMENT) $(DATAOBJECTS)
LCINCS = -I. -I$(ROOT)/usr/include/PR -I$(ROOT)/usr/include -I$(DDPROCDIR)
LCOPTS = -fullwarn -non_shared -G 0
LDIRT = $(APP) $(TARGETS) av8b.c av8b.h $(TEXHFILES) Makedepend
LDFLAGS = $(MKDEPOPT) -nostdlib -L$(ROOT)/usr/lib -L$(ROOT)/usr/lib/PR $(N64LIB)
default: $(TARGETS)
include $(COMMONRULES)
install: default
$(INSTALL) -m 444 -F /usr/src/PR/demos/reboot/topgun \
Makefile spec $(HFILES) $(CODEFILES) \
cfb.c ground.c static.c zbuffer.c \
$(TEXTURES) $(MODELS)
$(CODESEGMENT): $(CODEOBJECTS) $(DDPROCOBJECT)
$(LD) -o $(CODESEGMENT) -r $(CODEOBJECTS) $(DDPROCOBJECT) $(LDFLAGS)
#ifdef FINAL
$(TARGETS) $(APP): spec $(OBJECTS)
$(MAKEROM) -s 9 -r $(TARGETS) -B 0 spec
#ifndef NOMAKEMASK
makemask $(TARGETS)
#endif
#else
$(TARGETS) $(APP): spec $(OBJECTS)
$(MAKEROM) -r $(TARGETS) -B 0 spec
#endif
ddproc.o : $(DDPROCDIR)/ddproc.o
cp $(DDPROCDIR)/ddproc.o .
$(DDPROCDIR)/ddproc.o !
(cd $(DDPROCDIR);$(MAKE) START_FROM_CASSETTE= $(ARGS));
av8b.c: Models/av8b.flt Textures/harrier_num.rgba Textures/camo2.int \
Textures/decal.inta $(FLT2C)
$(FLT2C) -m av8b -s 10 -C 1 1 1 -L 1.0 0.0 0.0 \
-r G_RM_AA_ZB_OPA_SURF G_RM_AA_ZB_OPA_DECAL Models/av8b.flt > av8b.c
# This rule has to be here because they need to be created if Makedepend
# doesn't exist:
ground.o: sky.h ground.h tree.h
sky.h: Textures/clouds.rgb $(RGB2C)
$(RGB2C) -m tex_sky -f IA -s 16 Textures/clouds.rgb >sky.h
ground.h: Textures/terrain.rgb $(RGB2C)
$(RGB2C) -m tex_ground -f RGBA -l 100,50,0 -h 0,50,0 \
Textures/terrain.rgb >ground.h
tree.h: Textures/stree1.rgba $(RGB2C)
$(RGB2C) -m tex_tree -f IA -s 4 Textures/stree1.rgba >tree.h