Makefile
2.64 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
# --------------------------------------------------------------------
# Copyright (C) 1997 Nintendo. (Originated by SGI)
#
# $RCSfile: Makefile,v $
# $Revision: 1.1.1.1 $
# $Date: 2002/05/02 03:27:21 $
# --------------------------------------------------------------------
include $(ROOT)/usr/include/make/PRdefs
APP = space
OPTIMIZER = -O
TARGETS = rom
MVTOPT = -DMVTVIEW
MVTFILES = mvtview.c
HFILES = space.h audio.h gfx.h misc.h spacerom.h \
gfx_tri.h gfx_vtx.h matrix.h vector.h
CODEFILES = misc.c
CODEOBJECTS = $(CODEFILES:.c=.o)
SPECIFICCODEFILES = main.c space.c audio.c matrix.c vector.c \
${MVTFILES}
SCODEOBJECTS = $(SPECIFICCODEFILES:.c=.o)
CODESEGMENT = codesegment.o
MODELFILES = enterprise.c
DATAFILES = gfxdynamic.c gfxzbuffer.c gfxinit.c gfxstatic.c gfxcfb.c \
gfxyield.c ${MODELFILES}
DATAOBJECTS = $(DATAFILES:.c=.o)
OBJECTS = $(CODESEGMENT) $(DATAOBJECTS)
#if defined(DBG_FLAG) && $(DBG_FLAG) == "-D_NON_DEBUG"
DFLAG = -DNDEBUG
ULTRALIB = ultra
#else
DFLAG = -D_DEBUG
ULTRALIB = ultra_d
#endif
LCINCS = -I. -I$(ROOT)/usr/include/PR
LCOPTS = $(DFLAG) $(MVTOPT) $(SMALLCFBOPT) -fullwarn -non_shared -G 0
LDFLAGS = $(MKDEPOPT) -nostdlib -L$(ROOT)/usr/lib -L$(ROOT)/usr/lib/PR \
-l$(ULTRALIB)
LDIRT = $(APP) sphere17.h sphere17.c sphere12.h sphere12.c sphere10.h sphere10.c \
makesphere ./sp_background.h ./mahogany.h \
Texture/background_bms.h Texture/background_imgs.h load.map
default: $(TARGETS)
include $(COMMONRULES)
install: default
$(INSTALL) -m 444 -F /usr/src/PR/demos/space\
$(HFILES) $(CODEFILES) $(SPECIFICCODEFILES) \
$(DATAFILES) Makefile spec log.fmt
$(CODESEGMENT): $(CODEOBJECTS) $(SCODEOBJECTS)
$(LD) -m -o $(CODESEGMENT) -r $(CODEOBJECTS) \
$(SCODEOBJECTS) $(LDFLAGS) > load.map
rom $(APP): spec $(OBJECTS) $(MAKEROM)
$(MAKEROM) $(MVTOPT) spec
16bit: clean
$(MAKE) SMALLCFBOPT=-DCFB_16_BIT rom
main.o: ./sp_background.h
gfxstatic.o: ./sphere10.c ./sphere12.c ./sphere17.c ./mahogany.h
./mahogany.h: Texture/mahogany.rgb $(RGB2C)
$(RGB2C) -m mahogany -f IA Texture/mahogany.rgb > mahogany.h
./sp_background.h: Texture/SpaceBackground.rgb
cd Texture; $(MKSPRITE) background SpaceBackground.rgb 160 6 0 > ../sp_background.h
makesphere: makesphere.c
$(CC) -o makesphere makesphere.c -lm
./sphere10.c: makesphere
makesphere -S 256 -T 512 -r 10 > sphere10.h
makesphere -S 256 -T 512 -r 10 -t > sphere10.c
./sphere12.c: makesphere
makesphere -S 256 -T 512 -r 12 > sphere12.h
makesphere -S 256 -T 512 -r 12 -t > sphere12.c
./sphere17.c: makesphere
makesphere -S 256 -T 512 -r 17 > sphere17.h
makesphere -S 256 -T 512 -r 17 -t > sphere17.c