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