autoconf-likes-relative-paths-20060802
[openafs.git] / src / butc / 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 # Portions Copyright (c) 2003 Apple Computer, Inc.
9
10 srcdir=@srcdir@
11 include @TOP_OBJDIR@/src/config/Makefile.config
12 INSTALL = @INSTALL@
13 INSTALL_DATA = @INSTALL_DATA@
14 INSTALL_PROGRAM = @INSTALL_PROGRAM@
15 INSTALL_SCRIPT = @INSTALL_SCRIPT@
16
17 INCLS=${TOP_INCDIR}/afs/partition.h ${TOP_INCDIR}/afs/volume.h \
18         ${TOP_INCDIR}/afs/vlserver.h ${TOP_INCDIR}/rx/rx.h \
19         ${TOP_INCDIR}/rx/xdr.h ${TOP_INCDIR}/afs/keys.h \
20         ${TOP_INCDIR}/afs/cellconfig.h ${TOP_INCDIR}/ubik.h \
21         ${TOP_INCDIR}/afs/cmd.h ${TOP_INCDIR}/afs/butc.h \
22         ${TOP_INCDIR}/afs/tcdata.h ${TOP_INCDIR}/afs/bubasics.h \
23         ${TOP_INCDIR}/afs/butm.h
24
25 HACKS=${TOP_LIBDIR}/libdir.a
26
27 LIBS=${TOP_LIBDIR}/libbudb.a \
28         $(TOP_LIBDIR)/libbxdb.a \
29         ${TOP_LIBDIR}/libbubasics.a \
30         ${TOP_LIBDIR}/libbutm.a \
31         ${TOP_LIBDIR}/libvolser.a \
32         ${TOP_LIBDIR}/libvldb.a \
33         ${TOP_LIBDIR}/vlib.a \
34         ${TOP_LIBDIR}/libacl.a \
35         ${TOP_LIBDIR}/libprot.a      \
36         ${TOP_LIBDIR}/libkauth.a \
37         ${TOP_LIBDIR}/libubik.a \
38         ${TOP_LIBDIR}/libauth.a \
39         ${TOP_LIBDIR}/librxkad.a \
40         ${TOP_LIBDIR}/libsys.a  \
41         ${TOP_LIBDIR}/libdes.a \
42         ${TOP_LIBDIR}/librx.a \
43         ${TOP_LIBDIR}/libsys.a  \
44         ${TOP_LIBDIR}/liblwp.a \
45         ${TOP_LIBDIR}/libcmd.a \
46         ${TOP_LIBDIR}/libcom_err.a \
47         ${TOP_LIBDIR}/util.a \
48         ${TOP_LIBDIR}/libusd.a \
49         ${TOP_LIBDIR}/libprocmgmt.a
50
51 TESTOBJS=test.o
52
53 SOBJS=dbentries.o tcprocs.o lwps.o tcmain.o list.o recoverDb.o tcudbprocs.o \
54         dump.o tcstatus.o
55
56 all: butc read_tape
57
58 butc_test: ${TESTOBJS} ${LIBS} ${INCLS} ${HACKS}
59         ${CC} ${CFLAGS} ${TESTOBJS} ${LIBS} ${XLIBS} -o butc_test
60
61 tdump: tdump.c AFS_component_version_number.c
62         ${CC} ${CFLAGS} ${srcdir}/tdump.c -o tdump
63
64 butc: ${SOBJS} ${LIBS} ${INCLS} ${HACKS}
65         @case ${SYS_NAME} in \
66           rs_aix*) ${CC} ${CFLAGS} ${SOBJS} ${LIBS} ${XLIBS} /usr/lib/libc_r.a -o butc;; \
67           *)        ${CC} ${CFLAGS} ${SOBJS} ${LIBS} ${XLIBS} -o butc;; \
68         esac
69
70 tcmain.o: tcmain.c ${INCLS} AFS_component_version_number.c
71 dbentries.o: dbentries.c ${INCLS}
72 tcprocs.o: tcprocs.c ${INCLS}
73 test.o: test.c ${INCLS} AFS_component_version_number.c
74 lwps.o: lwps.c ${INCLS}
75 list.o: list.c ${INCLS}
76 recoverDb.o: recoverDb.c ${INCLS}
77 tcudbprocs.o: tcudbprocs.c ${INCLS}
78 dump.o: dump.c ${INCLS}
79 tcstatus.o: tcstatus.c ${INCLS}
80
81 read_tape: read_tape.c
82         ${CC} ${CFLAGS} -o read_tape ${srcdir}/read_tape.c \
83                 ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a \
84                 ${TOP_LIBDIR}/libusd.a
85
86 clean:
87         $(RM) -f butc *.o butc_test core tdump read_tape AFS_component_version_number.c
88
89 install: butc read_tape
90         ${INSTALL} -d ${DESTDIR}${sbindir}
91         @case ${SYS_NAME} in \
92         alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux*) \
93                 echo "Don't install butc for ${SYS_NAME} (will install from tbutc)" ;; \
94         *_darwin_[1-6][0-9]) \
95                 echo ${INSTALL_PROGRAM} butc ${DESTDIR}${sbindir}/butc ; \
96                 ${INSTALL_PROGRAM} butc ${DESTDIR}${sbindir}/butc ;; \
97         *_darwin_*) \
98                 echo "Don't install butc for ${SYS_NAME} (will install from tbutc)" ;; \
99         *) \
100                 echo ${INSTALL_PROGRAM} butc ${DESTDIR}${sbindir}/butc ; \
101                 ${INSTALL_PROGRAM} butc ${DESTDIR}${sbindir}/butc ;; \
102         esac
103         ${INSTALL_PROGRAM} read_tape ${DESTDIR}${sbindir}/read_tape
104
105 dest: butc read_tape
106         ${INSTALL} -d ${DEST}/etc
107         @case ${SYS_NAME} in \
108         alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux*) \
109                 echo "Don't install butc for ${SYS_NAME} (will install from tbutc)" ;; \
110         *_darwin_[1-6][0-9]) \
111                 echo ${INSTALL_PROGRAM} butc ${DEST}/etc/butc ; \
112                 ${INSTALL_PROGRAM} butc ${DEST}/etc/butc ;; \
113         *_darwin_*) \
114                 echo "Don't install butc for ${SYS_NAME} (will install from tbutc)" ;; \
115         *) \
116                 echo ${INSTALL_PROGRAM} butc ${DEST}/etc/butc ; \
117                 ${INSTALL_PROGRAM} butc ${DEST}/etc/butc ;; \
118         esac
119         ${INSTALL_PROGRAM} read_tape ${DEST}/etc/read_tape
120
121 include ../config/Makefile.version