Makefile
1.46 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
#!smake -k
#
# Makefile for hello 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 = hello
TARGETS = hello.rom
HFILES = hello_world.h hmain.h
CODEFILES = hello_world.c dram_stack.c rdp_output.c rdp_output_len.c \
dd_proc.c static.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/hello_world \
$(CODEFILES) $(DATAFILES) $(HFILES) Makefile spec
$(CODESEGMENT): $(CODEOBJECTS) $(DDPROCOBJECT)
$(LD) -o $(CODESEGMENT) -r $(CODEOBJECTS) $(DDPROCOBJECT) $(LDFLAGS)
$(TARGETS) $(APP): spec $(OBJECTS)
$(MAKEDISK) -t 0 -R $(TARGETS) -S gwrite spec
ddproc.o $(DDPROCDIR)/ddproc2.o :
(cd $(DDPROCDIR);$(MAKE) $(ARGS));
cp $(DDPROCDIR)/ddproc2.o ./ddproc.o