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 include $(DESTDIR)../obj/config/Makefile.${SYS_NAME}
15 # OS specific object files:
34 # System specific build commands and flags
45 # Turning off warnings regarding constant conditionals and not prototyped.
46 KDEFS=-D_K64U64 -D_KERNEL -DSTATIC=static -D_PAGESZ=16384 -D_MIPS3_ADDRSPACE \
47 -DTFP -non_shared -elf -xansi -64 -mips4 -TENV:kernel \
48 -TENV:misalignment=1 -OPT:space \
49 -D${CPUBOARD} -D${MPSP} -D${CPUARCH} -DAFS_SGIMP_ENV ${NODYNOPT} \
50 -jalr -woff 1209,1196,1496
52 # Turning off warnings regarding constant conditionals and not prototyped.
53 KDEFS_64BIT= -64 -D_K64U64 -D_PAGESZ=16384 -TENV:kernel -OPT:space \
55 R4000_LDFLAGS = -mips3 -64
56 R4000_KDEFS = -mips3 -DR4000_DADDIU_WAR -DFAST_LOCORE_TFAULT -DUSE_LGPAGES \
57 -DR4000 -DEVEREST -DBADVA_WAR -DMP_R4000_BADVA_WAR \
58 -DECC_RECOVER -DCLOCK_CTIME_IS_ABSOLUTE -D_SHAREII -D_HIBERNATORII \
59 -DPIOMEMOPS -DULI ${KDEFS_64BIT}
60 R8000_KDEFS = -mips4 -DTFP -DR8000 ${KDEFS_64BIT}
61 R8000_LDFLAGS = -mips4 -64
62 KDEFS= -I/usr/include -I/usr/include/sys -D_KERNEL -DSTATIC=static \
63 -D_MIPS3_ADDRSPACE -non_shared -elf -xansi \
65 -D${CPUBOARD} -D${MPSP} -DAFS_SGIMP_ENV ${NODYNOPT} \
66 -jalr -woff 1209,1196,1496
67 R10000_KDEFS = -mips4 -DR10000 -DEXPRESS -DIP28 -DI2_64 -DFAST_LOCORE_FAULT \
68 -DSCACHE_SET_ASSOC=2 -D_NO_UNCACHED_MEM_WAR -DMIPS4_ISA \
69 -DR10000_SPECULATION_WAR \
70 -OPT:quad_align_branch_targets=FALSE \
71 -OPT:quad_align_with_memops=FALSE -OPT:unroll_times=0 \
72 -DDEFAULTSEMAMETER=1 ${KDEFS_64BIT}
73 R10000_LDFLAGS = -mips4 -64
74 R4000_32_LDFLAGS = -mips2 -o32
75 R4000_32_KDEFS = -mips2 -o32 -elf -DEXPRESS -D_K32U64 -xansi\
76 -D_PAGESZ=4096 -D_KERNEL \
77 -DSTATIC=static -DBADVA_WAR -DJUMP_WAR -DPROBE_WAR -D_MEM_PARITY_WAR \
78 -D_TLB_LOOP_LIMIT -DTLBMOD_BADVADDR_WAR -D_VCE_AVOIDANCE \
79 -D_R4600_CACHEOP_WAR -D_R4600_2_0_CACHEOP_WAR -D_IRIX5_MIPS3 \
80 -D_IRIX5_MIPS4 -D_R5000_BADVADDR_WAR -D_R5000_JUMP_WAR -DMIPS4_ISA \
81 -DR4000 -DR4000PC -DR4600 -DR4600SC -DTRITON -DTRITON_INDYSC \
82 -Wc,-pic0 -fullwarn -non_shared -nostdinc -Wf,-XNp12000 \
83 -woff 1685,515,608,658,799,803,835,852,1048,1233,1499,1501 \
86 # Turning off warnings regarding constant conditionals and not prototyped.
87 # NOTE: Only for R5000 at the moment.
88 KDEFS= -I/usr/include -I/usr/include/sys -D_KERNEL -DSTATIC=static \
89 -non_shared -elf -xansi \
91 -D${CPUBOARD} -D${MPSP} -DAFS_SGIMP_ENV ${NODYNOPT} \
92 -jalr -woff 1209,1196,1496
93 R5000_LDFLAGS = -mips2 -o32
94 R5000_KDEFS = -DCRIME -DIP32 -DCRM -D_K32U64 -xansi -D_PAGESZ=4096 \
95 -D_KERNEL -DSTATIC=static -DPROBE_WAR -D_VCE_AVOIDANCE -DTILE_DATA \
96 -D_VCE_AVOIDANCE_DEBUG -D_R4600_CACHEOP_WAR -D_TLB_LOOP_LIMIT \
97 -D_R4600_2_0_CACHEOP_WAR -DP0_WAR -D_IRIX5_MIPS4 -D_IRIX5_MIPS3 \
98 -D_R5000_BADVADDR_WAR -DMIPS4_ISA -DSW_FAST_CACHE_SYNCH -DSWASH \
99 -D_R5000_CVT_WAR=1 -D_MTEXT_VFS -DR4000 -DR4000PC -DR4600 \
100 -DR4600SC -DTRITON -g -elf -mips2 -fullwarn -non_shared -nostdinc \
101 -mips2 -o32 -woff 1685,515,608,658,799,803,852,1048,1233,1499,1501 \
102 -Wf,-XNp12000 -DDEFAULTSEMAMETER=1
103 R10000_LDFLAGS = -mips2 -o32
104 R10000_KDEFS = -DCRIME -DIP32 -DCRM -D_K32U64 -xansi -D_K32U64 -D_PAGESZ=4096 \
105 -D_KERNEL -DSTATIC=static -D_VCE_AVOIDANCE -DTILE_DATA \
106 -DTLBMOD_BADVADDR_WAR -D_VCE_AVOIDANCE_DEBUG -D_TLB_LOOP_LIMIT \
107 -DP0_WAR -D_IRIX5_MIPS4 -D_IRIX5_MIPS3 -D_R5000_BADVADDR_WAR \
108 -DMIPS4_ISA -DSW_FAST_CACHE_SYNCH -DSWASH -DSCACHE_SET_ASSOC=2 \
109 -D_R5000_CVT_WAR=1 -D_MTEXT_VFS -DR10000_SPECULATION_WAR \
110 -DMH_R10000_SPECULATION_WAR -DSP -DIP32 -DR4000 -DR4000PC -DR4600 \
111 -DR4600SC -DTRITON -DR10000 -D_NO_R4000 -g -elf -mips2 -fullwarn \
112 -non_shared -nostdinc -mips2 -o32 \
113 -woff 1685,515,608,658,799,803,852,1048,1233,1499,1501 \
114 -Wf,-XNp12000 -DDEFAULTSEMAMETER=1
116 KDEFS= -I/usr/include -I/usr/include/sys -D_KERNEL -DSTATIC=static \
117 -non_shared -elf -xansi \
119 -D${CPUBOARD} -D${MPSP} -DAFS_SGIMP_ENV ${NODYNOPT} \
120 -jalr -woff 1209,1196,1496
121 R10000_LDFLAGS = -mips4 -64
122 R10000_KDEFS = -DKONA -DIP27 -DIP27 -DDISCONTIG_PHYSMEM -DNUMA_BASE -DNUMA_PM \
123 -DNUMA_TBORROW -DNUMA_MIGR_CONTROL -DNUMA_REPLICATION \
124 -DNUMA_REPL_CONTROL -DNUMA_SCHED -DLARGE_CPU_COUNT -DHUB2_NACK_WAR \
125 -DBRIDGE_ERROR_INTR_WAR -DMAPPED_KERNEL -DBHV_SYNCH -DHUB_ERR_STS_WAR \
126 -DHUB_MIGR_WAR -DNCR16C550 -DTL16PIR552 -DSN0_INTR_BROKEN -DFRU \
127 -DFORCE_ERRORS -DSN0_USE_BTE -DBTE_BZERO_WAR -DREV1_BRIDGE_SUPPORTED \
128 -DHUB_II_IFDR_WAR -xansi -DDISCONTIG_PHYSMEM -DNUMA_BASE -DNUMA_PM \
129 -DNUMA_TBORROW -DNUMA_MIGR_CONTROL -DNUMA_REPLICATION \
130 -DNUMA_REPL_CONTROL -DNUMA_SCHED -DLARGE_CPU_COUNT -DHUB2_NACK_WAR \
131 -DBRIDGE_ERROR_INTR_WAR -DMAPPED_KERNEL -DBHV_SYNCH \
132 -DHUB_ERR_STS_WAR -DHUB_MIGR_WAR -DNCR16C550 -DTL16PIR552 \
133 -DSN0_INTR_BROKEN -DFRU -DFORCE_ERRORS -DSN0_USE_BTE -DBTE_BZERO_WAR \
134 -DREV1_BRIDGE_SUPPORTED -DHUB_II_IFDR_WAR -D_PAGESZ=16384 -D_KERNEL \
135 -DSTATIC=static -D_MIPS3_ADDRSPACE -DSN0 -DMIPS4_ISA \
136 -DCLOCK_CTIME_IS_ABSOLUTE -DFAST_LOCORE_TFAULT -DULI -DCKPT \
137 -DIDLESTACK_FASTINT -DR10K_LLSC_WAR -DPTE_64BIT -DRMAPS \
138 -DPAGE_MIGRATION -DSW_FAST_CACHE_SYNCH -DINTR_KTHREADS \
139 -DMRSP_AS_MR -D_MP_NETLOCKS -DMP_STREAMS=1 -DIP27 -DR10000 \
140 -g -TENV:kernel -TENV:misalignment=1 -OPT:space \
141 -OPT:quad_align_branch_targets=FALSE \
142 -OPT:quad_align_with_memops=FALSE \
143 -OPT:unroll_times=0 -OPT:Olimit=5000 -TARG:processor=r10000 \
144 -FE:pointer_readonly -use_readonly_const -fullwarn \
145 -non_shared -mips4 -64 \
146 -woff 1685,515,608,658,799,803,852,1048,1233,1499,1501 \
149 # For Irix 6.5 we are building based on cpu board number rather than CPU number
150 # While -G 8 is recommended for space, we know that the table overflows when
151 # both AFS and DFS are compiled into the kernel. For Irix 6.5, define MP
152 # so we pick up locks.
153 KDEFS= -I/usr/include -I/usr/include/sys -DSTATIC=static -DAFS_SGIMP_ENV \
154 -DMP -D_KERNEL -DMP_STREAMS -D_MP_NETLOCKS -DMRSP_AS_MR \
155 -fullwarn -non_shared -G 0 \
156 -TENV:kernel -OPT:space -OPT:Olimit=0 -CG:unique_exit=on \
157 -TENV:X=1 -OPT:IEEE_arithmetic=1 -OPT:roundoff=0 \
158 -OPT:wrap_around_unsafe_opt=off \
159 ${CPU_KDEFS} -woff 1209,1196,1496
160 # 32 bit specific flags:
161 KDEFS_32 = -n32 -D_PAGESZ=4096 -mips3
162 # 64 bit specific flags:
163 KDEFS_64 = -64 -D_PAGESZ=16384 -D_MIPS3_ADDRSPACE -mips4
165 # CPU board specific flags:
166 IP19_KDEFS = -DIP19 -DEVEREST -DMP -DR4000 \
167 -mips3 -D_PAGESZ=16384 -D_MIPS3_ADDRSPACE -64
168 IP20_KDEFS = -DIP20 -DR4000 -DJUMP_WAR -DBADVA_WAR -DTRITON -DUSE_PCI_PIO \
170 IP21_KDEFS = -DIP21 -DEVEREST -DMP -DTFP -TARG:processor=r8000 $(KDEFS_64)
171 IP25_KDEFS = -DIP25 -DEVEREST -DMP -DR10000 -TARG:processor=r10000 $(KDEFS_64)
172 IP26_KDEFS = -DIP26 -DTFP -TARG:sync=off -TARG:processor=r8000 $(KDEFS_64)
173 IP27_KDEFS = -DIP27 -DR10000 -DMP -DSN -DSN0 -DMAPPED_KERNEL \
175 -DPTE_64BIT -DULI -DCKPT -DMIPS4_ISA -DR10K_LLSC_WAR -DNUMA_BASE \
176 -DNUMA_PM -DNUMA_TBORROW -DNUMA_MIGR_CONTROL -DNUMA_REPLICATION \
177 -DNUMA_REPL_CONTROL -DNUMA_SCHED -DCELL_PREPARE -DBHV_PREPARE \
178 -TARG:processor=r10000 $(KDEFS_64)
179 IP28_KDEFS = -DIP28 -DR10000 -DSCACHE_SET_ASSOC=2 -D_NO_UNCACHED_MEM_WAR \
180 -DR10000_SPECULATION_WAR -TARG:processor=r10000 \
181 -TARG:t5_no_spec_stores $(KDEFS_64)
182 IP30_KDEFS = -DIP30 -DR10000 -DMP -DCELL_PREPARE -DBHV_PREPARE \
183 -TARG:processor=r10000 $(KDEFS_64)
190 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
193 CFLAGS=-I. -I.. ${FSINCLUDES} $(DEFINES) -G 0 $(KDEFS) $(KOPTS) ${DBUG}
195 # This tells Makefile.common to use it's single directory build target.
196 #COMPDIRS = single_compdir
197 # This is the irix multiple directory target.
198 COMPDIRS = irix_compdirs
200 include Makefile.common
202 # Make all the directories, even if only building one.
204 PROCESSORS=R4000 R4000_32 R8000 R10000
206 PROCESSORS = R5000 R1000
210 PROCESSORS = IP19 IP20 IP21 IP25 IP26 IP27 IP28 IP30
213 KOBJ = STATIC MODLOAD
217 -rm -f h net netinet rpc ufs nfs machine sys sgiefs
218 -ln -s /usr/include/sys h
219 -ln -s /usr/include/net /usr/include/netinet .
220 -ln -s /usr/include/rpc /usr/include/sys .
221 -ln -s ../../obj/sgiefs sgiefs
222 -mkdir ${DESTDIR}root.client/bin
223 -mkdir ${DESTDIR}root.client/usr/vice/etc/sgiload
225 BUILDPROCS="${PROCESSORS}" ; \
226 BUILDMPS="${MPS}" ; \
227 if [ "${CPUARCH}" != "" ] ; then \
228 BUILDPROCS=${CPUARCH}; \
231 for p in $${BUILDPROCS} ; do \
232 for n in $${BUILDMPS} ; do \
233 for t in ${KOBJ} ; do \
235 echo Making directory: $$dir; \
237 rm -f $$dir/Makefile.common $$dir/Makefile; \
238 ln -s ../Makefile.common $$dir/Makefile.common; \
239 ln -s ../Makefile $$dir/Makefile; \
244 BUILDPROCS="${PROCESSORS}" ; \
245 if [ "${IPNO}" != "" ] ; then \
246 BUILDPROCS="${IPNO}"; \
248 for p in $${BUILDPROCS} ; do \
249 for t in ${KOBJ} ; do \
251 echo Making directory: $$dir; \
253 rm -f $$dir/Makefile.common $$dir/Makefile; \
254 ln -s ../Makefile.common $$dir/Makefile.common; \
255 ln -s ../Makefile $$dir/Makefile; \
259 echo Setup compelete.
262 # Compile static and modload versions of the clients.
265 BUILDPROCS="${PROCESSORS}" ; \
266 if [ "${CPUARCH}" != "" ] ; then \
267 BUILDPROCS=${CPUARCH}; \
270 for p in $${BUILDPROCS} ; do \
271 for n in $${BUILDMPS} ; do \
272 for t in ${KOBJ} ; do \
274 echo Building directory: $$dir; \
278 CPU_KDEFS="${R4000_KDEFS}"; \
279 LDFLAGS="${R4000_LDFLAGS}";; \
282 CPU_KDEFS="${R4000_32_KDEFS}"; \
283 LDFLAGS="${R4000_32_LDFLAGS}";; \
286 CPU_KDEFS="${R5000_KDEFS}"; \
287 LDFLAGS="${R5000_LDFLAGS}";; \
290 CPU_KDEFS="${R8000_KDEFS}"; \
291 LDFLAGS="${R8000_LDFLAGS}";; \
299 <sgi_62 sgi_63 sgi_64>
300 CPU_KDEFS="${R10000_KDEFS}"; \
301 LDFLAGS="${R10000_LDFLAGS}";; \
302 *) echo "Unknown CPUARCH <$$p>" ; exit 1 ;; \
308 $(MAKE) CPUARCH=$$p MPSP=$$n DESTDIR=../${DESTDIR} $$t.libafs || exit $$?;\
315 BUILDPROCS="${PROCESSORS}" ; \
316 if [ "${IPNO}" != "" ] ; then \
317 BUILDPROCS="${IPNO}"; \
319 for p in $${BUILDPROCS} ; do \
320 for t in ${KOBJ} ; do \
322 echo Building directory: $$dir; \
323 LDFLAGS="${LDFLAGS_64}"; \
325 IP19) CPU_KDEFS="${IP19_KDEFS}";; \
326 IP20) CPU_KDEFS="${IP20_KDEFS}"; \
327 LDFLAGS="${LDFLAGS_32}";; \
328 IP21) CPU_KDEFS="${IP21_KDEFS}";; \
329 IP25) CPU_KDEFS="${IP25_KDEFS}";; \
330 IP26) CPU_KDEFS="${IP26_KDEFS}";; \
331 IP27) CPU_KDEFS="${IP27_KDEFS}";; \
332 IP28) CPU_KDEFS="${IP28_KDEFS}";; \
333 IP30) CPU_KDEFS="${IP30_KDEFS}";; \
334 *) echo Unknown IP number $$p ; exit 1 ;; \
337 MODLOAD) CPU_KDEFS="$${CPU_KDEFS} -TARG:force_jalr";; \
340 STATIC) echo X $${CPU_KDEFS} | sed 's/^X//' > $$dir/CPU_KDEFS;; \
345 $(MAKE) IPNO=$$p DESTDIR=../${DESTDIR} $$t.libafs || exit $$?; \
353 LIBAFSNONFSA = libafs.nonfs.a
354 COPYFILES = copyfiles
355 LINKFILES = linkfiles
357 STATICCLIENTDIR = ${DESTDIR}root.client/bin
358 MODLOADCLIENTDIR = ${DESTDIR}root.client/usr/vice/etc/sgiload
360 # Make the NFS and no-NFS clients for this directory.
361 # STATIC.libafs: ${LIBAFSA} ${LIBAFSNONFSA} ${COPYFILES} ${LINKFILES}
362 STATIC.libafs: ${LIBAFSNONFSA} ${COPYFILES} ${LINKFILES}
365 ${STATICCLIENTDIR}/libafs.${MPSP}.${CPUARCH}.a
366 ${CP} ${LIBAFSNONFSA} \
367 ${STATICCLIENTDIR}/libafs.${MPSP}.${CPUARCH}.nonfs.a
370 ${STATICCLIENTDIR}/libafs.${IPNO}.a
371 ${CP} ${LIBAFSNONFSA} \
372 ${STATICCLIENTDIR}/libafs.${IPNO}.nonfs.a
375 ${LIBAFSA}: $(AFSAOBJS) $(AFSNFSOBJS)
378 ${LIBAFSNONFSA}: $(AFSAOBJS) $(AFSNONFSOBJS)
382 LIBAFSNONFSO = libaf.nonfs.o
384 # MODLOAD.libafs: ${LIBAFSO} ${LIBAFSNONFSO} ${COPYFILES} ${LINKFILES}
385 MODLOAD.libafs: ${LIBAFSNONFSO} ${COPYFILES} ${LINKFILES}
388 ${MODLOADCLIENTDIR}/libafs.${MPSP}.${CPUARCH}.o
389 ${CP} ${LIBAFSNONFSO} \
390 ${MODLOADCLIENTDIR}/libafs.${MPSP}.${CPUARCH}.nonfs.o
393 ${MODLOADCLIENTDIR}/libafs.${IPNO}.o
394 ${CP} ${LIBAFSNONFSO} \
395 ${MODLOADCLIENTDIR}/libafs.${IPNO}.nonfs.o
398 ${LIBAFSO}: $(AFSAOBJS) $(AFSNFSOBJS)
399 $(LD) ${LDFLAGS} -elf -r -d -G 0 -o ${LIBAFSO} $(AFSAOBJS) $(AFSNFSOBJS)
402 ${LIBAFSNONFSO}: $(AFSAOBJS) $(AFSNONFSOBJS)
403 $(LD) ${LDFLAGS} -elf -r -d -G 0 -o ${LIBAFSNONFSO} \
404 $(AFSAOBJS) $(AFSNONFSOBJS)
407 ${CP} ../sgi_system ${STATICCLIENTDIR}/afs.sm
408 chmod 644 ${STATICCLIENTDIR}/afs.sm
409 ${CP} ../sgi_master ${STATICCLIENTDIR}/afs
410 chmod 644 ${STATICCLIENTDIR}/afs
412 # Create symlinks to clients we don't need to build.
413 # If this changes, also change the kdump symlinks.
416 ln -fs libafs.IP20.a ${DESTDIR}root.client/bin/libafs.IP22.a
417 ln -fs libafs.IP20.a ${DESTDIR}root.client/bin/libafs.IP32.a
418 ln -fs libafs.IP20.nonfs.a ${DESTDIR}root.client/bin/libafs.IP22.nonfs.a
419 ln -fs libafs.IP20.nonfs.a ${DESTDIR}root.client/bin/libafs.IP32.nonfs.a
420 ln -fs libafs.IP20.o ${DESTDIR}root.client/usr/vice/etc/sgiload/libafs.IP22.o
421 ln -fs libafs.IP20.o ${DESTDIR}root.client/usr/vice/etc/sgiload/libafs.IP32.o
422 ln -fs libafs.IP20.nonfs.o ${DESTDIR}root.client/usr/vice/etc/sgiload/libafs.IP22.nonfs.o
423 ln -fs libafs.IP20.nonfs.o ${DESTDIR}root.client/usr/vice/etc/sgiload/libafs.IP32.nonfs.o
428 # Object build rules:
430 afs_base64.o: $(AFS)/afs_base64.c
432 osi_groups.o: $(AFS)/osi_groups.c
434 osi_idbg.o: $(AFS)/osi_idbg.c
436 osi_inode.o: $(AFS)/osi_inode.c
438 osi_file.o: $(AFS)/osi_file.c
440 osi_misc.o: $(AFS)/osi_misc.c
442 osi_sleep.o: $(AFS)/osi_sleep.c
444 osi_vfsops_nfs.o: $(AFS)/osi_vfsops.c
445 $(CRULE1) -o osi_vfsops_nfs.o;
446 osi_vfsops.o: $(AFS)/osi_vfsops.c
447 $(CRULE1) -DAFS_NONFSTRANS;
448 osi_vm.o: $(AFS)/osi_vm.c
450 osi_vnodeops.o: $(AFS)/osi_vnodeops.c