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