409e0c7b22db470cc869110c2c082f78dc783a0a
[openafs.git] / src / tvlserver / 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 include @TOP_OBJDIR@/src/config/Makefile.pthread
11
12 HELPER_SPLINT=@HELPER_SPLINT@
13 ENABLE_PTHREADED_UBIK=@ENABLE_PTHREADED_UBIK@
14
15 VLSERVER=$(srcdir)/../vlserver
16
17 INCLS=${TOP_INCDIR}/ubik.h \
18              ${TOP_INCDIR}/lwp.h \
19              ${TOP_INCDIR}/lock.h  \
20              ${TOP_INCDIR}/rx/rx.h \
21              ${TOP_INCDIR}/rx/xdr.h \
22              ${TOP_INCDIR}/afs/keys.h \
23              ${TOP_INCDIR}/afs/cellconfig.h \
24         vlserver.h vldbint.h
25
26 LIBS_common = \
27         ${TOP_LIBDIR}/libubik_pthread.a \
28         ${TOP_LIBDIR}/libafsauthent.a \
29         $(top_builddir)/src/sys/liboafs_sys.la \
30         $(top_builddir)/src/rx/liboafs_rx.la \
31         $(top_builddir)/src/rxstat/liboafs_rxstat.la \
32         $(top_builddir)/src/rxkad/liboafs_rxkad.la \
33         $(top_builddir)/src/lwp/liboafs_lwpcompat.la \
34         $(top_builddir)/src/cmd/liboafs_cmd.la \
35         $(top_builddir)/src/util/liboafs_util.la \
36         $(top_builddir)/src/opr/liboafs_opr.la
37
38 LIBS_server = \
39         $(top_builddir)/src/audit/liboafs_audit.la \
40         $(LIBS_common)
41
42 LIBS_client = \
43         $(LIBS_common)
44
45 OBJS=vldbint.xdr.o vldbint.cs.o vl_errors.o
46
47 all: \
48         vlserver vlclient vlserver cnvldb vldb_check \
49         Kvldbint.cs.c Kvldbint.xdr.c vldbint.h 
50
51 depinstall:
52
53 #
54 # Other stuff
55 #
56
57
58 vldb_check: vldb_check.o AFS_component_version_number.o $(LIBS_client)
59         $(LT_LDRULE_static) vldb_check.o AFS_component_version_number.o \
60                 $(LIBS_client) $(LIB_hcrypto) $(LIB_roken) ${MT_LIBS} ${XLIBS}
61
62 vldb_check.o: ${VLSERVER}/vldb_check.c 
63         $(AFS_CCRULE) $(VLSERVER)/vldb_check.c
64
65 cnvldb: cnvldb.o $(LIBS_client)
66         $(LT_LDRULE_static) cnvldb.o \
67                 $(LIBS_client) $(LIB_hcrypto) $(LIB_roken) ${MT_LIBS} ${XLIBS}
68
69 cnvldb.o: ${VLSERVER}/cnvldb.c
70         $(AFS_CCRULE) $(VLSERVER)/cnvldb.c
71
72 sascnvldb: sascnvldb.o $(LIBS_client)
73         $(LT_LDRULE_static) sascnvldb.o \
74                 $(LIBS_client) $(LIB_hcrypto) $(LIB_roken) ${MT_LIBS} ${XLIBS}
75
76 sascnvldb.o: ${VLSERVER}/sascnvldb.c
77         $(AFS_CCRULE) $(VLSERVER)/sascnvldb.c
78
79 vlserver: vlserver.o vlutils.o vlprocs.o vldbint.ss.o vldbint.xdr.o $(LIBS_server)
80         $(LT_LDRULE_static) vlserver.o vlutils.o vlprocs.o vldbint.ss.o \
81                 vldbint.xdr.o \
82                 $(LIBS_server) $(LIB_hcrypto) $(LIB_roken) ${MT_LIBS} ${XLIBS}
83
84 vlserver.o: ${VLSERVER}/vlserver.c ${INCLS} AFS_component_version_number.o
85         $(AFS_CCRULE) $(VLSERVER)/vlserver.c
86
87 vlutils.o: ${VLSERVER}/vlutils.c ${INCLS}
88         $(AFS_CCRULE) $(VLSERVER)/vlutils.c
89
90 vlprocs.o: ${VLSERVER}/vlprocs.c ${INCLS}
91         $(AFS_CCRULE) $(VLSERVER)/vlprocs.c
92
93 vldbint.ss.o: vldbint.ss.c 
94 vldbint.cs.o: vldbint.cs.c 
95 vldbint.xdr.o: vldbint.xdr.c 
96
97 vldbint.cs.c: ${VLSERVER}/vldbint.xg
98         ${RXGEN} -A -u -x -C -o $@ ${srcdir}/${VLSERVER}/vldbint.xg
99
100 vldbint.ss.c: ${VLSERVER}/vldbint.xg
101         ${RXGEN} -A -x -S -o $@ ${srcdir}/${VLSERVER}/vldbint.xg
102
103 vldbint.xdr.c: ${VLSERVER}/vldbint.xg
104         ${RXGEN} -A -x -c -o $@ ${srcdir}/${VLSERVER}/vldbint.xg
105
106 vldbint.h: ${VLSERVER}/vldbint.xg
107         ${RXGEN} -A -u -x -h -o $@ ${srcdir}/${VLSERVER}/vldbint.xg
108
109 vldbint.cs.c: vldbint.h
110 vldbint.ss.c: vldbint.h
111 vldbint.xdr.c: vldbint.h
112
113 Kvldbint.cs.c: ${VLSERVER}/vldbint.xg
114         ${RXGEN} -A -x -k -C -o $@ ${srcdir}/${VLSERVER}/vldbint.xg
115
116 Kvldbint.xdr.c: ${VLSERVER}/vldbint.xg
117         ${RXGEN} -A -x -k -c -o $@ ${srcdir}/${VLSERVER}/vldbint.xg
118
119 vlclient: vlclient.o $(OBJS) $(LIBS) ${INCLS}
120         $(LT_LDRULE_static) vlclient.o $(OBJS) \
121                 $(LIBS_server) $(LIB_hcrypto) $(LIB_roken) ${MT_LIBS} ${XLIBS}
122                 
123 vlclient.o: ${VLSERVER}/vlclient.c
124         $(AFS_CCRULE) $(VLSERVER)/vlclient.c
125
126 vl_errors.o: vl_errors.c
127
128 vlserver.h vl_errors.c: ${VLSERVER}/vl_errors.et ${VLSERVER}/vlserver.p.h
129         $(RM) -f vlserver.h vl_errors.c; ${COMPILE_ET} -p ${srcdir}/${VLSERVER} vl_errors -h vlserver
130
131 system: install
132
133 install: vlserver cnvldb vldb_check
134         if [ "x$(ENABLE_PTHREADED_UBIK)" = "xyes" ] ; then \
135                 $(LT_INSTALL_PROGRAM) vlserver \
136                         ${DESTDIR}${afssrvlibexecdir}/vlserver; \
137                 $(LT_INSTALL_PROGRAM) cnvldb \
138                         ${DESTDIR}${afssrvsbindir}/vldb_convert; \
139                 $(LT_INSTALL_PROGRAM) vldb_check \
140                         ${DESTDIR}${afssrvsbindir}/vldb_check; \
141         fi
142
143 dest: vlserver cnvldb vldb_check
144         if [ "x$(ENABLE_PTHREADED_UBIK)" = "xyes" ] ; then \
145                 $(LT_INSTALL_PROGRAM) vlserver \
146                         ${DEST}/root.server/usr/afs/bin/vlserver; \
147                 $(LT_INSTALL_PROGRAM) cnvldb \
148                         ${DEST}/etc/vldb_convert; \
149                 $(LT_INSTALL_PROGRAM) vldb_check \
150                         ${DEST}/etc/vldb_check; \
151         fi
152
153 #
154 # Misc targets
155 #
156 include ../config/Makefile.version
157
158 clean:
159         $(LT_CLEAN)
160         $(RM) -f *.o *.a *.otl *.xdr.c *.cs.c *.ss.c core \
161                 vlserver vlclient cnvldb vldbint.h vlserver.h vldb_check \
162                 vl_errors.c AFS_component_version_number.c