export-needs-include-paths-20010705
[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      INCS = -I${TOP_SRCDIR}/config -I${SRCDIR}include
20    CFLAGS = ${OPTMZ} ${DEFS} ${INCS}
21   EXPORTS = -bexport:export.exp
22   IMPORTS = /lib/kernex.exp /lib/syscalls.exp extras.exp
23      KOBJ = export.o symtab.o
24
25 include ../config/Makefile.version
26
27 all: export.ext export.ext.nonfs cfgexport cfgafs
28
29 noversion system: install
30
31 install: all kinstall ukinstall
32         ${INSTALL} export.ext ${DESTDIR}root.client/usr/vice/etc/dkload
33         ${INSTALL} export.ext.nonfs ${DESTDIR}root.client/usr/vice/etc/dkload
34         ${INSTALL} export.exp ${DESTDIR}lib/afs/export.exp
35         ${INSTALL} extras.exp ${DESTDIR}lib/afs/extras.exp
36         ${INSTALL} cfgexport  ${DESTDIR}root.client/usr/vice/etc/dkload/cfgexport
37         ${INSTALL} cfgafs     ${DESTDIR}root.client/usr/vice/etc/dkload/cfgafs
38
39 kinstall:
40         ${INSTALL} export.h ${DESTDIR}include
41         ${INSTALL} export.h ../libafs
42         ${INSTALL} export.exp ${DESTDIR}lib
43         ${INSTALL} export.exp ../libafs
44
45 ukinstall webinstall:
46         ${INSTALL} export.h ${UKERNELDIR}
47         ${INSTALL} export.exp ${UKERNELDIR}
48
49 export.ext: ${KOBJ}
50         ${LD} -o export.ext -eexport ${IMPORTS} ${KOBJ} ${EXPORTS} -lcsys
51
52 export.ext.nonfs: export.nonfs.o symtab.o
53         ${LD} -o export.ext.nonfs -eexport ${IMPORTS} export.nonfs.o symtab.o ${EXPORTS} -lcsys
54
55 export.nonfs.o:
56         ${CC} -DAFS_NONFSTRANS -c export.c
57         -mv export.o export.nonfs.o
58
59 cfgexport: cfgexport.o
60         ${CC} -O -o cfgexport cfgexport.o
61
62 cfgafs: cfgafs.o
63         ${CC} -O -o cfgafs cfgafs.o
64
65 cfgexport.o: cfgexport.c AFS_component_version_number.c
66 cfgafs.o: cfgafs.c AFS_component_version_number.c
67
68 clean:
69         rm -f *.o *.Zlst *.map *.out cfgexport cfgafs *.ext AFS_component_version_number.c