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