09eb942fbfd680e9adcddc925a29c4c9c15f3b1b
[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         $(CC) $(CFLAGS) -c $<
72 dbentries.o: dbentries.c ${INCLS}
73 tcprocs.o: tcprocs.c ${INCLS}
74 test.o: test.c ${INCLS} AFS_component_version_number.c
75 lwps.o: lwps.c ${INCLS}
76         $(CC) $(CFLAGS) -c $<
77 list.o: list.c ${INCLS}
78 recoverDb.o: recoverDb.c ${INCLS}
79 tcudbprocs.o: tcudbprocs.c ${INCLS}
80         $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
81 dump.o: dump.c ${INCLS}
82         $(CC) $(CFLAGS) -c $<
83 tcstatus.o: tcstatus.c ${INCLS}
84
85 read_tape: read_tape.c
86         ${CC} ${CFLAGS} -o read_tape ${srcdir}/read_tape.c \
87                 ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a \
88                 ${TOP_LIBDIR}/libusd.a
89
90 clean:
91         $(RM) -f butc *.o butc_test core tdump read_tape AFS_component_version_number.c
92
93 install: butc read_tape
94         ${INSTALL} -d ${DESTDIR}${sbindir}
95         @case ${SYS_NAME} in \
96         alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux*) \
97                 echo "Don't install butc for ${SYS_NAME} (will install from tbutc)" ;; \
98         *_darwin_[1-6][0-9]) \
99                 echo ${INSTALL_PROGRAM} butc ${DESTDIR}${sbindir}/butc ; \
100                 ${INSTALL_PROGRAM} butc ${DESTDIR}${sbindir}/butc ;; \
101         *_darwin_*) \
102                 echo "Don't install butc for ${SYS_NAME} (will install from tbutc)" ;; \
103         *) \
104                 echo ${INSTALL_PROGRAM} butc ${DESTDIR}${sbindir}/butc ; \
105                 ${INSTALL_PROGRAM} butc ${DESTDIR}${sbindir}/butc ;; \
106         esac
107         ${INSTALL_PROGRAM} read_tape ${DESTDIR}${sbindir}/read_tape
108
109 dest: butc read_tape
110         ${INSTALL} -d ${DEST}/etc
111         @case ${SYS_NAME} in \
112         alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux*) \
113                 echo "Don't install butc for ${SYS_NAME} (will install from tbutc)" ;; \
114         *_darwin_[1-6][0-9]) \
115                 echo ${INSTALL_PROGRAM} butc ${DEST}/etc/butc ; \
116                 ${INSTALL_PROGRAM} butc ${DEST}/etc/butc ;; \
117         *_darwin_*) \
118                 echo "Don't install butc for ${SYS_NAME} (will install from tbutc)" ;; \
119         *) \
120                 echo ${INSTALL_PROGRAM} butc ${DEST}/etc/butc ; \
121                 ${INSTALL_PROGRAM} butc ${DEST}/etc/butc ;; \
122         esac
123         ${INSTALL_PROGRAM} read_tape ${DEST}/etc/read_tape
124
125 include ../config/Makefile.version