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 ../config/Makefile.${SYS_NAME}
14 # OS specific object files:
33 # System specific build commands and flags
44 # Turning off warnings regarding constant conditionals and not prototyped.
45 KDEFS=-D_K64U64 -D_KERNEL -DSTATIC=static -D_PAGESZ=16384 -D_MIPS3_ADDRSPACE \
46 -DTFP -non_shared -elf -xansi -64 -mips4 -TENV:kernel \
47 -TENV:misalignment=1 -OPT:space \
48 -D${CPUBOARD} -D${MPSP} -D${CPUARCH} -DAFS_SGIMP_ENV ${NODYNOPT} \
49 -jalr -woff 1209,1196,1496
51 # Turning off warnings regarding constant conditionals and not prototyped.
52 KDEFS_64BIT= -64 -D_K64U64 -D_PAGESZ=16384 -TENV:kernel -OPT:space \
54 R4000_LDFLAGS = -mips3 -64
55 R4000_KDEFS = -mips3 -DR4000_DADDIU_WAR -DFAST_LOCORE_TFAULT -DUSE_LGPAGES \
56 -DR4000 -DEVEREST -DBADVA_WAR -DMP_R4000_BADVA_WAR \
57 -DECC_RECOVER -DCLOCK_CTIME_IS_ABSOLUTE -D_SHAREII -D_HIBERNATORII \
58 -DPIOMEMOPS -DULI ${KDEFS_64BIT}
59 R8000_KDEFS = -mips4 -DTFP -DR8000 ${KDEFS_64BIT}
60 R8000_LDFLAGS = -mips4 -64
61 KDEFS= -I/usr/include -I/usr/include/sys -D_KERNEL -DSTATIC=static \
62 -D_MIPS3_ADDRSPACE -non_shared -elf -xansi \
64 -D${CPUBOARD} -D${MPSP} -DAFS_SGIMP_ENV ${NODYNOPT} \
65 -jalr -woff 1209,1196,1496
66 R10000_KDEFS = -mips4 -DR10000 -DEXPRESS -DIP28 -DI2_64 -DFAST_LOCORE_FAULT \
67 -DSCACHE_SET_ASSOC=2 -D_NO_UNCACHED_MEM_WAR -DMIPS4_ISA \
68 -DR10000_SPECULATION_WAR \
69 -OPT:quad_align_branch_targets=FALSE \
70 -OPT:quad_align_with_memops=FALSE -OPT:unroll_times=0 \
71 -DDEFAULTSEMAMETER=1 ${KDEFS_64BIT}
72 R10000_LDFLAGS = -mips4 -64
73 R4000_32_LDFLAGS = -mips2 -o32
74 R4000_32_KDEFS = -mips2 -o32 -elf -DEXPRESS -D_K32U64 -xansi\
75 -D_PAGESZ=4096 -D_KERNEL \
76 -DSTATIC=static -DBADVA_WAR -DJUMP_WAR -DPROBE_WAR -D_MEM_PARITY_WAR \
77 -D_TLB_LOOP_LIMIT -DTLBMOD_BADVADDR_WAR -D_VCE_AVOIDANCE \
78 -D_R4600_CACHEOP_WAR -D_R4600_2_0_CACHEOP_WAR -D_IRIX5_MIPS3 \
79 -D_IRIX5_MIPS4 -D_R5000_BADVADDR_WAR -D_R5000_JUMP_WAR -DMIPS4_ISA \
80 -DR4000 -DR4000PC -DR4600 -DR4600SC -DTRITON -DTRITON_INDYSC \
81 -Wc,-pic0 -fullwarn -non_shared -nostdinc -Wf,-XNp12000 \
82 -woff 1685,515,608,658,799,803,835,852,1048,1233,1499,1501 \
85 # Turning off warnings regarding constant conditionals and not prototyped.
86 # NOTE: Only for R5000 at the moment.
87 KDEFS= -I/usr/include -I/usr/include/sys -D_KERNEL -DSTATIC=static \
88 -non_shared -elf -xansi \
90 -D${CPUBOARD} -D${MPSP} -DAFS_SGIMP_ENV ${NODYNOPT} \
91 -jalr -woff 1209,1196,1496
92 R5000_LDFLAGS = -mips2 -o32
93 R5000_KDEFS = -DCRIME -DIP32 -DCRM -D_K32U64 -xansi -D_PAGESZ=4096 \
94 -D_KERNEL -DSTATIC=static -DPROBE_WAR -D_VCE_AVOIDANCE -DTILE_DATA \
95 -D_VCE_AVOIDANCE_DEBUG -D_R4600_CACHEOP_WAR -D_TLB_LOOP_LIMIT \
96 -D_R4600_2_0_CACHEOP_WAR -DP0_WAR -D_IRIX5_MIPS4 -D_IRIX5_MIPS3 \
97 -D_R5000_BADVADDR_WAR -DMIPS4_ISA -DSW_FAST_CACHE_SYNCH -DSWASH \
98 -D_R5000_CVT_WAR=1 -D_MTEXT_VFS -DR4000 -DR4000PC -DR4600 \
99 -DR4600SC -DTRITON -g -elf -mips2 -fullwarn -non_shared -nostdinc \
100 -mips2 -o32 -woff 1685,515,608,658,799,803,852,1048,1233,1499,1501 \
101 -Wf,-XNp12000 -DDEFAULTSEMAMETER=1
102 R10000_LDFLAGS = -mips2 -o32
103 R10000_KDEFS = -DCRIME -DIP32 -DCRM -D_K32U64 -xansi -D_K32U64 -D_PAGESZ=4096 \
104 -D_KERNEL -DSTATIC=static -D_VCE_AVOIDANCE -DTILE_DATA \
105 -DTLBMOD_BADVADDR_WAR -D_VCE_AVOIDANCE_DEBUG -D_TLB_LOOP_LIMIT \
106 -DP0_WAR -D_IRIX5_MIPS4 -D_IRIX5_MIPS3 -D_R5000_BADVADDR_WAR \
107 -DMIPS4_ISA -DSW_FAST_CACHE_SYNCH -DSWASH -DSCACHE_SET_ASSOC=2 \
108 -D_R5000_CVT_WAR=1 -D_MTEXT_VFS -DR10000_SPECULATION_WAR \
109 -DMH_R10000_SPECULATION_WAR -DSP -DIP32 -DR4000 -DR4000PC -DR4600 \
110 -DR4600SC -DTRITON -DR10000 -D_NO_R4000 -g -elf -mips2 -fullwarn \
111 -non_shared -nostdinc -mips2 -o32 \
112 -woff 1685,515,608,658,799,803,852,1048,1233,1499,1501 \
113 -Wf,-XNp12000 -DDEFAULTSEMAMETER=1
115 KDEFS= -I/usr/include -I/usr/include/sys -D_KERNEL -DSTATIC=static \
116 -non_shared -elf -xansi \
118 -D${CPUBOARD} -D${MPSP} -DAFS_SGIMP_ENV ${NODYNOPT} \
119 -jalr -woff 1209,1196,1496
120 R10000_LDFLAGS = -mips4 -64
121 R10000_KDEFS = -DKONA -DIP27 -DIP27 -DDISCONTIG_PHYSMEM -DNUMA_BASE -DNUMA_PM \
122 -DNUMA_TBORROW -DNUMA_MIGR_CONTROL -DNUMA_REPLICATION \
123 -DNUMA_REPL_CONTROL -DNUMA_SCHED -DLARGE_CPU_COUNT -DHUB2_NACK_WAR \
124 -DBRIDGE_ERROR_INTR_WAR -DMAPPED_KERNEL -DBHV_SYNCH -DHUB_ERR_STS_WAR \
125 -DHUB_MIGR_WAR -DNCR16C550 -DTL16PIR552 -DSN0_INTR_BROKEN -DFRU \
126 -DFORCE_ERRORS -DSN0_USE_BTE -DBTE_BZERO_WAR -DREV1_BRIDGE_SUPPORTED \
127 -DHUB_II_IFDR_WAR -xansi -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 \
131 -DHUB_ERR_STS_WAR -DHUB_MIGR_WAR -DNCR16C550 -DTL16PIR552 \
132 -DSN0_INTR_BROKEN -DFRU -DFORCE_ERRORS -DSN0_USE_BTE -DBTE_BZERO_WAR \
133 -DREV1_BRIDGE_SUPPORTED -DHUB_II_IFDR_WAR -D_PAGESZ=16384 -D_KERNEL \
134 -DSTATIC=static -D_MIPS3_ADDRSPACE -DSN0 -DMIPS4_ISA \
135 -DCLOCK_CTIME_IS_ABSOLUTE -DFAST_LOCORE_TFAULT -DULI -DCKPT \
136 -DIDLESTACK_FASTINT -DR10K_LLSC_WAR -DPTE_64BIT -DRMAPS \
137 -DPAGE_MIGRATION -DSW_FAST_CACHE_SYNCH -DINTR_KTHREADS \
138 -DMRSP_AS_MR -D_MP_NETLOCKS -DMP_STREAMS=1 -DIP27 -DR10000 \
139 -g -TENV:kernel -TENV:misalignment=1 -OPT:space \
140 -OPT:quad_align_branch_targets=FALSE \
141 -OPT:quad_align_with_memops=FALSE \
142 -OPT:unroll_times=0 -OPT:Olimit=5000 -TARG:processor=r10000 \
143 -FE:pointer_readonly -use_readonly_const -fullwarn \
144 -non_shared -mips4 -64 \
145 -woff 1685,515,608,658,799,803,852,1048,1233,1499,1501 \
148 # For Irix 6.5 we are building based on cpu board number rather than CPU number
149 # While -G 8 is recommended for space, we know that the table overflows when
150 # both AFS and DFS are compiled into the kernel. For Irix 6.5, define MP
151 # so we pick up locks.
152 KDEFS= -I/usr/include -I/usr/include/sys -DSTATIC=static -DAFS_SGIMP_ENV \
153 -DMP -D_KERNEL -DMP_STREAMS -D_MP_NETLOCKS -DMRSP_AS_MR \
154 -fullwarn -non_shared -G 0 \
155 -TENV:kernel -OPT:space -OPT:Olimit=0 -CG:unique_exit=on \
156 -TENV:X=1 -OPT:IEEE_arithmetic=1 -OPT:roundoff=0 \
157 -OPT:wrap_around_unsafe_opt=off \
158 ${CPU_KDEFS} -woff 1209,1196,1496
159 # 32 bit specific flags:
160 KDEFS_32 = -n32 -D_PAGESZ=4096 -mips3
161 # 64 bit specific flags:
162 KDEFS_64 = -64 -D_PAGESZ=16384 -D_MIPS3_ADDRSPACE -mips4
164 # CPU board specific flags:
165 IP19_KDEFS = -DIP19 -DEVEREST -DMP -DR4000 \
166 -mips3 -D_PAGESZ=16384 -D_MIPS3_ADDRSPACE -64
167 IP20_KDEFS = -DIP20 -DR4000 -DJUMP_WAR -DBADVA_WAR -DTRITON -DUSE_PCI_PIO \
169 IP21_KDEFS = -DIP21 -DEVEREST -DMP -DTFP -TARG:processor=r8000 $(KDEFS_64)
170 IP25_KDEFS = -DIP25 -DEVEREST -DMP -DR10000 -TARG:processor=r10000 $(KDEFS_64)
171 IP26_KDEFS = -DIP26 -DTFP -TARG:sync=off -TARG:processor=r8000 $(KDEFS_64)
172 IP27_KDEFS = -DIP27 -DR10000 -DMP -DSN -DSN0 -DMAPPED_KERNEL \
174 -DPTE_64BIT -DULI -DCKPT -DMIPS4_ISA -DR10K_LLSC_WAR -DNUMA_BASE \
175 -DNUMA_PM -DNUMA_TBORROW -DNUMA_MIGR_CONTROL -DNUMA_REPLICATION \
176 -DNUMA_REPL_CONTROL -DNUMA_SCHED -DCELL_PREPARE -DBHV_PREPARE \
177 -TARG:processor=r10000 $(KDEFS_64)
178 IP28_KDEFS = -DIP28 -DR10000 -DSCACHE_SET_ASSOC=2 -D_NO_UNCACHED_MEM_WAR \
179 -DR10000_SPECULATION_WAR -TARG:processor=r10000 \
180 -TARG:t5_no_spec_stores $(KDEFS_64)
181 IP30_KDEFS = -DIP30 -DR10000 -DMP -DCELL_PREPARE -DBHV_PREPARE \
182 -TARG:processor=r10000 $(KDEFS_64)
189 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
192 CFLAGS=-I. -I.. -I${TOP_SRCDIR}/config ${FSINCLUDES} $(DEFINES) -G 0 $(KDEFS) $(KOPTS) ${DBUG}
194 # This tells Makefile.common to use it's single directory build target.
195 #COMPDIRS = single_compdir
196 # This is the irix multiple directory target.
197 COMPDIRS = irix_compdirs
199 include Makefile.common
201 # Make all the directories, even if only building one.
203 PROCESSORS=R4000 R4000_32 R8000 R10000
205 PROCESSORS = R5000 R1000
209 PROCESSORS = IP19 IP20 IP21 IP25 IP26 IP27 IP28 IP30
212 KOBJ = STATIC MODLOAD
216 -rm -f h net netinet rpc ufs nfs machine sys
217 -ln -s /usr/include/sys h
218 -ln -s /usr/include/net /usr/include/netinet .
219 -ln -s /usr/include/rpc /usr/include/sys .
220 -ln -s /usr/include/sys/fs .
221 -mkdir ${DESTDIR}root.client/bin
223 BUILDPROCS="${PROCESSORS}" ; \
224 BUILDMPS="${MPS}" ; \
225 if [ "${CPUARCH}" != "" ] ; then \
226 BUILDPROCS=${CPUARCH}; \
229 for p in $${BUILDPROCS} ; do \
230 for n in $${BUILDMPS} ; do \
231 for t in ${KOBJ} ; do \
233 echo Making directory: $$dir; \
235 rm -f $$dir/Makefile.common $$dir/Makefile; \
236 ln -s ../Makefile.common $$dir/Makefile.common; \
237 ln -s ../Makefile $$dir/Makefile; \
242 BUILDPROCS="${PROCESSORS}" ; \
243 if [ "${IPNO}" != "" ] ; then \
244 BUILDPROCS="${IPNO}"; \
246 for p in $${BUILDPROCS} ; do \
247 for t in ${KOBJ} ; do \
249 echo Making directory: $$dir; \
251 rm -f $$dir/Makefile.common $$dir/Makefile; \
252 ln -s ../Makefile.common $$dir/Makefile.common; \
253 ln -s ../Makefile $$dir/Makefile; \
257 echo Setup compelete.
260 # Compile static and modload versions of the clients.
263 BUILDPROCS="${PROCESSORS}" ; \
264 if [ "${CPUARCH}" != "" ] ; then \
265 BUILDPROCS=${CPUARCH}; \
268 for p in $${BUILDPROCS} ; do \
269 for n in $${BUILDMPS} ; do \
270 for t in ${KOBJ} ; do \
272 echo Building directory: $$dir; \
276 CPU_KDEFS="${R4000_KDEFS}"; \
277 LDFLAGS="${R4000_LDFLAGS}";; \
280 CPU_KDEFS="${R4000_32_KDEFS}"; \
281 LDFLAGS="${R4000_32_LDFLAGS}";; \
284 CPU_KDEFS="${R5000_KDEFS}"; \
285 LDFLAGS="${R5000_LDFLAGS}";; \
288 CPU_KDEFS="${R8000_KDEFS}"; \
289 LDFLAGS="${R8000_LDFLAGS}";; \
297 <sgi_62 sgi_63 sgi_64>
298 CPU_KDEFS="${R10000_KDEFS}"; \
299 LDFLAGS="${R10000_LDFLAGS}";; \
300 *) echo "Unknown CPUARCH <$$p>" ; exit 1 ;; \
306 $(MAKE) CPUARCH=$$p MPSP=$$n DESTDIR=../${DESTDIR} $$t.libafs || exit $$?;\
313 BUILDPROCS="${PROCESSORS}" ; \
314 if [ "${IPNO}" != "" ] ; then \
315 BUILDPROCS="${IPNO}"; \
317 for p in $${BUILDPROCS} ; do \
318 for t in ${KOBJ} ; do \
320 echo Building directory: $$dir; \
321 LDFLAGS="${LDFLAGS_64}"; \
323 IP19) CPU_KDEFS="${IP19_KDEFS}";; \
324 IP20) CPU_KDEFS="${IP20_KDEFS}"; \
325 LDFLAGS="${LDFLAGS_32}";; \
326 IP21) CPU_KDEFS="${IP21_KDEFS}";; \
327 IP25) CPU_KDEFS="${IP25_KDEFS}";; \
328 IP26) CPU_KDEFS="${IP26_KDEFS}";; \
329 IP27) CPU_KDEFS="${IP27_KDEFS}";; \
330 IP28) CPU_KDEFS="${IP28_KDEFS}";; \
331 IP30) CPU_KDEFS="${IP30_KDEFS}";; \
332 *) echo Unknown IP number $$p ; exit 1 ;; \
335 MODLOAD) CPU_KDEFS="$${CPU_KDEFS} -TARG:force_jalr";; \
338 STATIC) echo X $${CPU_KDEFS} | sed 's/^X//' > $$dir/CPU_KDEFS;; \
343 $(MAKE) IPNO=$$p DESTDIR=${DESTDIR} $$t.libafs || exit $$?; \
350 LIBAFSNONFSA = libafs.nonfs.a
351 COPYFILES = copyfiles
352 LINKFILES = linkfiles
354 STATICCLIENTDIR = ${DESTDIR}root.client/bin
355 MODLOADCLIENTDIR = ${DESTDIR}root.client/usr/vice/etc/sgiload
357 # Make the NFS and no-NFS clients for this directory.
358 # STATIC.libafs: ${LIBAFSNONFSA} ${COPYFILES} ${LINKFILES}
359 STATIC.libafs: ${LIBAFSNONFSA} ${COPYFILES} ${LINKFILES}
361 ${CP} ${LIBAFSNONFSA} \
362 ${STATICCLIENTDIR}/libafs.${MPSP}.${CPUARCH}.nonfs.a
364 ${CP} ${LIBAFSNONFSA} \
365 ${STATICCLIENTDIR}/libafs.${IPNO}.nonfs.a
368 ${LIBAFSNONFSA}: $(AFSAOBJS) $(AFSNONFSOBJS)
371 LIBAFSNONFSO = libaf.nonfs.o
373 # MODLOAD.libafs: ${LIBAFSNONFSO} ${COPYFILES} ${LINKFILES}
374 MODLOAD.libafs: ${LIBAFSNONFSO} ${COPYFILES} ${LINKFILES}
376 ${CP} ${LIBAFSNONFSO} \
377 ${MODLOADCLIENTDIR}/libafs.${MPSP}.${CPUARCH}.nonfs.o
379 ${CP} ${LIBAFSNONFSO} \
380 ${MODLOADCLIENTDIR}/libafs.${IPNO}.nonfs.o
383 ${LIBAFSNONFSO}: $(AFSAOBJS) $(AFSNONFSOBJS)
384 $(LD) ${LDFLAGS} -elf -r -d -G 0 -o ${LIBAFSNONFSO} \
385 $(AFSAOBJS) $(AFSNONFSOBJS)
388 ${CP} ../sgi_system ${STATICCLIENTDIR}/afs.sm
389 chmod 644 ${STATICCLIENTDIR}/afs.sm
390 ${CP} ../sgi_master ${STATICCLIENTDIR}/afs
391 chmod 644 ${STATICCLIENTDIR}/afs
393 # Create symlinks to clients we don't need to build.
394 # If this changes, also change the kdump symlinks.
397 ln -fs libafs.IP20.a ${DESTDIR}root.client/bin/libafs.IP22.a
398 ln -fs libafs.IP20.a ${DESTDIR}root.client/bin/libafs.IP32.a
399 ln -fs libafs.IP20.nonfs.a ${DESTDIR}root.client/bin/libafs.IP22.nonfs.a
400 ln -fs libafs.IP20.nonfs.a ${DESTDIR}root.client/bin/libafs.IP32.nonfs.a
401 ln -fs libafs.IP20.o ${DESTDIR}root.client/usr/vice/etc/sgiload/libafs.IP22.o
402 ln -fs libafs.IP20.o ${DESTDIR}root.client/usr/vice/etc/sgiload/libafs.IP32.o
403 ln -fs libafs.IP20.nonfs.o ${DESTDIR}root.client/usr/vice/etc/sgiload/libafs.IP22.nonfs.o
404 ln -fs libafs.IP20.nonfs.o ${DESTDIR}root.client/usr/vice/etc/sgiload/libafs.IP32.nonfs.o
409 # Object build rules:
411 afs_base64.o: $(AFS)/afs_base64.c
413 osi_groups.o: $(AFS)/osi_groups.c
415 osi_idbg.o: $(AFS)/osi_idbg.c
417 osi_inode.o: $(AFS)/osi_inode.c
419 osi_file.o: $(AFS)/osi_file.c
421 osi_misc.o: $(AFS)/osi_misc.c
423 osi_sleep.o: $(AFS)/osi_sleep.c
425 osi_vfsops_nfs.o: $(AFS)/osi_vfsops.c
426 $(CRULE1) -o osi_vfsops_nfs.o;
427 osi_vfsops.o: $(AFS)/osi_vfsops.c
428 $(CRULE1) -DAFS_NONFSTRANS;
429 osi_vm.o: $(AFS)/osi_vm.c
431 osi_vnodeops.o: $(AFS)/osi_vnodeops.c