ubik: Use 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
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 utst_int.h
20
21 LTLIBS=@TOP_OBJDIR@/src/util/liboafs_util.la \
22        @TOP_OBJDIR@/src/ubik/liboafs_ubik.la \
23        @TOP_OBJDIR@/src/cmd/liboafs_cmd.la
24
25 all: udebug utst_server utst_client
26
27 #
28 # insert comments here
29 #
30
31 utst_int.ss.o: utst_int.ss.c
32 utst_int.cs.o: utst_int.cs.c
33 utst_int.xdr.o: utst_int.xdr.c
34
35 utst_int.cs.c: ${UBIK}/utst_int.xg
36         ${RXGEN} -A -C -u -o $@ ${UBIK}/utst_int.xg
37
38 utst_int.ss.c: ${UBIK}/utst_int.xg
39         ${RXGEN} -A -S -o $@ ${UBIK}/utst_int.xg
40
41 utst_int.xdr.c: ${UBIK}/utst_int.xg
42         ${RXGEN} -A -c -o $@ ${UBIK}/utst_int.xg
43
44 utst_int.h: ${UBIK}/utst_int.xg
45         ${RXGEN} -A -h -u -o $@ ${UBIK}/utst_int.xg
46
47 utst_int.cs.c: utst_int.h
48 utst_int.ss.c: utst_int.h
49 utst_int.xdr.c: utst_int.h
50
51 utst_server.o: ${UBIK}/utst_server.c
52         ${AFS_CCRULE} ${UBIK}/utst_server.c
53
54 utst_client.o: ${UBIK}/utst_client.c
55         ${AFS_CCRULE} ${UBIK}/utst_client.c
56
57 utst_server: utst_server.o utst_int.ss.o utst_int.xdr.o $(LTLIBS)
58         $(LT_LDRULE_static) utst_server.o utst_int.ss.o utst_int.xdr.o \
59                 $(LTLIBS) $(LIBS) $(LIB_hcrypto) $(LIB_roken)
60
61 utst_client: utst_client.o utst_int.cs.o utst_int.xdr.o $(LTLIBS)
62         $(LT_LDRULE_static) utst_client.o utst_int.cs.o utst_int.xdr.o \
63                 $(LTLIBS) $(LIBS) $(LIB_hcrypto) $(LIB_roken)
64
65 udebug.o: ${UBIK}/udebug.c
66         ${AFS_CCRULE} ${UBIK}/udebug.c
67
68 udebug: udebug.o $(LTLIBS)
69         $(LT_LDRULE_static) udebug.o \
70                 $(LTLIBS) $(LIBS) $(LIB_hcrypto) $(LIB_roken)
71
72 #
73 # Installation targets
74 #
75 test: all
76
77 install: udebug
78         ${INSTALL} -d ${DESTDIR}${bindir}
79         ${INSTALL} -d ${DESTDIR}${afssrvbindir}
80         if [ "x$(ENABLE_PTHREADED_UBIK)" = "xyes" ] ; then                 \
81             $(LT_INSTALL_PROGRAM) udebug ${DESTDIR}${bindir}/udebug;          \
82             $(LT_INSTALL_PROGRAM) udebug ${DESTDIR}${afssrvbindir}/udebug;    \
83         fi
84
85 dest: udebug
86         ${INSTALL} -d ${DEST}/root.server/usr/afs/bin
87         if [ "x$(ENABLE_PTHREADED_UBIK)" = "xyes" ] ; then                    \
88             ${INSTALL_PROGRAM} udebug ${DEST}/bin/udebug;                     \
89             ${INSTALL_PROGRAM} udebug ${DEST}/root.server/usr/afs/bin/udebug; \
90         fi
91 #
92 # Misc. targets
93 #
94 clean:
95         $(LT_CLEAN)
96         $(RM) -f *.o utst_server utst_client udebug *.a *.cs.c *.ss.c *.xdr.c
97         $(RM) -f utst_int.h core AFS_component_version_number.c
98
99 include ../config/Makefile.version