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