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