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