Makefile
2.25 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
#! smake
#---------------------------------------------------------------------
# Copyright (C) 1997, Nintendo.
#
# File Makefile
# Coded by Yoshitaka Yasumoto. Mar 19, 1997.
# Modified by
# Comments
#
# $Id: Makefile,v 1.1.1.1 2002/05/02 03:27:17 blythe Exp $
#---------------------------------------------------------------------
include $(ROOT)/usr/include/make/PRdefs
APP = sample
OPTIMIZER = -g
TARGETS = rom
CODEFILES = system.c main.c uc_assert.c action.c sprite.c
CODEOBJECTS = $(CODEFILES:.c=.o)
CODESEGMENT = codesegment.o
STATICFILES = static.c texture.c sprite_ball.c
STATICOBJECTS = $(STATICFILES:.c=.o)
STATICSEGMENT = staticsegment.o
BGFILES = L2_TV.c
BGOBJECTS = $(BGFILES:.c=.o)
DATAFILES = system_cfb.c system_rspbuf.c
DATAOBJECTS = $(DATAFILES:.c=.o)
CFILES = $(CODEFILES) $(STATICFILES) $(DATAFILES)
HFILES = action.h sprite.h system.h texture.h texture_pattern.h \
uc_assert.h
OBJECTS = $(CODESEGMENT) $(STATICSEGMENT) $(DATAOBJECTS) $(BGOBJECTS)
MAPFILE = load.map
LCINCS = -I. -I$(ROOT)/usr/include/PR
LCOPTS = -fullwarn -wlint,-f -woff 813,819,826,827,852 \
-non_shared -G 0 -Xcpluscomm
#LCDEFS = -DDEBUG -DF3DEX_GBI
#LCDEFS = -DDEBUG -DF3DEX_GBI -DRSP_DEBUG
LCDEFS = -DDEBUG -DF3DEX_GBI_2
#LCDEFS = -DDEBUG -DF3DEX_GBI_2 -DXBUS
LDIRT = $(APP) *.dat *.dbg *.lst *.sym *~ $(MAPFILE) \
Makedepend L2_TV.rgba5551 L2_TV.ppm L2_TV.c rgb2u64
LDFLAGS = $(MKDEPOPT) -nostdlib -L$(ROOT)/usr/lib -lultra_d
default: $(TARGETS)
include $(COMMONRULES)
install: default
$(INSTALL) -m 444 -F /usr/src/PR/demos/gs2dex2 \
$(HFILES) $(CFILES) rgb2u64.c L2_TV.rgb \
Makefile spec ppm8to5.perl ppmtoCI.perl
$(CODESEGMENT): $(CODEOBJECTS)
$(LD) -o $(CODESEGMENT) -r $(CODEOBJECTS) $(LDFLAGS)
$(STATICSEGMENT): $(STATICOBJECTS)
$(LD) -o $(STATICSEGMENT) -r $(STATICOBJECTS) $(LDFLAGS)
rom: spec $(OBJECTS) L2_TV.rgba5551
$(MAKEROM) $(LCDEFS) -m -r rom spec > $(MAPFILE)
rgb2u64: rgb2u64.c
$(CC) rgb2u64.c -o rgb2u64 -limage
L2_TV.rgba5551: L2_TV.rgb rgb2u64
rgb2u64 L2_TV.rgb 328 240 > L2_TV.rgba5551
L2_TV.c: L2_TV.rgb ppmtoCI.perl ppm8to5.perl
toppm L2_TV.rgb L2_TV.ppm
perl ppm8to5.perl < L2_TV.ppm | \
$(ROOT)/usr/sbin/ppmquant 255 | \
perl ppmtoCI.perl 328 240 L2_TV 1 > L2_TV.c
rm L2_TV.ppm
#======== End of Makefile ========