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 AIX systems
11 TOP_INCDIR=@TOP_INCDIR@
12 TOP_LIBDIR=@TOP_LIBDIR@
13 TOP_SRCDIR=@TOP_SRCDIR@
14 TOP_OBJDIR=@TOP_OBJDIR@
18 exec_prefix=@exec_prefix@
21 libexecdir=@libexecdir@
23 includedir=@includedir@
25 afssrvbindir=@afssrvbindir@
26 afssrvsbindir=@afssrvsbindir@
27 afssrvlibexecdir=@afssrvlibexecdir@
28 afskerneldir=@afskerneldir@
29 SYS_NAME=@AFS_SYSNAME@
31 include config/Makefile.${SYS_NAME}
33 # OS specific object files:
55 # Object files for iauth NFS->AFS authenticator.
63 # System specific build commands
69 IMPORTS = -bI:/lib/kernex.exp -bI:/lib/syscalls.exp -bI:/lib/sockets.exp \
70 -bI:/lib/netinet.exp \
71 -bI:${TOP_LIBDIR}/extras.exp -bI:${TOP_LIBDIR}/export.exp
72 KDEFS = -U_IBMR2 -D_POWER -D_AIX -DNLS -D_NLS -DMSG -D__STR31__ -Daiws \
73 -D_POWER_RS -D_POWER_PC -D_POWER_RS1 -D_POWER_RS2 -D_POWER_RSC \
74 -D_POWER_601 -D_POWER_603 -D_POWER_604 -D_THREADS -M -D_KERNEL \
75 -D_POWER_MP -UKOFF -DAFSDEBUG -DVICE -DNFS -DUFS -DINET -DQUOTA \
76 -DGETMOUNT -H8 -DAFS -DAFS_COMMON -D_VOPS -D_SUN -DKERNEL
77 LDSTUFF= -b"binder:/usr/lib/bind glink:/usr/lib/glink.o" -bnoentry -b h:4 \
79 LDFLAGS = -m -eafs_config -bexport:${TOP_LIBDIR}/afs.exp ${IMPORTS} \
82 CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(KDEFS) $(KOPTS) ${DBUG}
84 # Name of directory to hold object files and libraries.
87 # This tells Makefile.common to use it's single directory build target.
88 COMPDIRS = single_compdir
89 INSTDIRS = single_instdir
90 DESTDIRS = single_destdir
92 include Makefile.common
96 -$(RM) $(KOBJ)/Makefile $(KOBJ)/Makefile.common $(KOBJ)/config
97 ln -fs ../Makefile $(KOBJ)/Makefile
98 ln -fs ../Makefile.common $(KOBJ)/Makefile.common
99 ln -fs ../config $(KOBJ)/config
100 -$(RM) -f h net netinet rpc ufs nfs machine sys
101 ln -fs /usr/include/sys h
102 ln -fs /usr/include/net net
103 ln -fs /usr/include/netinet netinet
104 ln -fs /usr/include/rpc rpc
105 ln -fs /usr/include/sys sys
106 ln -fs /usr/include/nfs nfs
107 ln -fs /usr/include/jfs ufs
110 # Standard AFS->NFS translator support is removed in AFS 3.5 in favor of
111 # the iauth authentication mechanism. The model was changed by IBM in the
112 # middle of an OS release. So iauth is only supported on AIX 4.1.5 and
113 # later 4.1.x (if they are ever made) and AIX 4.2.1 (and later AIX 4.2.x if
114 # they are ever made. AIX 4.3 also uses the iauth translator.
116 LIBAFSIAUTH = afs.ext.iauth
119 DEST_LIBAFSIAUTH = $(DEST)/root.client/usr/vice/etc/dkload/$(LIBAFSIAUTH)
120 DEST_LIBAFS = $(DEST)/root.client/usr/vice/etc/dkload/$(LIBAFS)
122 INST_LIBAFSIAUTH = ${DESTDIR}${afskerneldir}/$(LIBAFSIAUTH)
123 INST_LIBAFS = ${DESTDIR}${afskerneldir}/$(LIBAFS)
125 $(DEST_LIBAFS): $(LIBAFS)
128 $(INSTALL) -f $?.map $@.map
130 $(DEST_LIBAFSIAUTH): $(LIBAFSIAUTH)
133 $(INSTALL) -f $?.map $@.map
135 $(INST_LIBAFS): $(LIBAFS)
138 $(INSTALL) -f $?.map $@.map
140 $(INST_LIBAFSIAUTH): $(LIBAFSIAUTH)
143 $(INSTALL) -f $?.map $@.map
146 $(LIBAFSIAUTH): $(AFSAOBJS) $(AFSIAUTHOBJS)
147 ${LD} ${LDSTUFF} -bloadmap:afs.ext.iauth.loadmap \
148 -bmap:afs.ext.iauth.map -o afs.ext.iauth \
149 ${AFSAOBJS} ${AFSIAUTHOBJS} ${LIBS} ${LDFLAGS}
151 $(LIBAFS): $(AFSAOBJS) $(AFSNOIAUTHOBJS)
152 ${LD} ${LDSTUFF} -bloadmap:afs.ext.loadmap \
153 -bmap:afs.ext.map -o afs.ext \
154 ${AFSAOBJS} $(AFSNOIAUTHOBJS) ${LIBS} ${LDFLAGS}
156 libafs: $(LIBAFS) $(LIBAFSIAUTH)
157 install_libafs: $(INST_LIBAFS) $(INST_LIBAFSIAUTH)
158 dest_libafs: $(DEST_LIBAFS) $(DEST_LIBAFSIAUTH)
161 # Object build rules:
165 xdr_int64.o: $(RX)/xdr_int64.c
168 xdr_array.o: $(RX)/xdr_array.c
171 osi_assem.o: ${AFS}/osi_assem.s
172 ${AS} -o osi_assem.o ${AFS}/osi_assem.s
173 osi_config.o: $(AFS)/osi_config.c
175 osi_groups.o: $(AFS)/osi_groups.c
177 osi_file.o: $(AFS)/osi_file.c
179 osi_inode.o: $(AFS)/osi_inode.c
181 osi_misc.o: $(AFS)/osi_misc.c
183 osi_sleep.o: $(AFS)/osi_sleep.c
185 osi_timeout.o: $(AFS)/osi_timeout.c
187 osi_vfsops.o: $(AFS)/osi_vfsops.c
189 osi_vm.o: $(AFS)/osi_vm.c
191 osi_vnodeops.o: $(AFS)/osi_vnodeops.c
195 # Build rules for iauth objects.
196 afs_call_iauth.o: $(AFS)/afs_call.c
197 $(CRULE1) -DAFS_NONFSTRANS -DAFS_AIX_IAUTH_ENV -o afs_call_iauth.o
198 afs_nfsclnt_iauth.o: $(AFS)/afs_nfsclnt.c
199 $(CRULE1) -DAFS_NONFSTRANS -DAFS_AIX_IAUTH_ENV -o afs_nfsclnt_iauth.o
200 afs_pioctl_iauth.o: $(AFS)/afs_pioctl.c
201 $(CRULE1) -DAFS_NONFSTRANS -DAFS_AIX_IAUTH_ENV -o afs_pioctl_iauth.o
202 osi_vfsops_iauth.o: $(AFS)/osi_vfsops.c
203 $(CRULE1) -DAFS_NONFSTRANS -DAFS_AIX_IAUTH_ENV -o osi_vfsops_iauth.o
204 osi_vnodeops_iauth.o: $(AFS)/osi_vnodeops.c
205 $(CRULE1) -DAFS_NONFSTRANS -DAFS_AIX_IAUTH_ENV -o osi_vnodeops_iauth.o