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