GNUmakefile
873 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
40
41
42
43
include $(ROOT)/usr/include/make/PRdefs
APP = osprof
OPTIMIZER = -g -DPROFILE_INIT -DPROFILE_FLUSH -DPROFILE_STOP
#OPTIMIZER = -g
TARGETS = rom
CODEFILES = main.c \
prof.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 = -Wall -non_shared -G 0 -D_ULTRA64 -mips2
LASINCS = $(LCINCS)
LASOPTS = -non_shared -G 0 -D_ULTRA64 -mips2
LDIRT = $(APP) $(APP).sym
LDFLAGS = $(MKDEPOPT) -L$(ROOT)/usr/lib -lultra_d -lgcc
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