Makefile
1.54 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
#!smake -k
#
# Makefile for onetri demo application
#
#
DDPROCDIR = ../ddproc
PRDEPTH = ../../..
include $(ROOT)/usr/include/make/PRdefs
MAKEDISK = $(ROOT)/usr/sbin/makedisk
#FINAL =
#ifdef FINAL
OPTIMIZER = -O2
LCDEFS =
N64LIB = -lleo -lultra_rom
ARGS = FINAL=
#else
OPTIMIZER = -g
LCDEFS = -DDEBUG
N64LIB = -lleo_d -lultra_d
#endif
APP = onetri
TARGETS = onetri.rom
TEXHFILES = brick.h
HFILES = $(TEXHFILES) onetri.h herr.h hmenu.h
CODEFILES = onetri.c dram_stack.c rdp_output.c rdp_output_len.c \
static.c \
dd_proc.c err.c menu.c
CODEOBJECTS = $(CODEFILES:.c=.o)
DATAFILES = cfb.c rsp_cfb.c
DATAOBJECTS = $(DATAFILES:.c=.o)
DDPROCOBJECT = ddproc.o
CODESEGMENT = codesegment.o
OBJECTS = $(CODESEGMENT) $(DATAOBJECTS)
LCINCS = -I. -I$(ROOT)/usr/include/PR -I$(ROOT)/usr/include \
-I$(DDPROCDIR)
LCOPTS = -fullwarn -non_shared -G 0 -Xcpluscomm
LDIRT = $(APP) $(TARGETS) gwrite
LDFLAGS = $(MKDEPOPT) -nostdlib -L$(ROOT)/usr/lib -L$(ROOT)/usr/lib/PR \
$(N64LIB)
default: $(TARGETS)
include $(COMMONRULES)
install: default
$(INSTALL) -m 444 -F /usr/src/PR/demos/reboot/onetri \
$(HFILES) $(CODEFILES) $(DATAFILES) Makefile spec
$(CODESEGMENT): $(CODEOBJECTS) $(DDPROCOBJECT)
$(LD) -o $(CODESEGMENT) -r $(CODEOBJECTS) $(DDPROCOBJECT) $(LDFLAGS)
$(TARGETS) $(APP): spec $(OBJECTS)
$(MAKEDISK) -t 0 -R $(TARGETS) -S gwrite -B 1 spec
ddproc.o : $(DDPROCDIR)/ddproc2.o
cp $(DDPROCDIR)/ddproc2.o ./ddproc.o
$(DDPROCDIR)/ddproc2.o !
(cd $(DDPROCDIR);$(MAKE) $(ARGS));