Makefile
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
#!smake
#
# Makefile to build libleo.a
#
SUBDIR=api
COMMONPREF=$(SUBDIR)
PRDEPTH=$(ROOT)/PR
include $(PRDEPTH)/PRdefs
LIBDEPTH=..
include $(LIBDEPTH)/libdefs
sinclude locdefs
CFILES =
ASFILES =
#if !( $(LIBNAME) == "LEOIPL_D" || $(LIBNAME) == "LEOIPL" \
|| $(LIBNAME) == "LEOIPL_ER" )
CFILES += \
bytetolba.c \
createleomanager.c \
clearqueue.c \
driveexist.c \
inquiry.c \
lbatobyte.c \
leoglobals.c \
modeselectasync.c \
readcapacity.c \
readdiskid.c \
readrtc.c \
readwrite.c \
rezero.c \
seek.c \
setrtc.c \
spdlmotor.c \
testunitready.c \
leointerrupt.c \
leodiskinit.c \
driverominit.c
ASFILES += \
getaadr.s \
getaadr2.s \
getkadr.s
#endif
#if $(LIBNAME) == "LEO_SP"
CFILES += \
sysreadwrite.c \
readwritelong.c \
sectorread.c
#endif
OBJECTS = $(ASFILES:.s=.o) $(CFILES:.c=.o)
#if !( $(LIBNAME) == "LEOIPL_D" || $(LIBNAME) == "LEOIPL" \
|| $(LIBNAME) == "LEOIPL_ER" )
OBJECTS += \
bootdisk.o \
bootstrap.o \
cjcreateleomanager.o \
cacreateleomanager.o
#endif
LCINCS = -I. -I../org/include -I$(ROOT)/usr/include/PR -I$(ROOT)/PR/libultra/include
#LCOPTS = -non_shared -mips2 -fullwarn -G 0 -wlint,-f
LCOPTS = -non_shared -mips2 -fullwarn -G 0
#OPTIMIZER = -g # defined in locdefs
LASOPTS = -non_shared -G 0 -mips2
LASINCS = -I. -I$(PRDEPTH)/include
#if $(LIBNAME) != "LEO_SP"
include $(LIBDEPTH)/librules
#elseif
libddwrite: $(LIBDEPTH)/libddwrite/libddwrite.a $(LIBDEPTH)/libddwrite/libleo_sp.a
$(LIBDEPTH)/libddwrite/libddwrite.a: $(.TARGET)($(OBJECTS))
ar rc $(.TARGET) $(.OODATE)
...
rm -f $(.OODATE)
$(LIBDEPTH)/libddwrite/libleo_sp.a: $(.TARGET)($(OBJECTS))
ar rc $(.TARGET) $(.OODATE)
#endif
include $(PRDEPTH)/PRrules
createleomanager.o: ../api/createleomanager.c
$(CCF) -c -DINIT_DISK ../api/createleomanager.c
cjcreateleomanager.o: ../api/createleomanager.c
$(CCF) -c -DINIT_JAPAN ../api/createleomanager.c -o $@
cacreateleomanager.o: ../api/createleomanager.c
$(CCF) -c -DINIT_USA ../api/createleomanager.c -o $@
#
# bootdisk.c, bootstrap.s は常に -O2 でコンパイルすることにする
# これは、最適化オプションが変わるとルーチンのバイト数が変わり、
# 暗号化の範囲も変わってしまうからである
#
bootdisk.o: ../api/bootdisk.c
$(CC) -xansi $(LCINCS) $(LCOPTS) -Wab,-r4300_mul -nostdinc -I$(ROOT)/usr/include -O2 -MDupdate Makedepend -woff 515,608,658,799 -c ../api/bootdisk.c -o $@
bootstrap.o: ../api/bootstrap.s
$(AS) $(LASINCS) $(LASOPTS) -Wab,-r4300_mul -nostdinc -I$(ROOT)/usr/include -O2 -MDupdate Makedepend ../api/bootstrap.s -o $@
install! default