Makefile
2.08 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
#!smake
# --------------------------------------------------------------------
# Copyright (C) 1997,1998 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
# to make the tags file do "make simpletags"
# to make just the simple_d directory do "make SUBDIRS=simple_d"
SUBDIRS=simple_d simple simple_rom
COMMONPREF = simple
APP = simple
TARGETS = rom
HFILES = \
simple.h \
audio.h \
gfx.h \
misc.h \
gfx_tri.h \
gfx_vtx.h
CODEFILES = \
audio.c \
audiomgr.c \
controller.c \
gfx.c \
gfxstack.c \
gfxyield.c \
gfxrdpfifo.c \
misc.c \
simple.c
CODEOBJECTS = $(CODEFILES:.c=.o)
CODESEGMENT = codesegment.o
# Data files that have thier own segments:
DATAFILES = \
gfxdynamic.c \
gfxdlists.c \
gfxzbuffer.c \
gfxinit.c \
gfxstatic.c \
gfxcfb.c
DATAOBJECTS = $(DATAFILES:.c=.o)
OBJECTS = $(CODESEGMENT) $(DATAOBJECTS)
LCINCS = -I.. -I$(ROOT)/usr/include/PR
LCOPTS = $(DFLAG) -fullwarn -non_shared -G 0 -Xcpluscomm
LCDEFS = -DF3DEX_GBI -DEX
#LCDEFS = -DF3DEX_GBI -DLX
#LCDEFS = -DF3DEX_GBI -DLX_Rej
#LCDEFS = -DF3DEX_GBI -DLP_Rej
LDIRT = load.map
LDFLAGS = $(MKDEPOPT) -nostdlib -L$(ROOT)/usr/lib -L$(ROOT)/usr/lib/PR \
-l$(ULTRALIB)
.PATH: ..
sinclude locdefs
#include $(COMMONRULES)
default:
for i in $(SUBDIRS) ; do \
echo ==== $$i === ; \
cd $$i ; \
$(MAKE) -f ../Makefile loc_$$i ; \
cd .. ; \
done
$(COMMONTARGS) :
for i in $(SUBDIRS) ; do \
echo ==== clobber $$i === ; \
cd $$i ; \
$(MAKE) -f ../Makefile loc_$@ ; \
cd .. ; \
done
include $(COMMONRULES)
install: default
$(INSTALL) -m 444 -F /usr/src/PR/demos/simple-F3DEX \
$(HFILES) $(CODEFILES) \
$(DATAFILES) Makefile spec \
simple/log.fmt simple_d/locdefs \
simple/locdefs simple_rom/locdefs
$(CODESEGMENT): $(CODEOBJECTS)
$(LD) -m -o $(CODESEGMENT) -r $(CODEOBJECTS) \
$(LDFLAGS) > load.map
rom: ../spec $(OBJECTS)
$(MAKEROM) $(MAKEROMDEFS) ../spec