ubik: utst needs opr for assert in util
[openafs.git] / src / ubik / 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.lwp
11
12
13 LIBOBJS=disk.o  remote.o beacon.o recovery.o ubik.o  vote.o lock.o phys.o \
14         ubik_int.cs.o ubik_int.ss.o ubik_int.xdr.o ubikcmd.o \
15         ubikclient.o uerrors.o uinit.o
16
17 INCLS=${TOP_INCDIR}/lwp.h ${TOP_INCDIR}/lock.h \
18         ${TOP_INCDIR}/rx/rx.h ${TOP_INCDIR}/rx/xdr.h \
19         ${TOP_INCDIR}/lock.h ubik.h ubik_int.h
20
21 LIBS=${TOP_LIBDIR}/librx.a ${TOP_LIBDIR}/liblwp.a \
22         ${TOP_LIBDIR}/libafscom_err.a ${TOP_LIBDIR}/libcmd.a \
23         ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libafsutil.a \
24         ${TOP_LIBDIR}/libopr.a ${XLIBS}
25
26 all: depinstall ${TOP_LIBDIR}/libubik.a udebug utst_server utst_client
27
28 generated: \
29         utst_int.cs.c utst_int.ss.c utst_int.xdr.c utst_int.h \
30         Kubik_int.cs.c Kubik_int.xdr.c Kubik_int.h \
31         ubik_int.cs.c ubik_int.ss.c ubik_int.xdr.c ubik_int.h \
32         uerrors.c ubik.h
33
34 depinstall: \
35         ubik_int.cs.c ubik_int.xdr.c \
36         ${TOP_INCDIR}/ubik.h \
37         ${TOP_INCDIR}/ubik_int.h
38
39 ${TOP_LIBDIR}/libubik.a: libubik.a
40         ${INSTALL_DATA} $? $@
41
42 ${TOP_INCDIR}/ubik.h: ubik.h
43         ${INSTALL_DATA} $? $@
44
45 ${TOP_INCDIR}/ubik_int.h: ubik_int.h
46         ${INSTALL_DATA} $? $@
47
48 utst_server: utst_server.o utst_int.ss.o utst_int.xdr.o libubik.a 
49         $(AFS_LDRULE) utst_server.o utst_int.ss.o utst_int.xdr.o \
50                 libubik.a $(LIBS) $(LIB_roken)
51
52 utst_client: utst_client.o utst_int.cs.o utst_int.xdr.o libubik.a 
53         $(AFS_LDRULE) utst_client.o utst_int.cs.o utst_int.xdr.o \
54                 libubik.a $(LIBS) $(LIB_roken)
55
56 udebug: udebug.o libubik.a 
57         $(AFS_LDRULE) udebug.o libubik.a $(LIBS) $(LIB_roken)
58
59 ubik_int.cs.c: ubik_int.xg
60         ${RXGEN} -A -x -C -o $@ ${srcdir}/ubik_int.xg
61
62 ubik_int.ss.c: ubik_int.xg
63         ${RXGEN} -A -x -S -o $@ ${srcdir}/ubik_int.xg
64
65 ubik_int.xdr.c: ubik_int.xg
66         ${RXGEN} -A -x -c -o $@ ${srcdir}/ubik_int.xg
67
68 ubik_int.h: ubik_int.xg
69         ${RXGEN} -A -x -h -o $@ ${srcdir}/ubik_int.xg
70
71 ubik_int.cs.c: ubik_int.h
72 ubik_int.ss.c: ubik_int.h
73 ubik_int.xdr.c: ubik_int.h
74
75 Kubik_int.cs.c: ubik_int.xg Kubik_int.h
76         ${RXGEN} -A -x -k -C -o Kubik_int.cs.c ${srcdir}/ubik_int.xg
77
78 Kubik_int.xdr.c: ubik_int.xg
79         ${RXGEN} -A -x -k -c -o Kubik_int.xdr.c ${srcdir}/ubik_int.xg
80
81 Kubik_int.h: ubik_int.xg
82         ${RXGEN} -A -x -k -h -o Kubik_int.h ${srcdir}/ubik_int.xg
83
84 utst_int.ss.o: utst_int.ss.c utst_int.xdr.c
85 utst_int.cs.o: utst_int.cs.c utst_int.xdr.c
86 utst_int.xdr.o: utst_int.xdr.c utst_int.h
87
88 utst_int.cs.c: utst_int.xg
89         ${RXGEN} -A -C -u -o $@ ${srcdir}/utst_int.xg
90
91 utst_int.ss.c: utst_int.xg
92         ${RXGEN} -A -S -o $@ ${srcdir}/utst_int.xg
93
94 utst_int.xdr.c: utst_int.xg
95         ${RXGEN} -A -c -o $@ ${srcdir}/utst_int.xg
96
97 utst_int.h: utst_int.xg
98         ${RXGEN} -A -h -u -o $@ ${srcdir}/utst_int.xg
99
100 utst_int.cs.c: utst_int.h
101 utst_int.ss.c: utst_int.h
102 utst_int.xdr.c: utst_int.h
103
104 utst_server.o: utst_server.c ${INCLS} utst_int.h AFS_component_version_number.c
105 utst_client.o: utst_client.c ${INCLS} utst_int.h AFS_component_version_number.c
106
107 udebug.o: udebug.c ${INCLS} AFS_component_version_number.c
108 uerrors.o: uerrors.c
109
110 ubik.h: uerrors.c
111
112 uerrors.c: uerrors.et ubik.p.h
113         $(RM) -f ubik.h uerrors.c
114         ${COMPILE_ET} -p ${srcdir} uerrors -h ubik
115
116 libubik.a: ${LIBOBJS} AFS_component_version_number.o
117         -$(RM) -f $@
118         $(AR) crc $@ ${LIBOBJS} AFS_component_version_number.o
119         $(RANLIB) $@
120
121 disk.o: disk.c ${INCLS}
122 uinit.o: uinit.c ${INCLS}
123 remote.o: remote.c ${INCLS}
124 beacon.o: beacon.c ${INCLS}
125 lock.o: lock.c ${INCLS}
126 recovery.o: recovery.c ${INCLS}
127 ubik.o: ubik.c ${INCLS}
128 phys.o: phys.c ${INCLS}
129 vote.o: vote.c ${INCLS}
130 ubikcmd.o: ubikcmd.c ${INCLS}
131 ubikclient.o: ubikclient.c ${INCLS}
132 ubik_int.ss.o: ubik_int.ss.c ${INCLS}
133 ubik_int.cs.o: ubik_int.cs.c ${INCLS}
134 ubik_int.xdr.o: ubik_int.xdr.c ${INCLS}
135 utst_int.ss.o: utst_int.ss.c ${INCLS} utst_int.h
136 utst_int.cs.o: utst_int.cs.c ${INCLS} utst_int.h
137 utst_int.xdr.o: utst_int.xdr.c ${INCLS} utst_int.h 
138
139 #
140 # Installation targets
141 #
142 test: all
143
144 install: libubik.a ubik.h ubik_int.h udebug
145         ${INSTALL} -d ${DESTDIR}${libdir}
146         ${INSTALL} -d ${DESTDIR}${includedir}
147         ${INSTALL} -d ${DESTDIR}${bindir}
148         ${INSTALL} -d ${DESTDIR}${afssrvbindir}
149         ${INSTALL_DATA} libubik.a ${DESTDIR}${libdir}/libubik.a
150         ${INSTALL_DATA} ubik.h ${DESTDIR}${includedir}/ubik.h
151         ${INSTALL_DATA} ubik_int.h ${DESTDIR}${includedir}/ubik_int.h
152         ${INSTALL_PROGRAM} udebug ${DESTDIR}${bindir}/udebug
153         ${INSTALL_PROGRAM} udebug ${DESTDIR}${afssrvbindir}/udebug
154
155 dest: libubik.a ubik.h ubik_int.h udebug
156         ${INSTALL} -d ${DEST}/lib
157         ${INSTALL} -d ${DEST}/include
158         ${INSTALL} -d ${DEST}/root.server/usr/afs/bin
159         ${INSTALL_DATA} libubik.a ${DEST}/lib/libubik.a
160         ${INSTALL_DATA} ubik.h ${DEST}/include/ubik.h
161         ${INSTALL_DATA} ubik_int.h ${DEST}/include/ubik_int.h
162         ${INSTALL_PROGRAM} udebug ${DEST}/bin/udebug
163         ${INSTALL_PROGRAM} udebug ${DEST}/root.server/usr/afs/bin/udebug
164
165 #
166 # Misc. targets
167 #
168 clean:
169         $(RM) -f *.o utst_server utst_client udebug *.a *.cs.c *.ss.c *.xdr.c
170         $(RM) -f utst_int.h ubik_int.h uerrors.c ubik.h core AFS_component_version_number.c Kubik_int.h
171
172 include ../config/Makefile.version