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