death-to-pinstall-20060801
[openafs.git] / src / vlserver / 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 INCLS=${TOP_INCDIR}/ubik.h \
12              ${TOP_INCDIR}/lwp.h \
13              ${TOP_INCDIR}/lock.h  \
14              ${TOP_INCDIR}/rx/rx.h \
15              ${TOP_INCDIR}/rx/xdr.h \
16              ${TOP_INCDIR}/afs/keys.h \
17              ${TOP_INCDIR}/afs/cellconfig.h \
18         vlserver.h vlclient.h vldbint.h
19
20 LIBS=\
21         ${TOP_LIBDIR}/libubik.a \
22         ${TOP_LIBDIR}/libauth.a \
23         ${TOP_LIBDIR}/librxkad.a \
24         ${TOP_LIBDIR}/librxstat.a \
25         ${TOP_LIBDIR}/librx.a \
26         ${TOP_LIBDIR}/liblwp.a \
27         ${TOP_LIBDIR}/libdes.a \
28         ${TOP_LIBDIR}/libcom_err.a \
29         ${TOP_LIBDIR}/libcmd.a \
30         ${TOP_LIBDIR}/libsys.a \
31         ${TOP_LIBDIR}/libafsutil.a
32
33 OBJS=vldbint.xdr.o vldbint.cs.o vl_errors.o
34
35
36 all: \
37         vlserver vlclient cnvldb vlserver cnvldb vldb_check \
38         Kvldbint.cs.c Kvldbint.xdr.c vldbint.h \
39         ${TOP_LIBDIR}/libvldb.a depinstall
40
41 depinstall: \
42         Kvldbint.cs.c Kvldbint.xdr.c vldbint.h \
43         ${TOP_INCDIR}/afs/vl_opcodes.h \
44         ${TOP_INCDIR}/afs/vlserver.h \
45         ${TOP_INCDIR}/afs/vldbint.h \
46         ${TOP_INCDIR}/afs/cnvldb.h 
47
48 ${TOP_LIBDIR}/libvldb.a: libvldb.a
49         ${INSTALL_DATA} $? $@
50
51 ${TOP_INCDIR}/afs/vl_opcodes.h: vl_opcodes.h
52         ${INSTALL_DATA} $? $@
53
54 ${TOP_INCDIR}/afs/vlserver.h: vlserver.h
55         ${INSTALL_DATA} $? $@
56
57 ${TOP_INCDIR}/afs/vldbint.h: vldbint.h
58         ${INSTALL_DATA} $? $@
59
60 ${TOP_INCDIR}/afs/cnvldb.h: cnvldb.h
61         ${INSTALL_DATA} $? $@
62
63 vldb_check: vldb_check.o ${LIBS}
64         $(CC) ${CFLAGS} -o vldb_check vldb_check.o ${LIBS} ${XLIBS} 
65
66 vldb_check.o: vldb_check.c AFS_component_version_number.o
67
68 cnvldb: cnvldb.o ${LIBS}
69         $(CC) ${CFLAGS} -o cnvldb cnvldb.o ${LIBS} ${XLIBS}
70
71 cnvldb.o: cnvldb.c cnvldb.h AFS_component_version_number.o
72
73 sascnvldb: sascnvldb.o ${LIBS}
74         $(CC) ${CFLAGS} -o sascnvldb sascnvldb.o ${LIBS} ${XLIBS}
75
76 sascnvldb.o: sascnvldb.c cnvldb.h AFS_component_version_number.o
77
78 vlserver: vlserver.o vlutils.o vlprocs.o vldbint.ss.o vldbint.xdr.o $(LIBS)
79         $(CC) ${CFLAGS} -o vlserver vlserver.o vlutils.o vlprocs.o vldbint.ss.o \
80                 vldbint.xdr.o $(LIBS) ${XLIBS} ${TOP_LIBDIR}/libaudit.a
81
82 vlserver.o: vlserver.c ${INCLS} AFS_component_version_number.o
83 vlutils.o: vlutils.c ${INCLS}
84 vlprocs.o: vlprocs.c ${INCLS}
85 vldbint.ss.o: vldbint.ss.c vldbint.xdr.c
86 vldbint.cs.o: vldbint.cs.c vldbint.xdr.c
87 vldbint.xdr.o: vldbint.xdr.c vldbint.h
88
89 vldbint.cs.c: vldbint.xg
90         ${RXGEN} -u -x -C -o $@ ${srcdir}/vldbint.xg
91
92 vldbint.ss.c: vldbint.xg
93         ${RXGEN} -x -S -o $@ ${srcdir}/vldbint.xg
94
95 vldbint.xdr.c: vldbint.xg
96         ${RXGEN} -x -c -o $@ ${srcdir}/vldbint.xg
97
98 vldbint.h: vldbint.xg
99         ${RXGEN} -u -x -h -o $@ ${srcdir}/vldbint.xg
100
101 vldbint.cs.c: vldbint.h
102 vldbint.ss.c: vldbint.h
103 vldbint.xdr.c: vldbint.h
104
105 Kvldbint.cs.c: vldbint.xg
106         ${RXGEN} -x -k -C -o $@ ${srcdir}/vldbint.xg
107
108 Kvldbint.xdr.c: vldbint.xg
109         ${RXGEN} -x -k -c -o $@ ${srcdir}/vldbint.xg
110
111 libvldb.a: $(OBJS) AFS_component_version_number.o
112         $(RM) -f $@
113         $(AR) crv $@ $(OBJS) AFS_component_version_number.o
114         $(RANLIB) $@
115
116 vlclient: vlclient.o libvldb.a $(LIBS)
117         $(CC) ${CFLAGS} -o vlclient vlclient.o libvldb.a $(LIBS) ${XLIBS} ${TOP_LIBDIR}/libcmd.a
118
119 vlclient.o: vlclient.c ${INCLS} AFS_component_version_number.o
120
121 vl_errors.o: vl_errors.c
122 vlserver.h vl_errors.c: vl_errors.et vlserver.p.h
123         $(RM) -f vlserver.h vl_errors.c; ${COMPILE_ET} -p ${srcdir} vl_errors -h vlserver
124
125 system: install
126
127 install: vlserver cnvldb vldb_check libvldb.a vl_opcodes.h vlserver.h \
128                 vldbint.h cnvldb.h
129         ${INSTALL} -d ${DESTDIR}${afssrvlibexecdir}
130         ${INSTALL} -d ${DESTDIR}${afssrvsbindir}
131         ${INSTALL} -d ${DESTDIR}${libdir}/afs
132         ${INSTALL} -d ${DESTDIR}${includedir}/afs
133         ${INSTALL_PROGRAM} vlserver ${DESTDIR}${afssrvlibexecdir}/vlserver
134         ${INSTALL_PROGRAM} cnvldb ${DESTDIR}${afssrvsbindir}/vldb_convert
135         ${INSTALL_PROGRAM} vldb_check ${DESTDIR}${afssrvsbindir}/vldb_check
136         ${INSTALL_DATA} libvldb.a ${DESTDIR}${libdir}/afs/libvldb.a
137         ${INSTALL_DATA} vl_opcodes.h ${DESTDIR}${includedir}/afs/vl_opcodes.h
138         ${INSTALL_DATA} vlserver.h ${DESTDIR}${includedir}/afs/vlserver.h
139         ${INSTALL_DATA} vldbint.h ${DESTDIR}${includedir}/afs/vldbint.h
140         ${INSTALL_DATA} cnvldb.h ${DESTDIR}${includedir}/afs/cnvldb.h
141
142 dest: vlserver cnvldb vldb_check libvldb.a vl_opcodes.h vlserver.h \
143                 vldbint.h cnvldb.h
144         ${INSTALL} -d ${DEST}/root.server/usr/afs/bin
145         ${INSTALL} -d ${DEST}/etc
146         ${INSTALL} -d ${DEST}/lib/afs
147         ${INSTALL} -d ${DEST}/include/afs
148         ${INSTALL_PROGRAM} vlserver ${DEST}/root.server/usr/afs/bin/vlserver
149         ${INSTALL_PROGRAM} cnvldb ${DEST}/etc/vldb_convert
150         ${INSTALL_PROGRAM} vldb_check ${DEST}/etc/vldb_check
151         ${INSTALL_DATA} libvldb.a ${DEST}/lib/afs/libvldb.a
152         ${INSTALL_DATA} vl_opcodes.h ${DEST}/include/afs/vl_opcodes.h
153         ${INSTALL_DATA} vlserver.h ${DEST}/include/afs/vlserver.h
154         ${INSTALL_DATA} vldbint.h ${DEST}/include/afs/vldbint.h
155         ${INSTALL_DATA} cnvldb.h ${DEST}/include/afs/cnvldb.h
156
157 #
158 # Misc targets
159 #
160 include ../config/Makefile.version
161
162 clean:
163         $(RM) -f *.o *.a *.otl *.xdr.c *.cs.c *.ss.c core \
164                 vlserver vlclient cnvldb vldbint.h vlserver.h vldb_check \
165                 vl_errors.c AFS_component_version_number.c