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
9 include @TOP_OBJDIR@/src/config/Makefile.config
11 INSTALL_DATA = @INSTALL_DATA@
12 INSTALL_PROGRAM = @INSTALL_PROGRAM@
13 INSTALL_SCRIPT = @INSTALL_SCRIPT@
15 # OS specific object files:
28 rand-fortuna-kernel.o \
39 # Object files for iauth NFS->AFS authenticator.
51 # System specific build commands
57 IMPORTS = -bI:/lib/kernex.exp -bI:/lib/syscalls.exp -bI:/lib/sockets.exp \
58 -bI:/lib/netinet.exp \
59 -bI:${TOP_LIBDIR}/extras.exp
60 IMPORTS32 = -bI:${TOP_LIBDIR}/export.exp
61 IMPORTS64 = -bI:${TOP_LIBDIR}/export64.exp
62 KDEFS = -U_IBMR2 -D_POWER -D_AIX -DNLS -D_NLS -DMSG -D__STR31__ -Daiws \
63 -D_POWER_RS -D_POWER_PC -D_POWER_RS1 -D_POWER_RS2 -D_POWER_RSC \
64 -D_POWER_601 -D_POWER_603 -D_POWER_604 -D_THREADS -M -D_KERNEL \
65 -D_POWER_MP -UKOFF -DAFSDEBUG -DVICE -DNFS -DUFS -DINET -DQUOTA \
66 -DGETMOUNT -H8 -DAFS -DAFS_COMMON -D_VOPS -D_SUN -DKERNEL
67 LDSTUFF= -b"binder:/usr/lib/bind glink:/usr/lib/glink.o" -bnoentry -b h:4 \
69 LDSTUFF64= -b"binder:/usr/lib/bind glink:/usr/lib/glink64.o" -bnoentry -b h:4 \
71 LDFLAGS = -m -eafs_config -bexport:${TOP_LIBDIR}/afs.exp ${IMPORTS} \
72 -lsys -lcsys ${KLDOPTS}
74 CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(KDEFS) $(KOPTS) ${DBUG}
76 # Name of directory to hold object files and libraries.
77 KOBJ = MODLOAD MODLOAD64
79 # This tells Makefile.common to use it's single directory build target.
80 COMPDIRS = aix_compdirs
81 INSTDIRS = aix_instdirs
82 DESTDIRS = aix_destdirs
86 <rs_aix50 rs_aix51 rs_aix52 rs_aix53>
88 <rs_aix61 rs_aix71 rs_aix72 rs_aix73>
92 include Makefile.common
95 -$(RM) -f h net netinet rpc ufs nfs machine sys
96 ln -fs /usr/include/sys h
97 ln -fs /usr/include/net net
98 ln -fs /usr/include/netinet netinet
99 ln -fs /usr/include/rpc rpc
100 ln -fs /usr/include/sys sys
101 ln -fs /usr/include/nfs nfs
102 ln -fs /usr/include/jfs ufs
103 for m in ${KMODS} ; do \
105 mkdir -p $${KDIR} ; \
106 ln -fs ../Makefile $${KDIR}/Makefile ; \
107 ln -fs ../Makefile.common $${KDIR}/Makefile.common ; \
108 ln -fs ../config $${KDIR}/config ; \
111 ${COMPDIRS} ${INSTDIRS} ${DESTDIRS}:
112 for m in ${KMODS} ; do \
114 echo Building in directory: $${KDIR} ; \
115 if [ "$$m" = "32" ] ; then \
119 TARG="afs.ext.32" ; \
120 elif [ "$$m" = "64" ] ; then \
121 KOPTS="-q64 -DAFS_64BIT_KERNEL -D__64BIT_KERNEL" ; \
124 TARG="afs.ext.64" ; \
127 $(MAKE) DEST="$${DEST}" KOPTS="$${KOPTS}" KLDOPTS="$${KLDOPTS}" KASOPTS="$${KASOPTS}" $@_$${TARG} || exit $$?; \
131 aix_compdirs_afs.ext.32: afs.ext.32
132 aix_compdirs_afs.ext.64: afs.ext.64
133 aix_instdirs_afs.ext.32: install_afs.ext.32
134 aix_instdirs_afs.ext.64: install_afs.ext.64
135 aix_destdirs_afs.ext.32: dest_afs.ext.32
136 aix_destdirs_afs.ext.64: dest_afs.ext.64
138 dest_afs.ext.32: afs.ext.32
139 ${INSTALL} -d $(DEST)/root.client/usr/vice/etc/dkload
140 $(INSTALL) -m 644 afs.ext.32 $(DEST)/root.client/usr/vice/etc/dkload/afs.ext.32
141 -${STRIP} -X 32 $(DEST)/root.client/usr/vice/etc/dkload/afs.ext.32
142 $(INSTALL) -m 644 afs.ext.32.map $(DEST)/root.client/usr/vice/etc/dkload/afs.ext.32.map
143 echo Install for 32-bit Kernel Complete
145 dest_afs.ext.64: afs.ext.64
146 ${INSTALL} -d $(DEST)/root.client/usr/vice/etc/dkload
147 $(INSTALL) -m 644 afs.ext.64 $(DEST)/root.client/usr/vice/etc/dkload/afs.ext.64
148 -${STRIP} -X 64 $(DEST)/root.client/usr/vice/etc/dkload/afs.ext.32
149 $(INSTALL) -m 644 afs.ext.64.map $(DEST)/root.client/usr/vice/etc/dkload/afs.ext.64.map
150 echo Install for 64-bit Kernel Complete
152 install_afs.ext.32: afs.ext.32
153 ${INSTALL} -d $(DESTDIR)$(afskerneldir)
154 $(INSTALL) -m 644 afs.ext.32 $(DESTDIR)$(afskerneldir)/afs.ext.32
155 -${STRIP} -X 32 $(DESTDIR)$(afskerneldir)/afs.ext.32
156 $(INSTALL) -m 644 afs.ext.32.map $(DESTDIR)$(afskerneldir)/afs.ext.32.map
157 echo Install for 32-bit Kernel Complete
159 install_afs.ext.64: afs.ext.64
160 ${INSTALL} -d $(DESTDIR)$(afskerneldir)
161 $(INSTALL) -m 644 afs.ext.64 $(DESTDIR)$(afskerneldir)/afs.ext.64
162 -${STRIP} -X 64 $(DESTDIR)$(afskerneldir)/afs.ext.64
163 $(INSTALL) -m 644 afs.ext.64.map $(DESTDIR)$(afskerneldir)/afs.ext.64.map
164 echo Install for 64-bit Kernel Complete
166 # Standard AFS->NFS translator support is removed in AFS 3.5 in favor of
167 # the iauth authentication mechanism. The model was changed by IBM in the
168 # middle of an OS release. So iauth is only supported on AIX 4.1.5 and
169 # later 4.1.x (if they are ever made) and AIX 4.2.1 (and later AIX 4.2.x if
170 # they are ever made. AIX 4.3 also uses the iauth translator.
172 LIBAFSIAUTH = afs.ext.32.iauth
174 DEST_LIBAFSIAUTH = $(DEST)/root.client/usr/vice/etc/dkload/$(LIBAFSIAUTH)
176 INST_LIBAFSIAUTH = ${DESTDIR}${afskerneldir}/$(LIBAFSIAUTH)
178 $(DEST_LIBAFSIAUTH): $(LIBAFSIAUTH)
180 $(INST_LIBAFSIAUTH): $(LIBAFSIAUTH)
183 $(LIBAFSIAUTH): $(AFSAOBJS) $(AFSIAUTHOBJS)
184 ${LD} ${LDSTUFF} -bloadmap:afs.ext.iauth.loadmap \
185 -bmap:afs.ext.iauth.map -o afs.ext.iauth \
186 ${AFSAOBJS} ${AFSIAUTHOBJS} ${LIBS} ${LDFLAGS} ${IMPORTS32}
188 afs.ext.32: $(AFSAOBJS) $(AFSNOIAUTHOBJS)
189 ${LD} ${LDSTUFF} -bloadmap:afs.ext.32.loadmap \
190 -bmap:afs.ext.32.map -o afs.ext.32 \
191 ${AFSAOBJS} ${AFSNOIAUTHOBJS} ${LIBS} \
192 ${LDFLAGS} ${IMPORTS32}
194 afs.ext.64: $(AFSAOBJS) $(AFSNOIAUTHOBJS)
195 ${LD} ${LDSTUFF64} -b64 -bloadmap:afs.ext.64.loadmap \
196 -bmap:afs.ext.64.map -o afs.ext.64 \
197 ${AFSAOBJS} ${AFSNOIAUTHOBJS} ${LIBS} \
198 ${LDFLAGS} ${IMPORTS64}
200 libafs: $(LIBAFS) $(LIBAFS64) $(LIBAFSIAUTH)
202 install_libafs: $(INST_LIBAFSIAUTH)
203 ${INSTALL} -d ${DESTDIR}${afskerneldir}
204 $(INSTALL) -m 644 $(LIBAFSIAUTH) $(INST_LIBAFSIAUTH)
205 -${STRIP} $(INST_LIBAFSIAUTH)
206 $(INSTALL) -m 644 $(LIBAFSIAUTH).map $(INST_LIBAFSIAUTH).map
208 dest_libafs: $(DEST_LIBAFSIAUTH)
209 ${INSTALL} -d $(DEST)/root.client/usr/vice/etc/dkload
210 $(INSTALL) -m 644 $(LIBAFSIAUTH) $(DEST_LIBAFSIAUTH)
211 -${STRIP} $(DEST_LIBAFSIAUTH)
212 $(INSTALL) -m 644 $(LIBAFSIAUTH).map $(DEST_LIBAFSIAUTH).map
214 osi_assem.o: osi_assem.s
215 ${AS} -a${KASOPTS} -o osi_assem.o osi_assem.s
216 osi_assem.s: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_assem32.s $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_assem64.s
217 case bit${KASOPTS} in \
219 cp -p $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_assem64.s osi_assem.s ;; \
221 cp -p $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_assem32.s osi_assem.s ;; \
225 # Build rules for iauth objects.
226 afs_call_iauth.o: $(TOP_SRCDIR)/afs/afs_call.c
227 $(CRULE1) -DAFS_NONFSTRANS -DAFS_AIX_IAUTH_ENV -o afs_call_iauth.o
228 afs_nfsclnt_iauth.o: $(TOP_SRCDIR)/afs/afs_nfsclnt.c
229 $(CRULE1) -DAFS_NONFSTRANS -DAFS_AIX_IAUTH_ENV -o afs_nfsclnt_iauth.o
230 afs_pioctl_iauth.o: $(TOP_SRCDIR)/afs/afs_pioctl.c
231 $(CRULE1) -DAFS_NONFSTRANS -DAFS_AIX_IAUTH_ENV -o afs_pioctl_iauth.o
232 osi_vfsops_iauth.o: $(TOP_SRCDIR)/afs/osi_vfsops.c
233 $(CRULE1) -DAFS_NONFSTRANS -DAFS_AIX_IAUTH_ENV -o osi_vfsops_iauth.o
234 osi_vnodeops_iauth.o: $(TOP_SRCDIR)/afs/osi_vnodeops.c
235 $(CRULE1) -DAFS_NONFSTRANS -DAFS_AIX_IAUTH_ENV -o osi_vnodeops_iauth.o