# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
+#
+# Portions Copyright (c) 2003 Apple Computer, Inc.
-DEST=@DEST@
-TOP_INCDIR=@TOP_INCDIR@
-TOP_LIBDIR=@TOP_LIBDIR@
-TOP_OBJDIR=@TOP_OBJDIR@
srcdir=@srcdir@
-VPATH=${srcdir}
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-bindir=@bindir@
-sbindir=@sbindir@
-libexecdir=@libexecdir@
-libdir=@libdir@
-includedir=@includedir@
-mandir=@mandir@
-afssrvbindir=@afssrvbindir@
-afssrvsbindir=@afssrvsbindir@
-afssrvlibexecdir=@afssrvlibexecdir@
-COMPILE_ET=${TOP_OBJDIR}/src/comerr/compile_et
-RXGEN=${TOP_OBJDIR}/src/rxgen/rxgen
-TOP_SRCDIR=@TOP_SRCDIR@
-SYS_NAME=@AFS_SYSNAME@
-
-SHELL = /bin/sh
-
-include ../config/Makefile.${SYS_NAME}
-
-CFLAGS=-g -w ${INCDIRS} ${XCFLAGS}
-
-INCDIRS=-I${TOP_OBJDIR}/src/config -I${TOP_INCDIR}/afs \
- -I${TOP_INCDIR}/rx -I${TOP_INCDIR}
+include @TOP_OBJDIR@/src/config/Makefile.config
+include @TOP_OBJDIR@/src/config/Makefile.lwp
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
INCLS=${TOP_INCDIR}/afs/partition.h ${TOP_INCDIR}/afs/volume.h \
${TOP_INCDIR}/afs/vlserver.h ${TOP_INCDIR}/rx/rx.h \
${TOP_LIBDIR}/liblwp.a \
${TOP_LIBDIR}/libcmd.a \
${TOP_LIBDIR}/libcom_err.a \
- ${TOP_LIBDIR}/util.a \
${TOP_LIBDIR}/libusd.a \
+ ${TOP_LIBDIR}/util.a \
${TOP_LIBDIR}/libprocmgmt.a
TESTOBJS=test.o
all: butc read_tape
butc_test: ${TESTOBJS} ${LIBS} ${INCLS} ${HACKS}
- ${CC} ${CFLAGS} ${TESTOBJS} ${LIBS} ${XLIBS} -o butc_test
+ $(AFS_LDRULE) ${TESTOBJS} ${LIBS} ${XLIBS}
tdump: tdump.c AFS_component_version_number.c
- ${CC} ${CFLAGS} ${srcdir}/tdump.c -o tdump
+ $(CC) $(AFS_CPPFLAGS) $(AFS_CFLAGS) $(AFS_LDFLAGS) \
+ ${srcdir}/tdump.c -o tdump
butc: ${SOBJS} ${LIBS} ${INCLS} ${HACKS}
@case ${SYS_NAME} in \
- rs_aix4*) ${CC} ${CFLAGS} ${SOBJS} ${LIBS} ${XLIBS} /usr/lib/libc_r.a -o butc;; \
- *) ${CC} ${CFLAGS} ${SOBJS} ${LIBS} ${XLIBS} -o butc;; \
+ rs_aix*) $(AFS_LDRULE) ${SOBJS} ${LIBS} ${XLIBS} \
+ /usr/lib/libc_r.a ;; \
+ *) $(AFS_LDRULE) ${SOBJS} ${LIBS} ${XLIBS} ;; \
esac
tcmain.o: tcmain.c ${INCLS} AFS_component_version_number.c
tcstatus.o: tcstatus.c ${INCLS}
read_tape: read_tape.c
- ${CC} ${CFLAGS} -o read_tape ${srcdir}/read_tape.c \
- ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a \
- ${TOP_LIBDIR}/libusd.a
+ $(CC) $(AFS_CPPFLAGS) $(AFS_CFLAGS) $(AFS_LDFLAGS) \
+ -o read_tape ${srcdir}/read_tape.c \
+ ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/libusd.a \
+ ${TOP_LIBDIR}/util.a
+
+# Errors
+CFLAGS_tcudbprocs.o=@CFLAGS_NOERROR@
clean:
$(RM) -f butc *.o butc_test core tdump read_tape AFS_component_version_number.c
-install:
+install: butc read_tape
+ ${INSTALL} -d ${DESTDIR}${sbindir}
@case ${SYS_NAME} in \
- alpha_dux*|sgi_*|sun4x_*|rs_aix4*|*linux*|hp_ux*) \
+ alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux*) \
+ echo "Don't install butc for ${SYS_NAME} (will install from tbutc)" ;; \
+ *_darwin_[1-6][0-9]) \
+ echo ${INSTALL_PROGRAM} butc ${DESTDIR}${sbindir}/butc ; \
+ ${INSTALL_PROGRAM} butc ${DESTDIR}${sbindir}/butc ;; \
+ *_darwin_*) \
echo "Don't install butc for ${SYS_NAME} (will install from tbutc)" ;; \
*) \
- echo ${INSTALL} butc ${DESTDIR}${sbindir}/butc ; \
- ${INSTALL} butc ${DESTDIR}${sbindir}/butc ;; \
+ echo ${INSTALL_PROGRAM} butc ${DESTDIR}${sbindir}/butc ; \
+ ${INSTALL_PROGRAM} butc ${DESTDIR}${sbindir}/butc ;; \
esac
- ${INSTALL} read_tape ${DESTDIR}${sbindir}/read_tape
+ ${INSTALL_PROGRAM} read_tape ${DESTDIR}${sbindir}/read_tape
-include ../config/Makefile.version
-dest:
+dest: butc read_tape
+ ${INSTALL} -d ${DEST}/etc
@case ${SYS_NAME} in \
- alpha_dux*|sgi_*|sun4x_*|rs_aix4*|*linux*|hp_ux*) \
+ alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux*) \
+ echo "Don't install butc for ${SYS_NAME} (will install from tbutc)" ;; \
+ *_darwin_[1-6][0-9]) \
+ echo ${INSTALL_PROGRAM} butc ${DEST}/etc/butc ; \
+ ${INSTALL_PROGRAM} butc ${DEST}/etc/butc ;; \
+ *_darwin_*) \
echo "Don't install butc for ${SYS_NAME} (will install from tbutc)" ;; \
*) \
- echo ${INSTALL} butc ${DEST}/etc/butc ; \
- ${INSTALL} butc ${DEST}/etc/butc ;; \
+ echo ${INSTALL_PROGRAM} butc ${DEST}/etc/butc ; \
+ ${INSTALL_PROGRAM} butc ${DEST}/etc/butc ;; \
esac
- ${INSTALL} read_tape ${DEST}/etc/read_tape
+ ${INSTALL_PROGRAM} read_tape ${DEST}/etc/read_tape
+include ../config/Makefile.version