pull-prototypes-to-head-20020821
[openafs.git] / src / libafs / MakefileProto.AIX.in
1 # Copyright 2000, International Business Machines Corporation and others.
2 # All Rights Reserved.
3
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
7
8 srcdir=@srcdir@
9 include @TOP_OBJDIR@/src/config/Makefile.config
10
11
12 # OS specific object files:
13 AFS_OS_OBJS = \
14         osi_assem.o \
15         osi_config.o \
16         osi_groups.o \
17         osi_file.o \
18         osi_inode.o \
19         osi_misc.o \
20         osi_sleep.o \
21         osi_timeout.o \
22         osi_vm.o
23
24 AFSNOIAUTHOBJS = \
25         afs_call.o \
26         afs_pioctl.o \
27         osi_vfsops.o \
28         osi_vnodeops.o
29
30
31 # Object files for iauth NFS->AFS authenticator.
32 AFSIAUTHOBJS = \
33         afs_call_iauth.o \
34         afs_nfsclnt_iauth.o \
35         afs_pioctl_iauth.o \
36         osi_vfsops_iauth.o \
37         osi_vnodeops_iauth.o
38
39 # System specific build commands
40 STRIP = /bin/strip
41 DBUG  = -g
42 #OPT   = -O
43 OPT2   = -O
44
45 IMPORTS = -bI:/lib/kernex.exp -bI:/lib/syscalls.exp -bI:/lib/sockets.exp \
46         -bI:/lib/netinet.exp \
47         -bI:${TOP_LIBDIR}/extras.exp -bI:${TOP_LIBDIR}/export.exp
48 KDEFS = -U_IBMR2 -D_POWER -D_AIX -DNLS -D_NLS -DMSG -D__STR31__ -Daiws \
49         -D_POWER_RS -D_POWER_PC -D_POWER_RS1 -D_POWER_RS2 -D_POWER_RSC \
50          -D_POWER_601 -D_POWER_603 -D_POWER_604 -D_THREADS -M  -D_KERNEL \
51         -D_POWER_MP -UKOFF -DAFSDEBUG -DVICE -DNFS -DUFS -DINET -DQUOTA \
52          -DGETMOUNT -H8 -DAFS -DAFS_COMMON -D_VOPS -D_SUN -DKERNEL
53 LDSTUFF= -b"binder:/usr/lib/bind glink:/usr/lib/glink.o" -bnoentry -b h:4 \
54         -D0 -T512
55 LDFLAGS = -m -eafs_config -bexport:${TOP_LIBDIR}/afs.exp ${IMPORTS} \
56          -lsys -lcsys 
57
58 CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(KDEFS) $(KOPTS) ${DBUG}
59
60 # Name of directory to hold object files and libraries.
61 KOBJ = MODLOAD
62
63 # This tells Makefile.common to use it's single directory build target.
64 COMPDIRS = single_compdir
65 INSTDIRS = single_instdir
66 DESTDIRS = single_destdir
67
68 include Makefile.common
69
70 setup:
71         -mkdir $(KOBJ)
72         -$(RM) $(KOBJ)/Makefile $(KOBJ)/Makefile.common $(KOBJ)/config
73         ln -fs ../Makefile $(KOBJ)/Makefile
74         ln -fs ../Makefile.common $(KOBJ)/Makefile.common
75         ln -fs ../config $(KOBJ)/config
76         -$(RM) -f  h net netinet rpc ufs nfs  machine sys
77         ln -fs /usr/include/sys h
78         ln -fs /usr/include/net net
79         ln -fs /usr/include/netinet netinet
80         ln -fs /usr/include/rpc rpc
81         ln -fs /usr/include/sys sys
82         ln -fs /usr/include/nfs nfs
83         ln -fs /usr/include/jfs ufs
84
85
86 # Standard AFS->NFS translator support is removed in AFS 3.5 in favor of
87 # the iauth authentication mechanism. The model was changed by IBM in the
88 # middle of an OS release. So iauth is only supported on AIX 4.1.5 and 
89 # later 4.1.x (if they are ever made) and AIX 4.2.1 (and later AIX 4.2.x if
90 # they are ever made. AIX 4.3 also uses the iauth translator.
91
92 LIBAFSIAUTH = afs.ext.iauth
93 LIBAFS = afs.ext
94
95 DEST_LIBAFSIAUTH = $(DEST)/root.client/usr/vice/etc/dkload/$(LIBAFSIAUTH)
96 DEST_LIBAFS = $(DEST)/root.client/usr/vice/etc/dkload/$(LIBAFS)
97
98 INST_LIBAFSIAUTH = ${DESTDIR}${afskerneldir}/$(LIBAFSIAUTH)
99 INST_LIBAFS = ${DESTDIR}${afskerneldir}/$(LIBAFS)
100
101 $(DEST_LIBAFS): $(LIBAFS)
102         $(INSTALL) -f $? $@
103         -${STRIP} $@
104         $(INSTALL) -f $?.map $@.map
105         
106 $(DEST_LIBAFSIAUTH): $(LIBAFSIAUTH)
107         $(INSTALL) -f $? $@
108         -${STRIP} $@
109         $(INSTALL) -f $?.map $@.map
110         
111 $(INST_LIBAFS): $(LIBAFS)
112         $(INSTALL) -f $? $@
113         -${STRIP} $@
114         $(INSTALL) -f $?.map $@.map
115         
116 $(INST_LIBAFSIAUTH): $(LIBAFSIAUTH)
117         $(INSTALL) -f $? $@
118         -${STRIP} $@
119         $(INSTALL) -f $?.map $@.map
120         
121
122 $(LIBAFSIAUTH): $(AFSAOBJS) $(AFSIAUTHOBJS)
123         ${LD} ${LDSTUFF} -bloadmap:afs.ext.iauth.loadmap \
124          -bmap:afs.ext.iauth.map -o afs.ext.iauth \
125         ${AFSAOBJS} ${AFSIAUTHOBJS} ${LIBS} ${LDFLAGS}
126
127 $(LIBAFS): $(AFSAOBJS) $(AFSNOIAUTHOBJS)
128         ${LD} ${LDSTUFF} -bloadmap:afs.ext.loadmap \
129          -bmap:afs.ext.map -o afs.ext \
130         ${AFSAOBJS} $(AFSNOIAUTHOBJS) ${LIBS} ${LDFLAGS}
131
132 libafs: $(LIBAFS) $(LIBAFSIAUTH)
133 install_libafs: $(INST_LIBAFS) $(INST_LIBAFSIAUTH)
134 dest_libafs: $(DEST_LIBAFS) $(DEST_LIBAFSIAUTH)
135
136
137 osi_assem.o:    ${AFS}/osi_assem.s
138         ${AS} -o osi_assem.o ${AFS}/osi_assem.s
139 osi_config.o: $(AFS)/osi_config.c
140         $(CRULE1)
141 osi_groups.o: $(AFS)/osi_groups.c
142         $(CRULE1)
143 osi_file.o: $(AFS)/osi_file.c
144         $(CRULE1)
145 osi_inode.o: $(AFS)/osi_inode.c
146         $(CRULE1)
147 osi_misc.o: $(AFS)/osi_misc.c
148         $(CRULE1)
149 osi_sleep.o: $(AFS)/osi_sleep.c
150         $(CRULE1)
151 osi_timeout.o: $(AFS)/osi_timeout.c
152         $(CRULE1)
153 osi_vfsops.o: $(AFS)/osi_vfsops.c
154         $(CRULE1)
155 osi_vm.o: $(AFS)/osi_vm.c
156         $(CRULE1)
157 osi_vnodeops.o: $(AFS)/osi_vnodeops.c
158         $(CRULE1)
159
160
161 # Build rules for iauth objects.
162 afs_call_iauth.o:       $(AFS)/afs_call.c
163         $(CRULE1) -DAFS_NONFSTRANS -DAFS_AIX_IAUTH_ENV -o afs_call_iauth.o
164 afs_nfsclnt_iauth.o:    $(AFS)/afs_nfsclnt.c
165         $(CRULE1) -DAFS_NONFSTRANS -DAFS_AIX_IAUTH_ENV -o afs_nfsclnt_iauth.o
166 afs_pioctl_iauth.o:     $(AFS)/afs_pioctl.c
167         $(CRULE1) -DAFS_NONFSTRANS -DAFS_AIX_IAUTH_ENV -o afs_pioctl_iauth.o
168 osi_vfsops_iauth.o: $(AFS)/osi_vfsops.c
169         $(CRULE1) -DAFS_NONFSTRANS  -DAFS_AIX_IAUTH_ENV -o osi_vfsops_iauth.o
170 osi_vnodeops_iauth.o:   $(AFS)/osi_vnodeops.c
171         $(CRULE1) -DAFS_NONFSTRANS -DAFS_AIX_IAUTH_ENV -o osi_vnodeops_iauth.o