Makefile
787 Bytes
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
include $(ROOT)/usr/include/make/PRdefs
APP = timer
OPTIMIZER = -g
TARGETS = rom
CODEFILES = main.c \
pif.c timer1.c timer2.c timer3.c
CODEASFILES =
CODEOBJECTS = $(CODEFILES:.c=.o) $(CODEASFILES:.s=.o)
DATAFILES = buffer.c
DATAOBJECTS= $(DATAFILES:.c=.o)
OBJECTS = codesegment.o $(DATAOBJECTS)
LCINCS = -I. -I$(ROOT)/usr/include/PR
LCOPTS = -fullwarn -non_shared -G 0 -D_ULTRA64
LASINCS = $(LCINCS)
LASOPTS = -non_shared -G 0 -D_ULTRA64
LDIRT = $(APP) $(APP).sym
LDFLAGS = $(MKDEPOPT) -nostdlib -L$(ROOT)/usr/lib -lultra_d
default: $(TARGETS)
include $(COMMONRULES)
install: default
codesegment.o: $(CODEOBJECTS) $(ROOT)/usr/lib/libultra_d.a
$(LD) -o codesegment.o -r $(CODEOBJECTS) $(LDFLAGS)
rom $(APP): spec $(OBJECTS) $(MAKEROM)
$(MAKEROM) -r rom spec