GNUmakefile
2.55 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
#!smake -k
# --------------------------------------------------------------------
# Copyright (C) 1997,1998 Nintendo. (Originated by SGI)
#
# $RCSfile: GNUmakefile,v $
# $Revision: 1.1 $
# $Date: 2003/04/04 18:09:30 $
# --------------------------------------------------------------------
#
# Makefile for topgun demo application
#
#
#
include $(ROOT)/usr/include/make/PRdefs
#FINAL =
#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 = topgun
TARGETS = 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
CODEFILES = topgun.c dram_stack.c rdp_output.c
CODEOBJECTS = $(CODEFILES:.c=.o)
DATAFILES = av8b.c \
cfb.c \
ground.c \
static.c \
zbuffer.c
DATAOBJECTS = $(DATAFILES:.c=.o)
CODESEGMENT = codesegment.o
OBJECTS = $(CODESEGMENT) $(DATAOBJECTS)
LCINCS = -I. -I$(ROOT)/usr/include/PR -I $(ROOT)/usr/include
LCOPTS = -Wall -non_shared -G 0 -mips2
LDIRT = $(APP) $(TEXHFILES) av8b.c av8b.h
LDFLAGS = $(MKDEPOPT) -L$(ROOT)/usr/lib -L$(ROOT)/usr/lib/PR $(N64LIB) -lgcc
default: $(TARGETS)
include $(COMMONRULES)
install: default
$(INSTALL) -m 444 -F /usr/src/PR/demos/topgun Makefile spec \
$(HFILES) $(CODEFILES) \
topgun.c cfb.c ground.c static.c zbuffer.c \
$(TEXTURES) $(MODELS)
$(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
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