1 # Copyright 2000, International Business Machines Corporation and others.
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
8 # MakefileProto for IRIX systems
12 TOP_SRCDIR=@TOP_SRCDIR@
13 SYS_NAME=@AFS_SYSNAME@
15 include config/Makefile.${SYS_NAME}
17 # OS specific object files:
37 # System specific build commands and flags
48 # Turning off warnings regarding constant conditionals and not prototyped.
49 KDEFS=-D_K64U64 -D_KERNEL -DSTATIC=static -D_PAGESZ=16384 -D_MIPS3_ADDRSPACE \
50 -DTFP -non_shared -elf -xansi -64 -mips4 -TENV:kernel \
51 -TENV:misalignment=1 -OPT:space \
52 -D${CPUBOARD} -D${MPSP} -D${CPUARCH} -DAFS_SGIMP_ENV ${NODYNOPT} \
53 -jalr -woff 1209,1196,1496
55 # Turning off warnings regarding constant conditionals and not prototyped.
56 KDEFS_64BIT= -64 -D_K64U64 -D_PAGESZ=16384 -TENV:kernel -OPT:space \
58 R4000_LDFLAGS = -mips3 -64
59 R4000_KDEFS = -mips3 -DR4000_DADDIU_WAR -DFAST_LOCORE_TFAULT -DUSE_LGPAGES \
60 -DR4000 -DEVEREST -DBADVA_WAR -DMP_R4000_BADVA_WAR \
61 -DECC_RECOVER -DCLOCK_CTIME_IS_ABSOLUTE -D_SHAREII -D_HIBERNATORII \
62 -DPIOMEMOPS -DULI ${KDEFS_64BIT}
63 R8000_KDEFS = -mips4 -DTFP -DR8000 ${KDEFS_64BIT}
64 R8000_LDFLAGS = -mips4 -64
65 KDEFS= -I/usr/include -I/usr/include/sys -D_KERNEL -DSTATIC=static \
66 -D_MIPS3_ADDRSPACE -non_shared -elf -xansi \
68 -D${CPUBOARD} -D${MPSP} -DAFS_SGIMP_ENV ${NODYNOPT} \
69 -jalr -woff 1209,1196,1496
70 R10000_KDEFS = -mips4 -DR10000 -DEXPRESS -DIP28 -DI2_64 -DFAST_LOCORE_FAULT \
71 -DSCACHE_SET_ASSOC=2 -D_NO_UNCACHED_MEM_WAR -DMIPS4_ISA \
72 -DR10000_SPECULATION_WAR \
73 -OPT:quad_align_branch_targets=FALSE \
74 -OPT:quad_align_with_memops=FALSE -OPT:unroll_times=0 \
75 -DDEFAULTSEMAMETER=1 ${KDEFS_64BIT}
76 R10000_LDFLAGS = -mips4 -64
77 R4000_32_LDFLAGS = -mips2 -o32
78 R4000_32_KDEFS = -mips2 -o32 -elf -DEXPRESS -D_K32U64 -xansi\
79 -D_PAGESZ=4096 -D_KERNEL \
80 -DSTATIC=static -DBADVA_WAR -DJUMP_WAR -DPROBE_WAR -D_MEM_PARITY_WAR \
81 -D_TLB_LOOP_LIMIT -DTLBMOD_BADVADDR_WAR -D_VCE_AVOIDANCE \
82 -D_R4600_CACHEOP_WAR -D_R4600_2_0_CACHEOP_WAR -D_IRIX5_MIPS3 \
83 -D_IRIX5_MIPS4 -D_R5000_BADVADDR_WAR -D_R5000_JUMP_WAR -DMIPS4_ISA \
84 -DR4000 -DR4000PC -DR4600 -DR4600SC -DTRITON -DTRITON_INDYSC \
85 -Wc,-pic0 -fullwarn -non_shared -nostdinc -Wf,-XNp12000 \
86 -woff 1685,515,608,658,799,803,835,852,1048,1233,1499,1501 \
89 # Turning off warnings regarding constant conditionals and not prototyped.
90 # NOTE: Only for R5000 at the moment.
91 KDEFS= -I/usr/include -I/usr/include/sys -D_KERNEL -DSTATIC=static \
92 -non_shared -elf -xansi \
94 -D${CPUBOARD} -D${MPSP} -DAFS_SGIMP_ENV ${NODYNOPT} \
95 -jalr -woff 1209,1196,1496
96 R5000_LDFLAGS = -mips2 -o32
97 R5000_KDEFS = -DCRIME -DIP32 -DCRM -D_K32U64 -xansi -D_PAGESZ=4096 \
98 -D_KERNEL -DSTATIC=static -DPROBE_WAR -D_VCE_AVOIDANCE -DTILE_DATA \
99 -D_VCE_AVOIDANCE_DEBUG -D_R4600_CACHEOP_WAR -D_TLB_LOOP_LIMIT \
100 -D_R4600_2_0_CACHEOP_WAR -DP0_WAR -D_IRIX5_MIPS4 -D_IRIX5_MIPS3 \
101 -D_R5000_BADVADDR_WAR -DMIPS4_ISA -DSW_FAST_CACHE_SYNCH -DSWASH \
102 -D_R5000_CVT_WAR=1 -D_MTEXT_VFS -DR4000 -DR4000PC -DR4600 \
103 -DR4600SC -DTRITON -g -elf -mips2 -fullwarn -non_shared -nostdinc \
104 -mips2 -o32 -woff 1685,515,608,658,799,803,852,1048,1233,1499,1501 \
105 -Wf,-XNp12000 -DDEFAULTSEMAMETER=1
106 R10000_LDFLAGS = -mips2 -o32
107 R10000_KDEFS = -DCRIME -DIP32 -DCRM -D_K32U64 -xansi -D_K32U64 -D_PAGESZ=4096 \
108 -D_KERNEL -DSTATIC=static -D_VCE_AVOIDANCE -DTILE_DATA \
109 -DTLBMOD_BADVADDR_WAR -D_VCE_AVOIDANCE_DEBUG -D_TLB_LOOP_LIMIT \
110 -DP0_WAR -D_IRIX5_MIPS4 -D_IRIX5_MIPS3 -D_R5000_BADVADDR_WAR \
111 -DMIPS4_ISA -DSW_FAST_CACHE_SYNCH -DSWASH -DSCACHE_SET_ASSOC=2 \
112 -D_R5000_CVT_WAR=1 -D_MTEXT_VFS -DR10000_SPECULATION_WAR \
113 -DMH_R10000_SPECULATION_WAR -DSP -DIP32 -DR4000 -DR4000PC -DR4600 \
114 -DR4600SC -DTRITON -DR10000 -D_NO_R4000 -g -elf -mips2 -fullwarn \
115 -non_shared -nostdinc -mips2 -o32 \
116 -woff 1685,515,608,658,799,803,852,1048,1233,1499,1501 \
117 -Wf,-XNp12000 -DDEFAULTSEMAMETER=1
119 KDEFS= -I/usr/include -I/usr/include/sys -D_KERNEL -DSTATIC=static \
120 -non_shared -elf -xansi \
122 -D${CPUBOARD} -D${MPSP} -DAFS_SGIMP_ENV ${NODYNOPT} \
123 -jalr -woff 1209,1196,1496
124 R10000_LDFLAGS = -mips4 -64
125 R10000_KDEFS = -DKONA -DIP27 -DIP27 -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 -DHUB_ERR_STS_WAR \
129 -DHUB_MIGR_WAR -DNCR16C550 -DTL16PIR552 -DSN0_INTR_BROKEN -DFRU \
130 -DFORCE_ERRORS -DSN0_USE_BTE -DBTE_BZERO_WAR -DREV1_BRIDGE_SUPPORTED \
131 -DHUB_II_IFDR_WAR -xansi -DDISCONTIG_PHYSMEM -DNUMA_BASE -DNUMA_PM \
132 -DNUMA_TBORROW -DNUMA_MIGR_CONTROL -DNUMA_REPLICATION \
133 -DNUMA_REPL_CONTROL -DNUMA_SCHED -DLARGE_CPU_COUNT -DHUB2_NACK_WAR \
134 -DBRIDGE_ERROR_INTR_WAR -DMAPPED_KERNEL -DBHV_SYNCH \
135 -DHUB_ERR_STS_WAR -DHUB_MIGR_WAR -DNCR16C550 -DTL16PIR552 \
136 -DSN0_INTR_BROKEN -DFRU -DFORCE_ERRORS -DSN0_USE_BTE -DBTE_BZERO_WAR \
137 -DREV1_BRIDGE_SUPPORTED -DHUB_II_IFDR_WAR -D_PAGESZ=16384 -D_KERNEL \
138 -DSTATIC=static -D_MIPS3_ADDRSPACE -DSN0 -DMIPS4_ISA \
139 -DCLOCK_CTIME_IS_ABSOLUTE -DFAST_LOCORE_TFAULT -DULI -DCKPT \
140 -DIDLESTACK_FASTINT -DR10K_LLSC_WAR -DPTE_64BIT -DRMAPS \
141 -DPAGE_MIGRATION -DSW_FAST_CACHE_SYNCH -DINTR_KTHREADS \
142 -DMRSP_AS_MR -D_MP_NETLOCKS -DMP_STREAMS=1 -DIP27 -DR10000 \
143 -g -TENV:kernel -TENV:misalignment=1 -OPT:space \
144 -OPT:quad_align_branch_targets=FALSE \
145 -OPT:quad_align_with_memops=FALSE \
146 -OPT:unroll_times=0 -OPT:Olimit=5000 -TARG:processor=r10000 \
147 -FE:pointer_readonly -use_readonly_const -fullwarn \
148 -non_shared -mips4 -64 \
149 -woff 1685,515,608,658,799,803,852,1048,1233,1499,1501 \
152 # For Irix 6.5 we are building based on cpu board number rather than CPU number
153 # While -G 8 is recommended for space, we know that the table overflows when
154 # both AFS and DFS are compiled into the kernel. For Irix 6.5, define MP
155 # so we pick up locks.
156 KDEFS= -I/usr/include -I/usr/include/sys -DSTATIC=static -DAFS_SGIMP_ENV \
157 -DMP -D_KERNEL -DMP_STREAMS -D_MP_NETLOCKS -DMRSP_AS_MR \
158 -fullwarn -non_shared -G 0 \
159 -TENV:kernel -OPT:space -OPT:Olimit=0 -CG:unique_exit=on \
160 -TENV:X=1 -OPT:IEEE_arithmetic=1 -OPT:roundoff=0 \
161 -OPT:wrap_around_unsafe_opt=off \
162 ${CPU_KDEFS} -woff 1209,1196,1496
163 # 32 bit specific flags:
164 KDEFS_32 = -n32 -D_PAGESZ=4096 -mips3
165 # 64 bit specific flags:
166 KDEFS_64 = -64 -D_PAGESZ=16384 -D_MIPS3_ADDRSPACE -mips4
168 # CPU board specific flags:
169 IP19_KDEFS = -DIP19 -DEVEREST -DMP -DR4000 \
170 -mips3 -D_PAGESZ=16384 -D_MIPS3_ADDRSPACE -64
171 IP20_KDEFS = -DIP20 -DR4000 -DJUMP_WAR -DBADVA_WAR -DTRITON -DUSE_PCI_PIO \
173 IP21_KDEFS = -DIP21 -DEVEREST -DMP -DTFP -TARG:processor=r8000 $(KDEFS_64)
174 IP25_KDEFS = -DIP25 -DEVEREST -DMP -DR10000 -TARG:processor=r10000 $(KDEFS_64)
175 IP26_KDEFS = -DIP26 -DTFP -TARG:sync=off -TARG:processor=r8000 $(KDEFS_64)
176 IP27_KDEFS = -DIP27 -DR10000 -DMP -DSN -DSN0 -DMAPPED_KERNEL \
178 -DPTE_64BIT -DULI -DCKPT -DMIPS4_ISA -DR10K_LLSC_WAR -DNUMA_BASE \
179 -DNUMA_PM -DNUMA_TBORROW -DNUMA_MIGR_CONTROL -DNUMA_REPLICATION \
180 -DNUMA_REPL_CONTROL -DNUMA_SCHED -DCELL_PREPARE -DBHV_PREPARE \
181 -TARG:processor=r10000 $(KDEFS_64)
182 IP28_KDEFS = -DIP28 -DR10000 -DSCACHE_SET_ASSOC=2 -D_NO_UNCACHED_MEM_WAR \
183 -DR10000_SPECULATION_WAR -TARG:processor=r10000 \
184 -TARG:t5_no_spec_stores $(KDEFS_64)
185 IP30_KDEFS = -DIP30 -DR10000 -DMP -DCELL_PREPARE -DBHV_PREPARE \
186 -TARG:processor=r10000 $(KDEFS_64)
193 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
196 CFLAGS=-I. -I.. -I${TOP_SRCDIR}/config ${FSINCLUDES} $(DEFINES) -G 0 $(KDEFS) $(KOPTS) ${DBUG}
198 # This tells Makefile.common to use it's single directory build target.
199 #COMPDIRS = single_compdir
200 # This is the irix multiple directory target.
201 COMPDIRS = irix_compdirs
202 INSTDIRS = irix_instdirs
204 include Makefile.common
206 # Make all the directories, even if only building one.
208 PROCESSORS=R4000 R4000_32 R8000 R10000
210 PROCESSORS = R5000 R1000
214 PROCESSORS = IP19 IP20 IP21 IP25 IP26 IP27 IP28 IP30
217 KOBJ = STATIC MODLOAD
221 -$(RM) -f h net netinet rpc ufs nfs machine sys
222 -ln -s /usr/include/sys h
223 -ln -s /usr/include/net /usr/include/netinet .
224 -ln -s /usr/include/rpc /usr/include/sys .
225 -ln -s /usr/include/sys/fs .
226 -mkdir ${DESTDIR}/root.client/bin
228 BUILDPROCS="${PROCESSORS}" ; \
229 BUILDMPS="${MPS}" ; \
230 if [ "${CPUARCH}" != "" ] ; then \
231 BUILDPROCS=${CPUARCH}; \
234 for p in $${BUILDPROCS} ; do \
235 for n in $${BUILDMPS} ; do \
236 for t in ${KOBJ} ; do \
238 echo Making directory: $$dir; \
240 $(RM) -f $$dir/Makefile.common $$dir/Makefile $$dir/config; \
241 ln -s ../Makefile.common $$dir/Makefile.common; \
242 ln -s ../Makefile $$dir/Makefile; \
243 ln -s ../config $$dir/config; \
248 BUILDPROCS="${PROCESSORS}" ; \
249 if [ "${IPNO}" != "" ] ; then \
250 BUILDPROCS="${IPNO}"; \
252 for p in $${BUILDPROCS} ; do \
253 for t in ${KOBJ} ; do \
255 echo Making directory: $$dir; \
257 $(RM) -f $$dir/Makefile.common $$dir/Makefile $$dir/config; \
258 ln -s ../Makefile.common $$dir/Makefile.common; \
259 ln -s ../Makefile $$dir/Makefile; \
260 ln -s ../config $$dir/config; \
264 echo Setup compelete.
267 # Compile static and modload versions of the clients.
269 ${COMPDIRS} ${INSTDIRS}:
270 BUILDPROCS="${PROCESSORS}" ; \
271 if [ "${CPUARCH}" != "" ] ; then \
272 BUILDPROCS=${CPUARCH}; \
275 for p in $${BUILDPROCS} ; do \
276 for n in $${BUILDMPS} ; do \
277 for t in ${KOBJ} ; do \
279 echo Building directory: $$dir; \
283 CPU_KDEFS="${R4000_KDEFS}"; \
284 LDFLAGS="${R4000_LDFLAGS}";; \
287 CPU_KDEFS="${R4000_32_KDEFS}"; \
288 LDFLAGS="${R4000_32_LDFLAGS}";; \
291 CPU_KDEFS="${R5000_KDEFS}"; \
292 LDFLAGS="${R5000_LDFLAGS}";; \
295 CPU_KDEFS="${R8000_KDEFS}"; \
296 LDFLAGS="${R8000_LDFLAGS}";; \
304 <sgi_62 sgi_63 sgi_64>
305 CPU_KDEFS="${R10000_KDEFS}"; \
306 LDFLAGS="${R10000_LDFLAGS}";; \
307 *) echo "Unknown CPUARCH <$$p>" ; exit 1 ;; \
313 $(MAKE) CPUARCH=$$p MPSP=$$n $@_$$t.libafs || exit $$?;\
319 ${COMPDIRS} ${INSTDIRS}:
320 BUILDPROCS="${PROCESSORS}" ; \
321 if [ "${IPNO}" != "" ] ; then \
322 BUILDPROCS="${IPNO}"; \
324 for p in $${BUILDPROCS} ; do \
325 for t in ${KOBJ} ; do \
327 echo Building directory: $$dir; \
328 LDFLAGS="${LDFLAGS_64}"; \
330 IP19) CPU_KDEFS="${IP19_KDEFS}";; \
331 IP20) CPU_KDEFS="${IP20_KDEFS}"; \
332 LDFLAGS="${LDFLAGS_32}";; \
333 IP21) CPU_KDEFS="${IP21_KDEFS}";; \
334 IP25) CPU_KDEFS="${IP25_KDEFS}";; \
335 IP26) CPU_KDEFS="${IP26_KDEFS}";; \
336 IP27) CPU_KDEFS="${IP27_KDEFS}";; \
337 IP28) CPU_KDEFS="${IP28_KDEFS}";; \
338 IP30) CPU_KDEFS="${IP30_KDEFS}";; \
339 *) echo Unknown IP number $$p ; exit 1 ;; \
342 MODLOAD) CPU_KDEFS="$${CPU_KDEFS} -TARG:force_jalr";; \
345 STATIC) echo X $${CPU_KDEFS} | sed 's/^X//' > $$dir/CPU_KDEFS;; \
350 $(MAKE) IPNO=$$p $@_$$t.libafs || exit $$?; \
356 irix_compdirs_STATIC.libafs: STATIC.libafs
357 irix_compdirs_MODLOAD.libafs: MODLOAD.libafs
358 irix_instdirs_STATIC.libafs: install_STATIC.libafs
359 irix_instdirs_MODLOAD.libafs: install_MODLOAD.libafs
362 LIBAFSNONFSA = libafs.nonfs.a
363 COPYFILES = copyfiles
364 LINKFILES = linkfiles
366 ${INSTDIRS}: ${COPYFILES} ${LINKFILES}
368 STATICCLIENTDIR = ${DESTDIR}/root.client/bin
369 MODLOADCLIENTDIR = ${DESTDIR}/root.client/usr/vice/etc/sgiload
371 # Make the NFS and no-NFS clients for this directory.
372 # STATIC.libafs: ${LIBAFSNONFSA} ${COPYFILES} ${LINKFILES}
373 STATIC.libafs: ${LIBAFSNONFSA}
374 install_STATIC.libafs: ${LIBAFSNONFSA}
376 ${CP} ${LIBAFSNONFSA} \
377 ${STATICCLIENTDIR}/libafs.${MPSP}.${CPUARCH}.nonfs.a
379 ${CP} ${LIBAFSNONFSA} \
380 ${STATICCLIENTDIR}/libafs.${IPNO}.nonfs.a
383 ${LIBAFSNONFSA}: $(AFSAOBJS) $(AFSNONFSOBJS)
386 LIBAFSNONFSO = libafs.nonfs.o
388 # MODLOAD.libafs: ${LIBAFSNONFSO} ${COPYFILES} ${LINKFILES}
389 MODLOAD.libafs: ${LIBAFSNONFSO}
390 install_MODLOAD.libafs: ${LIBAFSNONFSO}
392 ${CP} ${LIBAFSNONFSO} \
393 ${MODLOADCLIENTDIR}/libafs.${MPSP}.${CPUARCH}.nonfs.o
395 ${CP} ${LIBAFSNONFSO} \
396 ${MODLOADCLIENTDIR}/libafs.${IPNO}.nonfs.o
399 ${LIBAFSNONFSO}: $(AFSAOBJS) $(AFSNONFSOBJS)
400 $(LD) ${LDFLAGS} -elf -r -d -G 0 -o ${LIBAFSNONFSO} \
401 $(AFSAOBJS) $(AFSNONFSOBJS)
404 ${CP} sgi_system ${STATICCLIENTDIR}/afs.sm
405 chmod 644 ${STATICCLIENTDIR}/afs.sm
406 ${CP} sgi_master ${STATICCLIENTDIR}/afs
407 chmod 644 ${STATICCLIENTDIR}/afs
409 # Create symlinks to clients we don't need to build.
410 # If this changes, also change the kdump symlinks.
413 ln -fs libafs.IP20.a ${DESTDIR}/root.client/bin/libafs.IP22.a
414 ln -fs libafs.IP20.a ${DESTDIR}/root.client/bin/libafs.IP32.a
415 ln -fs libafs.IP20.nonfs.a ${DESTDIR}/root.client/bin/libafs.IP22.nonfs.a
416 ln -fs libafs.IP20.nonfs.a ${DESTDIR}/root.client/bin/libafs.IP32.nonfs.a
417 ln -fs libafs.IP20.o ${DESTDIR}/root.client/usr/vice/etc/sgiload/libafs.IP22.o
418 ln -fs libafs.IP20.o ${DESTDIR}/root.client/usr/vice/etc/sgiload/libafs.IP32.o
419 ln -fs libafs.IP20.nonfs.o ${DESTDIR}/root.client/usr/vice/etc/sgiload/libafs.IP22.nonfs.o
420 ln -fs libafs.IP20.nonfs.o ${DESTDIR}/root.client/usr/vice/etc/sgiload/libafs.IP32.nonfs.o
425 # Object build rules:
427 afs_base64.o: $(AFS)/afs_base64.c
429 osi_groups.o: $(AFS)/osi_groups.c
431 osi_idbg.o: $(AFS)/osi_idbg.c
433 osi_inode.o: $(AFS)/osi_inode.c
435 osi_file.o: $(AFS)/osi_file.c
437 osi_misc.o: $(AFS)/osi_misc.c
439 osi_sleep.o: $(AFS)/osi_sleep.c
441 osi_vfsops_nfs.o: $(AFS)/osi_vfsops.c
442 $(CRULE1) -o osi_vfsops_nfs.o;
443 osi_vfsops.o: $(AFS)/osi_vfsops.c
444 $(CRULE1) -DAFS_NONFSTRANS;
445 osi_vm.o: $(AFS)/osi_vm.c
447 osi_vnodeops.o: $(AFS)/osi_vnodeops.c
449 xdr_int64.o: $(RX)/xdr_int64.c