Makefile
2.96 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
#!smake -k
# --------------------------------------------------------------------
# Copyright (C) 1997,1998 Nintendo. (Originated by SGI)
#
# $RCSfile: Makefile,v $
# $Revision: 1.1.1.2 $
# $Date: 2002/10/29 08:05:48 $
# --------------------------------------------------------------------
#
# Makefile for ddspgame demo application
#
#
#START_FROM_CASSETTE = YES
#FINAL =
include $(ROOT)/usr/include/make/PRdefs
PRDEPTH = ../..
#ifdef FINAL
OPTIMIZER = -O2
LCDEFS = -DNDEBUG -D_FINALROM -DF3DEX_GBI_2
N64LIB = -lleo -lultra_rom
#else
OPTIMIZER = -g
LCDEFS = -DDEBUG -DF3DEX_GBI_2
N64LIB = -lleo_d -lultra_d
#endif
APP = main
TARGETS = rom
TEXDIR = Texture
TEXTURES = ${TEXDIR}/L2_TV.rgb \
${TEXDIR}/ball.rgba
TEXHFILES = ./${TEXDIR}/lit_imgs.h ./${TEXDIR}/lit_bms.h \
./${TEXDIR}/ball_imgs.h ./${TEXDIR}/ball_bms.h
SPRITES = ./sp_lit.h ./sp_ball.h
HFILES = cont.h font.h hdd.h herr.h hscr.h htry.h \
main.h sysassigned.h hdd_internal.h
CODEFILES = main.c spgame.c font.c pics.c \
cont.c dd.c messages.c static.c \
heap.c try.c test_64dd.c err.c dram_stack.c
CODEOBJECTS = $(CODEFILES:.c=.o)
DATAFILES = cfb.c rsp_cfb.c kbuffer.c
DATAOBJECTS = $(DATAFILES:.c=.o)
DOCFILES = README.jp command.jp funcs.jp
CODESEGMENT = codesegment.o
OBJECTS = $(CODESEGMENT) $(DATAOBJECTS)
LCDEFS += -DEUC_CODE
#ifdef START_FROM_CASSETTE
LCDEFS += -DSTART_FROM_CASSETTE
#endif
LCINCS = -I. -I$(ROOT)/usr/include/PR \
-I$(ROOT)/PR/libultra/io -I$(ROOT)/PR/libultra/os
LCOPTS = -fullwarn -wlint,-f -woff 813,819,822,826,827,852 \
-non_shared -G 0 -Xcpluscomm
LDFLAGS = $(MKDEPOPT) -nostdlib -L$(ROOT)/usr/lib $(N64LIB)
LDIRT = $(APP) gwrite $(TEXHFILES) $(SPRITES) disk
default: $(TARGETS)
include $(COMMONRULES)
install: default
$(INSTALL) -m 444 -F /usr/src/PR/demos/ddspgame \
$(HFILES) $(CODEFILES) $(DATAFILES) $(TEXTURES) \
dd_core.c dd_func.c dd_checksum.c \
Makefile spec n64mdisk.cfg \
$(DOCFILES)
$(CODESEGMENT): $(CODEOBJECTS)
$(LD) -o $(CODESEGMENT) -r $(CODEOBJECTS) $(LDFLAGS)
#ifdef START_FROM_CASSETTE
#ifdef FINAL
$(TARGETS) $(APP): spec $(OBJECTS) $(MAKEROM)
$(MAKEROM) -s 9 -r $(TARGETS) spec
#ifndef NOMAKEMASK
makemask $(TARGETS)
#endif
#else
$(TARGETS) $(APP): spec $(OBJECTS) $(MAKEROM)
$(MAKEROM) -r $(TARGETS) spec
#endif
#else
#ifdef FINAL
$(TARGETS) $(APP): spec $(OBJECTS) $(MAKEROM)
$(ROOT)/usr/sbin/makedisk -t 0 -R $(TARGETS) spec
$(ROOT)/usr/sbin/n64mdisk n64mdisk.cfg
#else
$(TARGETS) $(APP): spec $(OBJECTS) $(MAKEROM)
$(ROOT)/usr/sbin/makedisk -t 0 -R $(TARGETS) spec
#endif
#endif
spgame.o: $(TEXHFILES) $(SPRITES)
pics.o: ./sp_lit.h
./sp_lit.h: ${TEXDIR}/L2_TV.rgb
cd ${TEXDIR}; $(MKSPRITE) lit L2_TV.rgb 64 16 0 > ../sp_lit.h
./${TEXDIR}/lit_imgs.h ./${TEXDIR}/lit_bms.h: ./sp_lit.h
./sp_ball.h: ${TEXDIR}/ball.rgba
cd ${TEXDIR}; $(MKSPRITE) ball ball.rgba 15 15 1 > ../sp_ball.h
./${TEXDIR}/ball_imgs.h ./${TEXDIR}/ball_bms.h: ./sp_ball.h
# DO NOT DELETE