macos-build-update-20040310
[openafs.git] / src / libafs / MakefileProto.IRIX.in
1 # Copyright 2000, International Business Machines Corporation and others.
2 # All Rights Reserved.
3
4 # This software has been released under the terms of the IBM Public
5 # License.  For details, see the LICENSE file in the top-level source
6 # directory or online at http://www.openafs.org/dl/license10.html
7
8 srcdir=@srcdir@
9 include @TOP_OBJDIR@/src/config/Makefile.config
10
11
12 # OS specific object files:
13 AFS_OS_OBJS = \
14         afs_base64.o \
15         osi_groups.o \
16         osi_idbg.o \
17         osi_file.o \
18         osi_inode.o \
19         osi_misc.o \
20         osi_sleep.o \
21         osi_vm.o \
22         osi_vnodeops.o
23
24 AFS_OS_NFSOBJS = \
25         osi_vfsops_nfs.o
26
27 AFS_OS_NONFSOBJS = \
28         osi_vfsops.o
29
30
31 # System specific build commands and flags
32 DBUG=-g2
33
34 <sgi_62>
35 MPS=MP SP
36 <sgi_63>
37 MPS=SP
38 <sgi_64>
39 MPS=MP
40
41 <sgi_61>
42 # Turning off warnings regarding constant conditionals and not prototyped.
43 KDEFS=-D_K64U64 -D_KERNEL -DSTATIC=static -D_PAGESZ=16384 -D_MIPS3_ADDRSPACE \
44         -DTFP -non_shared -elf -xansi -64 -mips4 -TENV:kernel \
45         -TENV:misalignment=1 -OPT:space \
46         -D${CPUBOARD} -D${MPSP} -D${CPUARCH} -DAFS_SGIMP_ENV ${NODYNOPT} \
47         -jalr -woff 1209,1196,1496
48 <sgi_62>
49 # Turning off warnings regarding constant conditionals and not prototyped.
50 KDEFS_64BIT= -64 -D_K64U64 -D_PAGESZ=16384 -TENV:kernel -OPT:space \
51         -TENV:misalignment=1
52 R4000_LDFLAGS = -mips3 -64
53 R4000_KDEFS = -mips3  -DR4000_DADDIU_WAR -DFAST_LOCORE_TFAULT -DUSE_LGPAGES \
54         -DR4000 -DEVEREST -DBADVA_WAR -DMP_R4000_BADVA_WAR \
55         -DECC_RECOVER -DCLOCK_CTIME_IS_ABSOLUTE -D_SHAREII -D_HIBERNATORII \
56          -DPIOMEMOPS -DULI ${KDEFS_64BIT}
57 R8000_KDEFS = -mips4 -DTFP -DR8000 ${KDEFS_64BIT}
58 R8000_LDFLAGS = -mips4 -64
59 KDEFS= -I/usr/include -I/usr/include/sys -D_KERNEL -DSTATIC=static \
60         -D_MIPS3_ADDRSPACE -non_shared -elf -xansi \
61         ${CPU_KDEFS} \
62         -D${CPUBOARD} -D${MPSP} -DAFS_SGIMP_ENV ${NODYNOPT} \
63         -jalr -woff 1209,1196,1496
64 R10000_KDEFS = -mips4 -DR10000 -DEXPRESS -DIP28 -DI2_64 -DFAST_LOCORE_FAULT \
65         -DSCACHE_SET_ASSOC=2 -D_NO_UNCACHED_MEM_WAR -DMIPS4_ISA \
66         -DR10000_SPECULATION_WAR  \
67         -OPT:quad_align_branch_targets=FALSE \
68         -OPT:quad_align_with_memops=FALSE -OPT:unroll_times=0 \
69         -DDEFAULTSEMAMETER=1 ${KDEFS_64BIT}
70 R10000_LDFLAGS = -mips4 -64
71 R4000_32_LDFLAGS = -mips2 -o32
72 R4000_32_KDEFS = -mips2 -o32 -elf -DEXPRESS -D_K32U64 -xansi\
73         -D_PAGESZ=4096 -D_KERNEL \
74         -DSTATIC=static -DBADVA_WAR -DJUMP_WAR -DPROBE_WAR -D_MEM_PARITY_WAR \
75         -D_TLB_LOOP_LIMIT -DTLBMOD_BADVADDR_WAR -D_VCE_AVOIDANCE \
76         -D_R4600_CACHEOP_WAR -D_R4600_2_0_CACHEOP_WAR -D_IRIX5_MIPS3 \
77         -D_IRIX5_MIPS4 -D_R5000_BADVADDR_WAR -D_R5000_JUMP_WAR -DMIPS4_ISA \
78         -DR4000 -DR4000PC -DR4600 -DR4600SC -DTRITON -DTRITON_INDYSC \
79         -Wc,-pic0 -fullwarn -non_shared -nostdinc  -Wf,-XNp12000 \
80         -woff 1685,515,608,658,799,803,835,852,1048,1233,1499,1501 \
81         -DDEFAULTSEMAMETER=1
82 <sgi_63>
83 # Turning off warnings regarding constant conditionals and not prototyped.
84 # NOTE: Only for R5000 at the moment.
85 KDEFS= -I/usr/include -I/usr/include/sys -D_KERNEL -DSTATIC=static \
86         -non_shared -elf -xansi \
87         ${CPU_KDEFS} \
88         -D${CPUBOARD} -D${MPSP} -DAFS_SGIMP_ENV ${NODYNOPT} \
89         -jalr -woff 1209,1196,1496
90 R5000_LDFLAGS = -mips2 -o32
91 R5000_KDEFS =  -DCRIME -DIP32 -DCRM -D_K32U64 -xansi -D_PAGESZ=4096 \
92         -D_KERNEL -DSTATIC=static -DPROBE_WAR -D_VCE_AVOIDANCE -DTILE_DATA \
93         -D_VCE_AVOIDANCE_DEBUG -D_R4600_CACHEOP_WAR -D_TLB_LOOP_LIMIT \
94         -D_R4600_2_0_CACHEOP_WAR -DP0_WAR -D_IRIX5_MIPS4 -D_IRIX5_MIPS3 \
95         -D_R5000_BADVADDR_WAR -DMIPS4_ISA -DSW_FAST_CACHE_SYNCH -DSWASH \
96         -D_R5000_CVT_WAR=1 -D_MTEXT_VFS -DR4000 -DR4000PC -DR4600 \
97         -DR4600SC -DTRITON -g -elf -mips2 -fullwarn -non_shared -nostdinc \
98         -mips2 -o32 -woff 1685,515,608,658,799,803,852,1048,1233,1499,1501 \
99         -Wf,-XNp12000 -DDEFAULTSEMAMETER=1
100 R10000_LDFLAGS = -mips2 -o32
101 R10000_KDEFS = -DCRIME -DIP32 -DCRM -D_K32U64 -xansi -D_K32U64 -D_PAGESZ=4096 \
102         -D_KERNEL -DSTATIC=static -D_VCE_AVOIDANCE -DTILE_DATA \
103         -DTLBMOD_BADVADDR_WAR -D_VCE_AVOIDANCE_DEBUG -D_TLB_LOOP_LIMIT \
104         -DP0_WAR -D_IRIX5_MIPS4 -D_IRIX5_MIPS3 -D_R5000_BADVADDR_WAR \
105         -DMIPS4_ISA -DSW_FAST_CACHE_SYNCH -DSWASH -DSCACHE_SET_ASSOC=2 \
106         -D_R5000_CVT_WAR=1 -D_MTEXT_VFS -DR10000_SPECULATION_WAR \
107         -DMH_R10000_SPECULATION_WAR -DSP -DIP32 -DR4000 -DR4000PC -DR4600 \
108         -DR4600SC -DTRITON -DR10000 -D_NO_R4000 -g -elf -mips2 -fullwarn \
109         -non_shared -nostdinc -mips2 -o32 \
110         -woff 1685,515,608,658,799,803,852,1048,1233,1499,1501 \
111         -Wf,-XNp12000 -DDEFAULTSEMAMETER=1 
112 <sgi_64>
113 KDEFS= -I/usr/include -I/usr/include/sys -D_KERNEL -DSTATIC=static \
114         -non_shared -elf -xansi \
115         ${CPU_KDEFS} \
116         -D${CPUBOARD} -D${MPSP} -DAFS_SGIMP_ENV ${NODYNOPT} \
117         -jalr -woff 1209,1196,1496
118 R10000_LDFLAGS = -mips4 -64
119 R10000_KDEFS = -DKONA -DIP27 -DIP27 -DDISCONTIG_PHYSMEM -DNUMA_BASE -DNUMA_PM \
120          -DNUMA_TBORROW -DNUMA_MIGR_CONTROL -DNUMA_REPLICATION \
121         -DNUMA_REPL_CONTROL -DNUMA_SCHED -DLARGE_CPU_COUNT -DHUB2_NACK_WAR \
122         -DBRIDGE_ERROR_INTR_WAR -DMAPPED_KERNEL -DBHV_SYNCH -DHUB_ERR_STS_WAR \
123          -DHUB_MIGR_WAR -DNCR16C550 -DTL16PIR552 -DSN0_INTR_BROKEN -DFRU \
124         -DFORCE_ERRORS -DSN0_USE_BTE -DBTE_BZERO_WAR -DREV1_BRIDGE_SUPPORTED \
125         -DHUB_II_IFDR_WAR -xansi -DDISCONTIG_PHYSMEM -DNUMA_BASE -DNUMA_PM \
126         -DNUMA_TBORROW -DNUMA_MIGR_CONTROL -DNUMA_REPLICATION \
127         -DNUMA_REPL_CONTROL -DNUMA_SCHED -DLARGE_CPU_COUNT -DHUB2_NACK_WAR \
128         -DBRIDGE_ERROR_INTR_WAR -DMAPPED_KERNEL -DBHV_SYNCH \
129         -DHUB_ERR_STS_WAR -DHUB_MIGR_WAR -DNCR16C550 -DTL16PIR552 \
130         -DSN0_INTR_BROKEN -DFRU -DFORCE_ERRORS -DSN0_USE_BTE -DBTE_BZERO_WAR \
131         -DREV1_BRIDGE_SUPPORTED -DHUB_II_IFDR_WAR -D_PAGESZ=16384 -D_KERNEL \
132         -DSTATIC=static -D_MIPS3_ADDRSPACE -DSN0 -DMIPS4_ISA \
133         -DCLOCK_CTIME_IS_ABSOLUTE -DFAST_LOCORE_TFAULT -DULI -DCKPT \
134         -DIDLESTACK_FASTINT -DR10K_LLSC_WAR -DPTE_64BIT -DRMAPS \
135         -DPAGE_MIGRATION -DSW_FAST_CACHE_SYNCH -DINTR_KTHREADS \
136         -DMRSP_AS_MR -D_MP_NETLOCKS -DMP_STREAMS=1 -DIP27 -DR10000 \
137         -g -TENV:kernel -TENV:misalignment=1 -OPT:space \
138         -OPT:quad_align_branch_targets=FALSE \
139         -OPT:quad_align_with_memops=FALSE \
140         -OPT:unroll_times=0 -OPT:Olimit=5000 -TARG:processor=r10000 \
141         -FE:pointer_readonly -use_readonly_const -fullwarn \
142         -non_shared -mips4 -64 \
143         -woff 1685,515,608,658,799,803,852,1048,1233,1499,1501 \
144         -DDEFAULTSEMAMETER=1
145 <sgi_65>
146 # For Irix 6.5 we are building based on cpu board number rather than CPU number
147 # While -G 8 is recommended for space, we know that the table overflows when
148 # both AFS and DFS are compiled into the kernel. For Irix 6.5, define MP
149 # so we pick up locks.
150 #
151 # For cc flags see:
152 # http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=0650&db=man&fname=/usr/share/catman/u_man/cat1/cc.z&srch=cc
153 #
154 KDEFS= -I/usr/include -I/usr/include/sys -DSTATIC=static -DAFS_SGIMP_ENV \
155         -DMP -D_KERNEL -DMP_STREAMS -D_MP_NETLOCKS -DMRSP_AS_MR \
156         ${CPU_KDEFS} -fullwarn -non_shared -G 0 \
157         -TENV:kernel -OPT:space -OPT:Olimit=0 -CG:unique_exit=on \
158         -TENV:X=1 -OPT:IEEE_arithmetic=1 -OPT:roundoff=0 \
159         -OPT:wrap_around_unsafe_opt=off \
160         -woff 1209,1196,1496
161 # 32 bit specific flags:
162 KDEFS_32 = -n32 -D_PAGESZ=4096 -mips3
163 # 64 bit specific flags:
164 KDEFS_64 = -64 -D_PAGESZ=16384 -D_MIPS3_ADDRSPACE -mips4
165
166 # CPU board specific flags:
167 # To get more help on all board/cpu combinations see http://sgistuff.g-lenerz.de/machines.html
168 #
169 #IP19 (Challenge DM/L/XL, Onyx) CPU's R4000, R4400
170 IP19_KDEFS = -DIP19 -DEVEREST -DMP -DR4000 \
171         -D_PAGESZ=16384 -D_MIPS3_ADDRSPACE -TARG:platform=ip19:processor=r4000 $(KDEFS_32)
172 #IP20 (Indigo) CPU's R4000
173 IP20_KDEFS = -DIP20 -DR4000 -DJUMP_WAR -DBADVA_WAR -DTRITON -DUSE_PCI_PIO \
174                 -D_R5000_CVT_WAR=1 -DCKPT -D_MTEXT_VFS -Ofast=ip20 $(KDEFS_32)
175 #IP21 (Power Challenge DM/L/XL, Power Onyx) R8000
176 IP21_KDEFS = -DIP21 -DEVEREST -DMP -DTFP -TARG:processor=r8000 -Ofast=ip21 $(KDEFS_64)
177 #IP22 (Indigo 2, Challenge M) CPU's R4000, R4400, R4600 (and by bug in hinv(1) also Indy IP24 machines with R4x00)
178 # -Ofast=ip22_4k is same as -TARG:ip22_4k -O3 -IPA -OPT:roundoff=3:Olimit=0:div_split=on:alias=typed
179 # when -Ofast used on IP24 Indy, the STATIC.*/libafs*.a claims to be 64-bit and /etc/refuses to build the
180 # object in the kernel.
181 IP22_4K_KDEFS = -DIP20 -DR4000 -DJUMP_WAR -DBADVA_WAR -DTRITON -DUSE_PCI_PIO \
182         -D_R5000_CVT_WAR=1 -DCKPT -D_MTEXT_VFS -TARG:platform=ip22_4k:processor=r4000 $(KDEFS_32) 
183 IP22_5K_KDEFS = -DIP20 -DR4000 -DJUMP_WAR -DBADVA_WAR -DTRITON -DUSE_PCI_PIO \
184         -D_R5000_CVT_WAR=1 -DCKPT -D_MTEXT_VFS -TARG:platform=ip22_5k:processor=r5000 $(KDEFS_32)
185 #IP24 (Indy, Challenge S) is reported by hinv(1) as IP22, CPU's R4000, R4400, R4600, R5000
186 # therefore same as IP22
187 #IP25 (Power Challenge L/XL, Power Onyx) CPU's R10000
188 IP25_KDEFS = -DIP25 -DEVEREST -DMP -DR10000 -Ofast=ip25 -TARG:processor=r10000 $(KDEFS_64)
189 #IP26 (Power Challenge M, Power Indigo 2) CPU's R8000
190 IP26_KDEFS = -DIP26 -DTFP -TARG:sync=off -Ofast=ip26 -TARG:processor=r8000 $(KDEFS_64)
191 #IP27 (Origin 200, Origin 2000, Onyx 2, Origin 3000) CPU's R10000, R12000
192 IP27_KDEFS =  -DIP27 -DR10000 -DMP -DSN -DSN0 -DMAPPED_KERNEL \
193         -DLARGE_CPU_COUNT \
194         -DPTE_64BIT -DULI -DCKPT -DMIPS4_ISA -DR10K_LLSC_WAR -DNUMA_BASE \
195         -DNUMA_PM  -DNUMA_TBORROW -DNUMA_MIGR_CONTROL -DNUMA_REPLICATION \
196         -DNUMA_REPL_CONTROL -DNUMA_SCHED -DCELL_PREPARE -DBHV_PREPARE \
197         -Ofast=ip27 -TARG:processor=r10000 $(KDEFS_64)
198 #IP28 (Indigo 2), CPU's R10000
199 IP28_KDEFS = -DIP28 -DR10000 -DSCACHE_SET_ASSOC=2 -D_NO_UNCACHED_MEM_WAR \
200         -DR10000_SPECULATION_WAR -Ofast=ip28 -TARG:processor=r10000 \
201         -TARG:t5_no_spec_stores $(KDEFS_64)
202 #IP30 (Octane and Octane 2) CPU's R10000, R12000, R14000 (and by bug also Indy IP24 with R5000)
203 IP30_KDEFS = -DIP30 -DR10000 -DMP -DCELL_PREPARE -DBHV_PREPARE \
204         -Ofast=ip30 -TARG:processor=r10000 $(KDEFS_64)
205 #IP32 (O2 and O2+) CPU's R5000, R10000, R12000
206 IP32_5K_KDEFS = -DIP20 -DR4000 -DJUMP_WAR -DBADVA_WAR -DTRITON -DUSE_PCI_PIO \
207         -D_PAGESZ=16384 -D_MIPS3_ADDRSPACE -Ofast=ip32_5k $(KDEFS_64)
208 IP32_10K_KDEFS = -DIP20 -DR4000 -DJUMP_WAR -DBADVA_WAR -DTRITON -DUSE_PCI_PIO \
209         -D_PAGESZ=16384 -D_MIPS3_ADDRSPACE -Ofast=ip32_10k $(KDEFS_64)
210 #IP35 (Fuel, Origin 3000) CPU's R14000, R16000
211 IP35_KDEFS =  -DIP35 -DR10000 -DMP -DSN -DSN1 -DMAPPED_KERNEL \
212         -DLARGE_CPU_COUNT \
213         -DPTE_64BIT -DULI -DCKPT -DMIPS4_ISA -DNUMA_BASE \
214         -DNUMA_PM  -DNUMA_TBORROW -DNUMA_MIGR_CONTROL -DNUMA_REPLICATION \
215         -DNUMA_REPL_CONTROL -DNUMA_SCHED -DCELL_PREPARE -DBHV_PREPARE \
216         -Ofast=ip35 $(KDEFS_64)
217 #IP53 (Tezro) CPU's R16000
218 # Loader flags
219 LDFLAGS_64 = -64 -IPA
220 LDFLAGS_32 = -n32 -IPA
221
222
223 <all>
224 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
225 OPTF=${OPT} 
226 OPTF2=${OPT2} 
227 CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) -G 0 $(KDEFS) $(KOPTS) ${DBUG}
228
229 # This tells Makefile.common to use it's single directory build target.
230 #COMPDIRS = single_compdir
231 # This is the irix multiple directory target.
232 COMPDIRS = irix_compdirs
233 INSTDIRS = irix_instdirs
234 DESTDIRS = irix_destdirs
235
236 include Makefile.common
237
238 # Make all the directories, even if only building one.
239 <sgi_62>
240 PROCESSORS=R4000 R4000_32 R8000 R10000
241 <sgi_63>
242 PROCESSORS = R5000 R1000
243 <sgi_64>
244 PROCESSORS = R10000
245 <sgi_65>
246 PROCESSORS = IP19 IP20 IP21 IP22_4K IP22_5K IP25 IP26 IP27 IP28 IP30 IP32_5K IP32_10K @IRIX_BUILD_IP35@
247 <all>
248
249 KOBJ = STATIC MODLOAD
250
251
252 setup:
253         -$(RM) -f  h net netinet rpc ufs nfs  machine sys 
254         -ln -fs /usr/include/sys h
255         -ln -fs /usr/include/net /usr/include/netinet .
256         -ln -fs /usr/include/rpc /usr/include/sys .
257         -ln -fs /usr/include/sys/fs .
258 <all -sgi_65>
259         BUILDPROCS="${PROCESSORS}" ; \
260         BUILDMPS="${MPS}" ; \
261         if [ "${CPUARCH}" != "" ] ; then \
262                 BUILDPROCS=${CPUARCH}; \
263                 BUILDMPS=${MPSP}; \
264         fi ; \
265         for p in $${BUILDPROCS} ; do \
266           for n in $${BUILDMPS} ; do \
267             for t in ${KOBJ} ; do \
268                 dir=$$t.$$n.$$p ; \
269                 echo Making directory: $$dir; \
270                 mkdir -p $$dir; \
271                 $(RM) -f $$dir/Makefile.common $$dir/Makefile $$dir/config; \
272                 ln -fs ../Makefile.common $$dir/Makefile.common; \
273                 ln -fs ../Makefile $$dir/Makefile; \
274                 ln -fs ../config $$dir/config; \
275             done; \
276           done; \
277         done
278 <sgi_65>
279         BUILDPROCS="${PROCESSORS}" ; \
280         if [ "${IPNO}" != "" ] ; then \
281                 BUILDPROCS="${IPNO}"; \
282         fi ; \
283         for p in $${BUILDPROCS} ; do \
284             for t in ${KOBJ} ; do \
285                 dir=$$t.$$p ; \
286                 echo Making directory: $$dir; \
287                 mkdir -p $$dir; \
288                 $(RM) -f $$dir/Makefile.common $$dir/Makefile $$dir/config; \
289                 ln -fs ../Makefile.common $$dir/Makefile.common; \
290                 ln -fs ../Makefile $$dir/Makefile; \
291                 ln -fs ../config $$dir/config; \
292             done; \
293         done
294 <all>
295         echo Setup complete.
296
297
298 # Compile static and modload versions of the clients.
299 <all -sgi_65>
300 ${COMPDIRS} ${INSTDIRS} ${DESTDIRS}:
301         BUILDPROCS="${PROCESSORS}" ; \
302         if [ "${CPUARCH}" != "" ] ; then \
303                 BUILDPROCS=${CPUARCH}; \
304                 BUILDMPS=${MPSP}; \
305         fi ; \
306         for p in $${BUILDPROCS} ; do \
307           for n in $${BUILDMPS} ; do \
308             for t in ${KOBJ} ; do \
309               dir=$$t.$$n.$$p ; \
310                 echo Building directory: $$dir; \
311                 case $$p in \
312                         R4000) \
313                          CPUBOARD=IP19; \
314                          CPU_KDEFS="${R4000_KDEFS}"; \
315                          LDFLAGS="${R4000_LDFLAGS}";; \
316                         R4000_32) \
317                          CPUBOARD=IP22; \
318                          CPU_KDEFS="${R4000_32_KDEFS}"; \
319                          LDFLAGS="${R4000_32_LDFLAGS}";; \
320                         R5000) \
321                          CPUBOARD=IP32_5K; \
322                          CPU_KDEFS="${R5000_KDEFS}"; \
323                          LDFLAGS="${R5000_LDFLAGS}";; \
324                         R8000) \
325                          CPUBOARD=IP26; \
326                          CPU_KDEFS="${R8000_KDEFS}"; \
327                          LDFLAGS="${R8000_LDFLAGS}";; \
328                         R10000) \
329 <sgi_62>
330                          CPUBOARD=IP28; \
331 <sgi_63>
332                          CPUBOARD=IP32_10K; \
333 <sgi_64>
334                          CPUBOARD=IP27; \
335 <sgi_62 sgi_63 sgi_64>
336                          CPU_KDEFS="${R10000_KDEFS}"; \
337                          LDFLAGS="${R10000_LDFLAGS}";; \
338                         *) echo "Unknown CPUARCH <$$p>" ; exit 1 ;; \
339                         esac ;\
340                         export CPUBOARD ;\
341                         export CPU_KDEFS ;\
342                         export LDFLAGS; \
343                 cd $$dir ; \
344                 $(MAKE) CPUARCH=$$p MPSP=$$n $@_$$t.libafs || exit $$?;\
345                 cd ../ ; \
346             done; \
347           done; \
348         done
349 <sgi_65>
350 ${COMPDIRS} ${INSTDIRS} ${DESTDIRS}:
351         BUILDPROCS="${PROCESSORS}" ; \
352         if [ "${IPNO}" != "" ] ; then \
353                 BUILDPROCS="${IPNO}"; \
354         fi ; \
355         for p in $${BUILDPROCS} ; do \
356             for t in ${KOBJ} ; do \
357               dir=$$t.$$p ; \
358                 echo Building directory: $$dir; \
359                 case $$p in \
360                 IP19)   CPU_KDEFS="${IP19_KDEFS}"; \
361                         LDFLAGS="${LDFLAGS_32}";; \
362                 IP20)   CPU_KDEFS="${IP20_KDEFS}"; \
363                         LDFLAGS="${LDFLAGS_32}";; \
364                 IP21)   CPU_KDEFS="${IP21_KDEFS}"; \
365                         LDFLAGS="${LDFLAGS_64}";; \
366                 IP22_4K)        CPU_KDEFS="${IP22_4K_KDEFS}"; \
367                         LDFLAGS="${LDFLAGS_32}";; \
368                 IP22_5K)        CPU_KDEFS="${IP22_5K_KDEFS}"; \
369                         LDFLAGS="${LDFLAGS_32}";; \
370                 IP25)   CPU_KDEFS="${IP25_KDEFS}"; \
371                         LDFLAGS="${LDFLAGS_64}";; \
372                 IP26)   CPU_KDEFS="${IP26_KDEFS}"; \
373                         LDFLAGS="${LDFLAGS_64}";; \
374                 IP27)   CPU_KDEFS="${IP27_KDEFS}"; \
375                         LDFLAGS="${LDFLAGS_64}";; \
376                 IP28)   CPU_KDEFS="${IP28_KDEFS}"; \
377                         LDFLAGS="${LDFLAGS_64}";; \
378                 IP30)   CPU_KDEFS="${IP30_KDEFS}"; \
379                         LDFLAGS="${LDFLAGS_64}";; \
380                 IP32_5K)        CPU_KDEFS="${IP32_5K_KDEFS}"; \
381                         LDFLAGS="${LDFLAGS_32}";; \
382                 IP32_10K)       CPU_KDEFS="${IP32_10K_KDEFS}"; \
383                         LDFLAGS="${LDFLAGS_64}";; \
384                 IP35)   CPU_KDEFS="${IP35_KDEFS}"; \
385                         LDFLAGS="${LDFLAGS_64}";; \
386                 *) echo Unknown IP number $$p ; exit 1 ;; \
387                 esac ;\
388                 case $$t in \
389                 MODLOAD) CPU_KDEFS="$${CPU_KDEFS} -TARG:force_jalr";; \
390                 esac ;\
391                 case $$t in \
392                 STATIC) echo X $${CPU_KDEFS} | sed 's/^X//' > $$dir/CPU_KDEFS;; \
393                 esac ;\
394                 export CPU_KDEFS ;\
395                 export LDFLAGS ;\
396                 cd $$dir ; \
397                 $(MAKE) IPNO=$$p $@_$$t.libafs || exit $$?; \
398                 cd ../ ; \
399           done; \
400         done
401 <all>
402
403 irix_compdirs_STATIC.libafs: depsrcs STATIC.libafs
404 irix_compdirs_MODLOAD.libafs: depsrcs MODLOAD.libafs
405 irix_instdirs_STATIC.libafs: install_STATIC.libafs
406 irix_instdirs_MODLOAD.libafs: install_MODLOAD.libafs
407 irix_destdirs_STATIC.libafs: dest_STATIC.libafs
408 irix_destdirs_MODLOAD.libafs: dest_MODLOAD.libafs
409
410
411
412 ${INSTDIRS}: install_COPYFILES install_LINKFILES
413 ${DESTDIRS}: dest_COPYFILES dest_LINKFILES
414
415
416
417 LIBAFSNONFSA = libafs.nonfs.a
418
419 STATIC.libafs: ${LIBAFSNONFSA}
420
421 install_STATIC.libafs: ${LIBAFSNONFSA}
422 <all -sgi_65>
423         ${CP} ${LIBAFSNONFSA} \
424                 ${DESTDIR}${afskerneldir}/libafs.${MPSP}.${CPUARCH}.nonfs.a
425 <sgi_65>
426         ${CP} ${LIBAFSNONFSA} \
427                 ${DESTDIR}${afskerneldir}/libafs.${IPNO}.nonfs.a
428 <all>
429
430 dest_STATIC.libafs: ${LIBAFSNONFSA}
431 <all -sgi_65>
432         ${CP} ${LIBAFSNONFSA} \
433                 ${DEST}/root.client/bin/libafs.${MPSP}.${CPUARCH}.nonfs.a
434 <sgi_65>
435         ${CP} ${LIBAFSNONFSA} \
436                 ${DEST}/root.client/bin/libafs.${IPNO}.nonfs.a
437 <all>
438
439 ${LIBAFSNONFSA}: $(AFSAOBJS) $(AFSNONFSOBJS)
440         $(AR) cru  $@ $?
441
442
443 LIBAFSNONFSO = libafs.nonfs.o
444
445 # MODLOAD.libafs: ${LIBAFSNONFSO} ${COPYFILES} ${LINKFILES}
446 MODLOAD.libafs: ${LIBAFSNONFSO}
447
448 install_MODLOAD.libafs: ${LIBAFSNONFSO}
449 <all -sgi_65>
450         ${CP} ${LIBAFSNONFSO} \
451                 ${DESTDIR}${afskerneldir}/libafs.${MPSP}.${CPUARCH}.nonfs.o
452 <sgi_65>
453         ${CP} ${LIBAFSNONFSO} \
454                 ${DESTDIR}${afskerneldir}/libafs.${IPNO}.nonfs.o
455 <all>
456
457 dest_MODLOAD.libafs: ${LIBAFSNONFSO}
458 <all -sgi_65>
459         ${CP} ${LIBAFSNONFSO} \
460                 ${DEST}/root.client/usr/vice/etc/sgiload/libafs.${MPSP}.${CPUARCH}.nonfs.o
461 <sgi_65>
462         ${CP} ${LIBAFSNONFSO} \
463                 ${DEST}/root.client/usr/vice/etc/sgiload/libafs.${IPNO}.nonfs.o
464 <all>
465
466 ${LIBAFSNONFSO}: $(AFSAOBJS) $(AFSNONFSOBJS)
467         $(LD) ${LDFLAGS} -elf -r -d -G 0 -o ${LIBAFSNONFSO} \
468                 $(AFSAOBJS) $(AFSNONFSOBJS)
469
470
471 install_COPYFILES:
472         ${CP} sgi_system ${DESTDIR}${afskerneldir}/afs.sm
473         chmod 644 ${DESTDIR}${afskerneldir}/afs.sm
474         ${CP} sgi_master ${DESTDIR}${afskerneldir}/afs
475         chmod 644 ${DESTDIR}${afskerneldir}/afs
476
477 dest_COPYFILES:
478         ${INSTALL} -f sgi_system ${DEST}/root.client/bin/afs.sm
479         chmod 644 ${DEST}/root.client/bin/afs.sm
480         ${INSTALL} -f sgi_master ${DEST}/root.client/bin/afs
481         chmod 644 ${DEST}/root.client/bin/afs
482
483 # Create symlinks to clients we don't need to build.
484 # If this changes, also change the kdump symlinks.
485 install_LINKFILES:
486 <sgi_65>
487         echo "Now we support also IP22_4K, IP22_5K, IP32_5K, IP32_10K cpu boards."
488 <all>
489
490 # Create symlinks to clients we don't need to build.
491 # If this changes, also change the kdump symlinks.
492 dest_LINKFILES:
493 <sgi_65>
494         ln -fs  libafs.IP20.a       ${DEST}/root.client/bin/libafs.IP22.a
495         ln -fs  libafs.IP20.a       ${DEST}/root.client/bin/libafs.IP32.a
496         ln -fs  libafs.IP20.nonfs.a ${DEST}/root.client/bin/libafs.IP22.nonfs.a
497         ln -fs  libafs.IP20.nonfs.a ${DEST}/root.client/bin/libafs.IP32.nonfs.a
498         ln -fs  libafs.IP20.o       ${DEST}/root.client/usr/vice/etc/sgiload/libafs.IP22.o
499         ln -fs  libafs.IP20.o       ${DEST}/root.client/usr/vice/etc/sgiload/libafs.IP32.o
500         ln -fs  libafs.IP20.nonfs.o ${DEST}/root.client/usr/vice/etc/sgiload/libafs.IP22.nonfs.o
501         ln -fs  libafs.IP20.nonfs.o ${DEST}/root.client/usr/vice/etc/sgiload/libafs.IP32.nonfs.o