GNUmakefile
2.52 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#!smake -k
#
# Makefile for Go/No-go cpu
#
include $(ROOT)/usr/include/make/PRdefs
include ../gngdefs
sinclude locdefs
SUBDIRS= user tlb fpu
COMMONPREF= cpu
APP = cpu
TARGETS = $(CPUSEG)
CFILES = main.c fault.c sysvec.c
ASFILES= except2asm.s miscasm.s setjmp.s
HFILES = cpu.h exceptasm.h osint.h threadasm.h
LDIRT = $(APP) rom
#XLDFLAGS = $(MKDEPOPT) -nostdlib -L$(ROOT)/usr/lib -lultra_d
XLDFLAGS = $(MKDEPOPT) -L$(ROOT)/usr/lib -lultra_d -lgcc
CPUOBJS = except2asm.o setjmp.o sysvec.o miscasm.o fault.o main.o
FPUSEG = fpu/fpuseg.o
TLBSEG = tlb/tlbseg.o
USRSEG = user/userseg.o
CPUSEG = cpuseg.o
FPU_FILES = fpu/Makefile \
fpu/dtoa.s \
fpu/dwmultu.s \
fpu/fabs.s \
fpu/faddsubd.c \
fpu/faddsubs.c \
fpu/fdivzero.c \
fpu/finexact.c \
fpu/finvalid.c \
fpu/fmuldivd.c \
fpu/fmuldivs.c \
fpu/fmulsubd.c \
fpu/fmulsubs.c \
fpu/foverflow.c \
fpu/fpcmput.c \
fpu/fpmem.c \
fpu/fpregs.c \
fpu/fptest.c \
fpu/fpu.h \
fpu/funderflow.c \
fpu/getfp.s \
fpu/lfpu.s \
fpu/lpack.c \
fpu/lpackd.s \
fpu/overflow.s \
fpu/setfp.s \
fpu/sfpu.s \
fpu/tenscale.s \
fpu/underflow.s
TLB_FILES = tlb/Makefile \
tlb/buffer.c \
tlb/tlb.h \
tlb/tlb0.c \
tlb/tlb1.c \
tlb/tlbglobal.c \
tlb/tlbmem.c \
tlb/tlbmod.c \
tlb/tlbnocache.c \
tlb/tlbpid.c \
tlb/tlbprobe.c \
tlb/tlbtest.c \
tlb/tlbtrans.c \
tlb/tlbvalid.c \
tlb/tlbwire.s
USER_FILES = user/Makefile \
user/nos.h \
user/setcause.s \
user/syscall.h \
user/syscalls.s \
user/user.c
default: $(TARGETS)
include $(COMMONRULES)
install: default
$(INSTALL) -m 444 -F /usr/src/PR/nuscom/cpu \
$(CFILES) $(ASFILES) $(HFILES) \
$(FPU_FILES) $(TLB_FILES) $(USER_FILES) Makefile locdefs
$(CPUSEG): $(CPUOBJS) subdirs
$(LD) -o $@ -r $(CPUOBJS) $(TLBSEG) $(FPUSEG) $(LDFLAGS)
# $(CC) -nostdlib -o $@ -Wl,-r $(CPUOBJS) $(TLBSEG) $(FPUSEG) $(LDFLAGS)
subdirs:
@for i in $(SUBDIRS) ; do \
echo ==== make default in $$i ==== ; \
cd $$i ; \
$(MAKE) default; \
cd .. ; \
done
clean clobber rmtargets:
rm -rf $(DIRT) $(MKDEPFILE) $(TARGETS)
@for i in $(SUBDIRS) ; do \
echo ==== make $@ in $$i ==== ; \
cd $$i ; \
$(MAKE) $@; \
cd .. ; \
done
except2asm.o: MIPSI = -mips3
except2asm.o: except2asm.s
# $(AS) $(LASDEFS) $(LASINCS) -non_shared -G 0 -mips3 --32 \
# $(GASFLAGS) -o $@ except2asm.s
$(ASF) -o $@ except2asm.s
$(ROOT)/usr/sbin/mips332 $*.o
setjmp.o: setjmp.s
# $(AS) $(LASDEFS) $(LASINCS) -non_shared -G 0 -mips3 -32 \
# $(GASFLAGS) -o $@ setjmp.s
$(ASF) -o $@ setjmp.s