util: Convert to using libtool
[openafs.git] / src / tubik / 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 UBIK=$(srcdir)/../ubik
16 RX=$(srcdir)/../rx
17
18 LIBOBJS=disk.o  remote.o beacon.o recovery.o ubik.o  vote.o lock.o phys.o \
19         ubik_int.cs.o ubik_int.ss.o ubik_int.xdr.o ubikcmd.o \
20         ubikclient.o uerrors.o uinit.o
21
22 INCLS=${TOP_INCDIR}/lwp.h ${TOP_INCDIR}/lock.h \
23         ${TOP_INCDIR}/rx/rx.h ${TOP_INCDIR}/rx/xdr.h \
24         ${TOP_INCDIR}/lock.h ubik.h ubik_int.h utst_int.h
25
26 RXOBJS = rx_pthread.o
27
28 LIBS=${RXOBJS} ${TOP_LIBDIR}/libafsauthent.a ${TOP_LIBDIR}/libafsrpc.a \
29      $(top_builddir)/src/comerr/liboafs_comerr.la \
30      ${top_builddir}/src/cmd/liboafs_cmd.la \
31      ${TOP_LIBDIR}/libsys.a \
32      $(top_builddir)/src/util/liboafs_util.la \
33      $(top_builddir)/src/opr/liboafs_opr.la \
34      ${XLIBS} ${MT_LIBS}
35
36 all: depinstall ${TOP_LIBDIR}/libubik_pthread.a udebug utst_server utst_client
37
38 depinstall: \
39         ubik_int.cs.c ubik_int.xdr.c \
40         ${TOP_INCDIR}/ubik.h \
41         ${TOP_INCDIR}/ubik_int.h
42
43 #
44 # get the pthreaded rx stuff compiled here
45 #
46
47 CFLAGS_rx_pthread.o = -DDPF_FSLOG
48 rx_pthread.o: ${RX}/rx_pthread.c
49         $(AFS_CCRULE) $(RX)/rx_pthread.c
50
51
52 #
53 # insert comments here
54 #
55
56 utst_server: utst_server.o utst_int.ss.o utst_int.xdr.o libubik_pthread.a ${RXOBJS}
57         $(LT_LDRULE_static) utst_server.o utst_int.ss.o utst_int.xdr.o \
58                 libubik_pthread.a $(LIBS) $(LIB_hcrypto) $(LIB_roken)
59
60 utst_client: utst_client.o utst_int.cs.o utst_int.xdr.o libubik_pthread.a ${RXOBJS}
61         $(LT_LDRULE_static) utst_client.o utst_int.cs.o utst_int.xdr.o \
62                 libubik_pthread.a $(LIBS) $(LIB_hcrypto) $(LIB_roken)
63
64 udebug: udebug.o libubik_pthread.a ${RXOBJS}
65         $(LT_LDRULE_static) udebug.o libubik_pthread.a \
66                 $(LIBS) $(LIB_hcrypto) $(LIB_roken)
67
68 ubik_int.cs.c: ${UBIK}/ubik_int.xg
69         ${RXGEN} -A -x -C -o $@ ${UBIK}/ubik_int.xg
70
71 ubik_int.ss.c: ${UBIK}/ubik_int.xg
72         ${RXGEN} -A -x -S -o $@ ${UBIK}/ubik_int.xg
73
74 ubik_int.xdr.c: ${UBIK}/ubik_int.xg
75         ${RXGEN} -A -x -c -o $@ ${UBIK}/ubik_int.xg
76
77 ubik_int.h: ${UBIK}/ubik_int.xg
78         ${RXGEN} -A -x -h -o $@ ${UBIK}/ubik_int.xg
79
80 ubik_int.cs.c: ubik_int.h
81 ubik_int.ss.c: ubik_int.h
82 ubik_int.xdr.c: ubik_int.h
83
84 Kubik_int.cs.c: ${UBIK}/ubik_int.xg Kubik_int.h
85         ${RXGEN} -A -x -k -C -o Kubik_int.cs.c ${UBIK}/ubik_int.xg
86  
87 Kubik_int.xdr.c: ${UBIK}/ubik_int.xg
88         ${RXGEN} -A -x -k -c -o Kubik_int.xdr.c ${UBIK}/ubik_int.xg
89  
90 Kubik_int.h: ${UBIK}/ubik_int.xg
91         ${RXGEN} -A -x -k -h -o Kubik_int.h ${UBIK}/ubik_int.xg
92
93 utst_int.ss.o: utst_int.ss.c
94 utst_int.cs.o: utst_int.cs.c
95 utst_int.xdr.o: utst_int.xdr.c
96
97 utst_int.cs.c: ${UBIK}/utst_int.xg
98         ${RXGEN} -A -C -u -o $@ ${UBIK}/utst_int.xg
99
100 utst_int.ss.c: ${UBIK}/utst_int.xg
101         ${RXGEN} -A -S -o $@ ${UBIK}/utst_int.xg
102
103 utst_int.xdr.c: ${UBIK}/utst_int.xg
104         ${RXGEN} -A -c -o $@ ${UBIK}/utst_int.xg
105
106 utst_int.h: ${UBIK}/utst_int.xg
107         ${RXGEN} -A -h -u -o $@ ${UBIK}/utst_int.xg
108
109 utst_int.cs.c: utst_int.h
110 utst_int.ss.c: utst_int.h
111 utst_int.xdr.c: utst_int.h
112
113 utst_server.o: ${UBIK}/utst_server.c
114         ${AFS_CCRULE} ${UBIK}/utst_server.c
115
116 utst_client.o: ${UBIK}/utst_client.c
117         ${AFS_CCRULE} ${UBIK}/utst_client.c
118
119 udebug.o: ${UBIK}/udebug.c
120         ${AFS_CCRULE} ${UBIK}/udebug.c
121
122 uerrors.c ubik.h: ${UBIK}/uerrors.et ${UBIK}/ubik.p.h
123         $(RM) -f ubik.h uerrors.c
124         ${COMPILE_ET} -p ${UBIK} uerrors -h ubik
125
126 libubik_pthread.a: ${INCLS} ${LIBOBJS} AFS_component_version_number.o
127         -$(RM) -f $@
128         $(AR) crc $@ ${LIBOBJS} AFS_component_version_number.o
129         $(RANLIB) $@
130
131 disk.o: ${UBIK}/disk.c
132         $(AFS_CCRULE) $(UBIK)/disk.c
133
134 uinit.o: ${UBIK}/uinit.c
135         $(AFS_CCRULE) $(UBIK)/uinit.c
136
137 remote.o: ${UBIK}/remote.c
138         $(AFS_CCRULE) $(UBIK)/remote.c
139
140 beacon.o: ${UBIK}/beacon.c
141         $(AFS_CCRULE) $(UBIK)/beacon.c
142
143 lock.o: ${UBIK}/lock.c
144         $(AFS_CCRULE) $(UBIK)/lock.c
145
146 recovery.o: ${UBIK}/recovery.c
147         $(AFS_CCRULE) $(UBIK)/recovery.c
148
149 ubik.o: ${UBIK}/ubik.c
150         $(AFS_CCRULE) $(UBIK)/ubik.c
151
152 phys.o: ${UBIK}/phys.c
153         $(AFS_CCRULE) $(UBIK)/phys.c
154
155 vote.o: ${UBIK}/vote.c
156         $(AFS_CCRULE) $(UBIK)/vote.c
157
158 ubikcmd.o: ${UBIK}/ubikcmd.c
159         $(AFS_CCRULE) $(UBIK)/ubikcmd.c
160
161 ubikclient.o: ${UBIK}/ubikclient.c
162         $(AFS_CCRULE) $(UBIK)/ubikclient.c
163 ubik_int.xdr.o: ubik_int.xdr.c
164
165 #
166 # Installation targets
167 #
168 test: all
169
170 install: libubik_pthread.a ubik.h ubik_int.h udebug
171         ${INSTALL} -d ${DESTDIR}${libdir}
172         ${INSTALL} -d ${DESTDIR}${includedir}
173         ${INSTALL} -d ${DESTDIR}${bindir}
174         ${INSTALL} -d ${DESTDIR}${afssrvbindir}
175         ${INSTALL_DATA} libubik_pthread.a ${DESTDIR}${libdir}/libubik_pthread.a
176         if [ "x$(ENABLE_PTHREADED_UBIK)" = "xyes" ] ; then                 \
177             $(LT_INSTALL_PROGRAM) udebug ${DESTDIR}${bindir}/udebug;          \
178             $(LT_INSTALL_PROGRAM) udebug ${DESTDIR}${afssrvbindir}/udebug;    \
179             ${INSTALL_DATA} ubik.h ${DESTDIR}${includedir}/ubik.h;         \
180             ${INSTALL_DATA} ubik_int.h ${DESTDIR}${includedir}/ubik_int.h; \
181         fi
182
183 dest: libubik_pthread.a ubik.h ubik_int.h udebug
184         ${INSTALL} -d ${DEST}/lib
185         ${INSTALL} -d ${DEST}/include
186         ${INSTALL} -d ${DEST}/root.server/usr/afs/bin
187         ${INSTALL_DATA} libubik_pthread.a ${DEST}/lib/libubik_pthread.a
188         if [ "x$(ENABLE_PTHREADED_UBIK)" = "xyes" ] ; then                    \
189             ${INSTALL_PROGRAM} udebug ${DEST}/bin/udebug;                     \
190             ${INSTALL_PROGRAM} udebug ${DEST}/root.server/usr/afs/bin/udebug; \
191             ${INSTALL_DATA} ubik.h ${DEST}/include/ubik.h;                    \
192             ${INSTALL_DATA} ubik_int.h ${DEST}/include/ubik_int.h;            \
193         fi
194 #
195 # Misc. targets
196 #
197 clean:
198         $(LT_CLEAN)
199         $(RM) -f *.o utst_server utst_client udebug *.a *.cs.c *.ss.c *.xdr.c
200         $(RM) -f utst_int.h ubik_int.h uerrors.c ubik.h core AFS_component_version_number.c Kubik_int.h
201
202 include ../config/Makefile.version
203
204 ${TOP_LIBDIR}/libubik_pthread.a: libubik_pthread.a
205         ${INSTALL} $? $@
206
207 ${TOP_INCDIR}/ubik.h: ubik.h
208         ${INSTALL} $? $@
209
210 ${TOP_INCDIR}/ubik_int.h: ubik_int.h
211         ${INSTALL} $? $@
212
213