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