8939371898a62d5592947e97715900816286252e
[openafs.git] / src / export / Makefile.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   EXPORTS = -bexport:export.exp
12   IMPORTS = /lib/kernex.exp /lib/syscalls.exp extras.exp
13      KOBJ = export.o symtab.o
14
15 include ../config/Makefile.version
16
17 all: ${TOP_LIBDIR}/export.exp ${TOP_LIBDIR}/export64.exp ${TOP_LIBDIR}/extras.exp cfgexport cfgafs
18 all: ${TOP_LIBDIR}/export.exp ${TOP_LIBDIR}/extras.exp cfgexport cfgafs
19         ${INSTALL} ${srcdir}/export.h ${KERNELDIR}
20         ${INSTALL} ${srcdir}/export.exp ${KERNELDIR}
21         ${INSTALL} ${srcdir}/export.h ${UKERNELDIR}
22         ${INSTALL} ${srcdir}/export.exp ${UKERNELDIR}
23
24 noversion system: install
25
26 install: ${DESTDIR}${libdir}/afs/export.exp ${DESTDIR}${libdir}/afs/extras.exp  
27
28 export.ext: export4.exp export5.exp
29         case ${SYS_NAME} in \
30         rs_aix4* ) \
31                 cp -p export4.exp export.exp ; \
32                 cp -p export4-64.exp export64.exp ;; \
33         rs_aix5* ) \
34                 cp -p export5.exp export.exp ; \
35                 cp -p export5-64.exp export64.exp ;; \
36         esac
37
38 export.ext: ${KOBJ}
39         ${LD} -o export.ext -eexport ${IMPORTS} ${KOBJ} ${EXPORTS} -lcsys
40
41 export64.ext: export64.o symtab64.o
42         ${LD} -b64 -o export64.ext -eexport ${IMPORTS} export64.o symtab64.o \
43                 -bexport:export64.exp -lcsys
44
45 export.ext.nonfs: export.nonfs.o symtab.o
46         ${LD} -o export.ext.nonfs -eexport ${IMPORTS} export.nonfs.o \
47                 symtab.o ${EXPORTS} -lcsys
48
49 export64.ext.nonfs: export64.nonfs.o symtab64.o
50         ${LD} -b64 -o export64.ext.nonfs -eexport ${IMPORTS} export64.nonfs.o \
51                 symtab64.o -bexport:export64.exp -lcsys
52
53 symtab.o symtab64.o: symtab.c
54         case ${SYS_NAME} in \
55         rs_aix4* ) \
56                 ${CC} ${CFLAGS} -c symtab.c ;; \
57         rs_aix5* ) \
58                 ${CC} ${CFLAGS} -q64 -D__XCOFF64__ -DAFS_64BIT_KERNEL -DAFS_AIX51_ENV -c symtab.c ; \
59                 mv symtab.o symtab64.o ; \
60                 ${CC} ${CFLAGS} -DAFS_AIX51_ENV -c symtab.c ;; \
61         esac
62
63 export.o export64.o: export.c
64         case ${SYS_NAME} in \
65         rs_aix4* ) \
66                 ${CC} ${CFLAGS} -c export.c ;; \
67         rs_aix5* ) \
68                 ${CC} ${CFLAGS} -q64 -D__XCOFF64__ -DAFS_64BIT_KERNEL -DAFS_AIX51_ENV -c export.c ; \
69                 mv export.o export64.o ; \
70                 ${CC} ${CFLAGS} -DAFS_AIX51_ENV -c export.c ;; \
71         esac
72                
73 export.nonfs.o export64.nonfs.o: export.c
74         case ${SYS_NAME} in \
75         rs_aix4* ) \
76                 ${CC} ${INCS} -DAFS_NONFSTRANS -c export.c ;; \
77         rs_aix5* ) \
78                 ${CC} -q64 ${INCS} -D__XCOFF64__ -DAFS_64BIT_KERNEL -DAFS_NONFSTRANS -DAFS_AIX51_ENV -c export.c ; \
79                 mv export.o export64.nonfs.o ; \
80                 ${CC} ${INCS} -DAFS_NONFSTRANS -DAFS_AIX51_ENV -c export.c ;; \
81         esac
82         -mv export.o export.nonfs.o
83
84 cfgexport: cfgexport.o
85         ${CC} -g ${INCS} -o cfgexport cfgexport.o
86
87 cfgexport64: cfgexport64.o
88         ${CC} -g ${INCS} -q64 -o cfgexport64 cfgexport64.o
89
90 cfgafs: cfgafs.o
91         ${CC} ${INCS} -o cfgafs cfgafs.o
92
93 cfgafs64: cfgafs64.o
94         ${CC} -g ${INCS} -q64 -o cfgafs64 cfgafs64.o
95
96 cfgexport64.o: cfgexport.c AFS_component_version_number.c
97         ${CC} -g -q64 ${CFLAGS} -D__XCOFF64__ -c cfgexport.c -o cfgexport64.o
98
99 cfgexport.o: cfgexport.c AFS_component_version_number.c
100 cfgafs.o: cfgafs.c AFS_component_version_number.c
101 cfgafs64.o: cfgafs.c AFS_component_version_number.c
102         ${CC} -q64 ${CFLAGS} -c cfgafs.c -o cfgafs64.o
103
104 clean:
105         $(RM) -f *.o *.Zlst *.map *.out cfgexport cfgafs *.ext AFS_component_version_number.c
106 ${DEST}/root.client/usr/vice/etc/dkload/export.ext: export.ext
107         ${INSTALL} $? $@
108
109 ${DEST}/root.client/usr/vice/etc/dkload/export64.ext: export64.ext
110         ${INSTALL} $? $@
111
112 ${DEST}/root.client/usr/vice/etc/dkload/export.ext.nonfs: export.ext.nonfs
113         ${INSTALL} $? $@
114
115 ${DEST}/root.client/usr/vice/etc/dkload/export64.ext.nonfs: export64.ext.nonfs
116         ${INSTALL} $? $@
117
118 ${DEST}/lib/afs/export.exp: export.exp
119         ${INSTALL} $? $@
120
121 ${DEST}/lib/afs/export64.exp: export64.exp
122         ${INSTALL} $? $@
123
124 ${DESTDIR}${libdir}/afs/export.exp: export.exp
125         ${INSTALL} $? $@ 
126
127 ${DESTDIR}${libdir}/afs/export64.exp: export64.exp
128         ${INSTALL} $? $@ 
129
130 ${TOP_LIBDIR}/export.exp: export.exp
131         ${INSTALL} $? $@
132
133 ${TOP_LIBDIR}/export64.exp: export64.exp
134         ${INSTALL} $? $@
135
136 ${DEST}/lib/afs/extras.exp: extras.exp
137         ${INSTALL} $? $@
138
139 ${DESTDIR}${libdir}/afs/extras.exp: extras.exp
140         ${INSTALL} $? $@
141
142
143 ${TOP_LIBDIR}/extras.exp: extras.exp
144         ${INSTALL} $? $@
145
146
147 ${DEST}/root.client/usr/vice/etc/dkload/cfgexport: cfgexport
148         ${INSTALL} $? $@
149
150 ${DEST}/root.client/usr/vice/etc/dkload/cfgexport64: cfgexport64
151         ${INSTALL} $? $@
152
153 ${DEST}/root.client/usr/vice/etc/dkload/cfgafs: cfgafs
154         ${INSTALL} $? $@
155
156 ${DEST}/root.client/usr/vice/etc/dkload/cfgafs64: cfgafs64
157         ${INSTALL} $? $@
158
159 dest:    ${DEST}/root.client/usr/vice/etc/dkload/export.ext \
160         ${DEST}/root.client/usr/vice/etc/dkload/export64.ext \
161         ${DEST}/root.client/usr/vice/etc/dkload/export.ext.nonfs \
162         ${DEST}/root.client/usr/vice/etc/dkload/export64.ext.nonfs \
163         ${DEST}/lib/afs/export.exp \
164         ${DEST}/lib/afs/export64.exp \
165         ${DEST}/lib/afs/extras.exp \
166         ${DEST}/root.client/usr/vice/etc/dkload/cfgexport \
167         ${DEST}/root.client/usr/vice/etc/dkload/cfgexport64 \
168         ${DEST}/root.client/usr/vice/etc/dkload/cfgafs \
169         ${DEST}/root.client/usr/vice/etc/dkload/cfgafs64