initial-darwin-support-20010327
[openafs.git] / src / export / Makefile
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 # $Locker$
9 #
10 # Makefile for EXPORT kernel extension, and friends
11 #
12
13 COMPONENT=export
14 include ../config/Makefile.${SYS_NAME}
15
16 KERNELDIR = ../libafs/
17 UKERNELDIR = ../libuafs/
18      DEFS =
19    CFLAGS = ${OPTMZ} ${DEFS} ${INCS}
20   EXPORTS = -bexport:export.exp
21   IMPORTS = /lib/kernex.exp /lib/syscalls.exp extras.exp
22      KOBJ = export.o symtab.o
23
24 include ../config/Makefile.version
25
26 all: export.ext export.ext.nonfs cfgexport cfgafs
27
28 noversion system: install
29
30 install: all kinstall ukinstall
31         ${INSTALL} export.ext ${DESTDIR}root.client/usr/vice/etc/dkload
32         ${INSTALL} export.ext.nonfs ${DESTDIR}root.client/usr/vice/etc/dkload
33         ${INSTALL} export.exp ${DESTDIR}lib/afs/export.exp
34         ${INSTALL} extras.exp ${DESTDIR}lib/afs/extras.exp
35         ${INSTALL} cfgexport  ${DESTDIR}root.client/usr/vice/etc/dkload/cfgexport
36         ${INSTALL} cfgafs     ${DESTDIR}root.client/usr/vice/etc/dkload/cfgafs
37
38 kinstall:
39         ${INSTALL} export.h ${DESTDIR}include
40         ${INSTALL} export.h ../libafs
41         ${INSTALL} export.exp ${DESTDIR}lib
42         ${INSTALL} export.exp ../libafs
43
44 ukinstall webinstall:
45         ${INSTALL} export.h ${UKERNELDIR}
46         ${INSTALL} export.exp ${UKERNELDIR}
47
48 export.ext: ${KOBJ}
49         ${LD} -o export.ext -eexport ${IMPORTS} ${KOBJ} ${EXPORTS} -lcsys
50
51 export.ext.nonfs: export.nonfs.o symtab.o
52         ${LD} -o export.ext.nonfs -eexport ${IMPORTS} export.nonfs.o symtab.o ${EXPORTS} -lcsys
53
54 export.nonfs.o:
55         ${CC} -DAFS_NONFSTRANS -c export.c
56         -mv export.o export.nonfs.o
57
58 cfgexport: cfgexport.o
59         ${CC} -O -o cfgexport cfgexport.o
60
61 cfgafs: cfgafs.o
62         ${CC} -O -o cfgafs cfgafs.o
63
64 cfgexport.o: cfgexport.c AFS_component_version_number.c
65 cfgafs.o: cfgafs.c AFS_component_version_number.c
66
67 clean:
68         rm -f *.o *.Zlst *.map *.out cfgexport cfgafs *.ext AFS_component_version_number.c