cmd: Convert to using libtool
[openafs.git] / src / venus / Makefile.in
index 4957648..791f757 100644 (file)
 
 srcdir=@srcdir@
 include @TOP_OBJDIR@/src/config/Makefile.config
+include @TOP_OBJDIR@/src/config/Makefile.lwp
+
+KRB5CFLAGS = @KRB5_CPPFLAGS@
 
 INCLS=${TOP_INCDIR}/afs/afsint.h \
        ${TOP_INCDIR}/afs/cmd.h \
        ${TOP_INCDIR}/afs/afsutil.h
 
+AFSIO_INCLS=${TOP_INCDIR}/afs/afsint.h \
+       ${TOP_INCDIR}/afs/cmd.h \
+       ${TOP_INCDIR}/afs/auth.h \
+       ${TOP_INCDIR}/afs/vlserver.h \
+       ${TOP_INCDIR}/afs/ihandle.h \
+       ${TOP_INCDIR}/afs/com_err.h \
+       ${TOP_INCDIR}/afs/afscp.h \
+       ${TOP_INCDIR}/afs/afsutil.h
+
+AFSIO_LIBS=${TOP_LIBDIR}/libafscp.a \
+       ${TOP_LIBDIR}/libafsauthent.a \
+       ${TOP_LIBDIR}/libafsrpc.a \
+       $(top_builddir)/src/cmd/liboafs_cmd.la \
+       $(TOP_LIBDIR)/libafsutil.a \
+       $(top_builddir)/src/opr/liboafs_opr.la
+
 FSLIBS=${TOP_LIBDIR}/libsys.a \
         ${TOP_LIBDIR}/libvldb.a \
         ${TOP_LIBDIR}/libubik.a \
         ${TOP_LIBDIR}/vlib.a \
         ${TOP_LIBDIR}/libauth.a \
         ${TOP_LIBDIR}/librxkad.a \
-        ${TOP_LIBDIR}/libcom_err.a \
+        ${TOP_LIBDIR}/libafscom_err.a \
         ${TOP_LIBDIR}/libcmd.a \
         ${TOP_LIBDIR}/libkauth.a \
-        ${TOP_LIBDIR}/libdes.a \
         ${TOP_LIBDIR}/librx.a \
         ${TOP_LIBDIR}/libsys.a \
         ${TOP_LIBDIR}/liblwp.a \
         ${TOP_LIBDIR}/libaudit.a \
-        $(TOP_LIBDIR)/libafsutil.a
+        $(TOP_LIBDIR)/libafsutil.a \
+        $(TOP_LIBDIR)/libopr.a \
+        ${TOP_LIBDIR}/libafshcrypto_lwp.a
 
 CMLIBS=${TOP_LIBDIR}/libsys.a \
         ${TOP_LIBDIR}/libafsint.a \
         ${TOP_LIBDIR}/librxkad.a \
         ${TOP_LIBDIR}/libauth.a \
-        ${TOP_LIBDIR}/libcom_err.a \
+        ${TOP_LIBDIR}/libafscom_err.a \
         ${TOP_LIBDIR}/libcmd.a \
         ${TOP_LIBDIR}/librx.a \
         ${TOP_LIBDIR}/libsys.a \
         ${TOP_LIBDIR}/liblwp.a \
+        $(TOP_LIBDIR)/libopr.a \
         $(TOP_LIBDIR)/libafsutil.a
 
 LIBS = ${FSLIBS} 
 
-all: fs up fstrace cmdebug livesys kdump-build
+all: fs up fstrace cmdebug livesys kdump-build cacheout afsio
 
 #
 # Build targets
 #
 cacheout: cacheout.o
-       $(CC) ${CFLAGS} -o cacheout cacheout.o ${LIBS} ${XLIBS} ${CMLIBS}
+       $(AFS_LDRULE) cacheout.o ${LIBS} $(LIB_roken) ${XLIBS} ${CMLIBS}
 
 cacheout.o: cacheout.c
 
-${DEST}/bin/fs ${DEST}/root.server/usr/afs/bin/fs: fs
-       ${INSTALL} -s $? $@
-
-${DEST}/bin/livesys: livesys
-       ${INSTALL} -s $? $@
-
-${DEST}/bin/up: up
-       ${INSTALL} -s $? $@
-
-${DEST}/etc/fstrace: fstrace
-       ${INSTALL} -s $? $@
-
-${DEST}/bin/cmdebug: cmdebug
-       ${INSTALL} -s $? $@
-
-
 
 up.o: up.c AFS_component_version_number.c
 
 up: up.o
-       ${CC} ${CFLAGS} -o up up.o ${LIBS} ${XLIBS}
+       $(AFS_LDRULE) up.o ${LIBS} $(LIB_roken) ${XLIBS}
 
 fs.o: fs.c ${INCLS} AFS_component_version_number.c
 
 fs: fs.o $(LIBS)
-       ${CC} ${CFLAGS} -o fs fs.o ${TOP_LIBDIR}/libprot.a $(LIBS) ${XLIBS}
+       $(AFS_LDRULE) fs.o ${TOP_LIBDIR}/libprot.a $(LIBS) \
+               $(LIB_roken) ${XLIBS}
+
+afsio.o: afsio.c ${AFSIO_INCLS} AFS_component_version_number.c
+       ${PTH_CCRULE} ${srcdir}/afsio.c
+vldbint.cs.o: ../vlserver/vldbint.cs.c
+       ${PTH_CCRULE} ../vlserver/vldbint.cs.c
+vldbint.xdr.o: ../vlserver/vldbint.xdr.c
+       ${PTH_CCRULE} ../vlserver/vldbint.xdr.c
+afscbint.ss.o: ../fsint/afscbint.ss.c
+       ${PTH_CCRULE} ../fsint/afscbint.ss.c
+
+afsio: afsio.o vldbint.cs.o afscbint.ss.o vldbint.xdr.o ${AFSIO_LIBS}
+       $(LT_LDRULE_static) afsio.o vldbint.cs.o afscbint.ss.o vldbint.xdr.o \
+               ${AFSIO_LIBS} \
+               $(LIB_hcrypto) $(LIB_roken) ${MT_LIBS} ${XLIBS} \
+               $(LDFLAGS_krb5) $(LIB_krb5)
 
 livesys.o: livesys.c ${INCLS} AFS_component_version_number.c
 
-livesys: livesys.c $(LIBS)
-       ${CC} ${CFLAGS} -o livesys ${srcdir}/livesys.c $(LIBS) ${XLIBS}
+livesys: livesys.o $(LIBS)
+       $(AFS_LDRULE) livesys.o $(LIBS) $(LIB_roken) ${XLIBS}
 
-twiddle: twiddle.c $(LIBS)
-       ${CC} ${CFLAGS} -o twiddle ${srcdir}/twiddle.c $(LIBS) ${XLIBS}
+twiddle: twiddle.o $(LIBS)
+       $(AFS_LDRULE) twiddle.o $(LIBS) $(LIB_roken) ${XLIBS}
 
-gcpags: gcpags.c $(LIBS)
-       ${CC} ${CFLAGS} -o gcpags ${srcdir}/gcpags.c $(LIBS) ${XLIBS}
+gcpags: gcpags.o $(LIBS)
+       $(AFS_LDRULE) gcpags.o $(LIBS) $(LIB_roken) ${XLIBS}
 
 whatfid.o: whatfid.c ${INCLS} AFS_component_version_number.c
 
 whatfid: whatfid.o ${LIBS}
-       ${CC} ${CFLAGS} -o whatfid whatfid.o ${LIBS} ${XLIBS}
-
-fstrace.o: fstrace.c AFS_component_version_number.c
-       case ${SYS_NAME} in \
-               sun4_411 | sun4c_411 | sun4m_412 ) \
-                       ${CCXPG2} ${DBG} ${OPTMZ} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} -I${TOP_INCDIR} -c ${srcdir}/fstrace.c ;; \
-               sun*_4* ) \
-                       ${CC} ${DBG} ${OPTMZ} -I/usr/xpg2include -I/usr/5include -g -I${TOP_SRCDIR}/config -I${TOP_INCDIR} -I${TOP_INCDIR} -c fstrace.c ;; \
-               * ) \
-                       ${CC} ${CFLAGS} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} -I${TOP_INCDIR} -c ${srcdir}/fstrace.c ;; \
-       esac
+       $(AFS_LDRULE) whatfid.o ${LIBS} $(LIB_roken) ${XLIBS}
 
 fstrace: fstrace.o
-       case ${SYS_NAME} in \
-               pmax_ul43 | pmax_ul43a ) \
-                       ${CC} ${CFLAGS} -o fstrace fstrace.o ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a /usr/lib/libi.a ;; \
-               sun4_411 | sun4c_411 | sun4m_412 ) \
-                       ${CCXPG2} ${CFLAGS} -o fstrace fstrace.o ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a ;; \
-               sun*_4* ) \
-                       ${CC} -L/usr/xpg2lib -L/usr/5lib ${CFLAGS} -g -o fstrace fstrace.o ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a -lxpg ;; \
-               hp700_ux100 | hp800_ux100 | hp?00_ux10? | hp_ux10? | hp_ux11?) \
-                       ${CC} -I${TOP_OBJDIR}/src/config  -o fstrace fstrace.o ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a ;; \
-               * ) \
-                       ${CC} ${CFLAGS} -o fstrace fstrace.o ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a ;; \
-       esac
+       $(AFS_LDRULE) fstrace.o $(LIBS) $(LIB_roken) ${XLIBS}
 
 cmdebug.o: cmdebug.c ${INCLS} AFS_component_version_number.c
 
 cmdebug: cmdebug.o ${CMLIBS}
-       $(CC) -o cmdebug cmdebug.o ${CFLAGS} ${CMLIBS} ${XLIBS}
+       $(AFS_LDRULE) cmdebug.o ${CMLIBS} $(LIB_roken) ${XLIBS}
 
+dedebug.o: dedebug.c ${INCLS} AFS_component_version_number.c
 
+dedebug: dedebug.o ${CMLIBS}
+       $(AFS_LDRULE) dedebug.o ${CMLIBS} $(LIB_roken) ${XLIBS}
 
 #
 # Kernel info dumper - these are done with submakes so that
@@ -159,13 +162,15 @@ kdump: kdump.o
                                        -o kdump.$$IP kdump.$$IP.o \
                                        ${TOP_LIBDIR}/libcmd64.a -lelf \
                                ;; \
-                       *)      ${CC} ${XCFLAGS} \
+                       *)      ${CC} ${XCFLAGS} ${ARCHFLAGS} \
                                        $$CPU_KDEFS \
                                        -o kdump.$$IP kdump.$$IP.o \
                                        ${TOP_LIBDIR}/libcmd.a -lelf \
                                ;; \
                        esac || exit $$? ; \
                done ;; \
+       *linux26* | *linux_26* ) \
+               touch kdump ;; \
        *alpha_linux* ) \
                $(MAKE) kdump-alpha_linux-@LINUX_VERSION@ ;; \
        *linux* ) \
@@ -173,7 +178,7 @@ kdump: kdump.o
        alpha_osf1 | alpha_osf20 |  alpha_osf30 | alpha_osf32 | alpha_osf32c | alpha_dux??) \
                ${CC} -o kdump kdump.o ${TOP_LIBDIR}/libcmd.a  ${TOP_LIBDIR}/util.a ${XLIBS} -ll -lmld;; \
        ncrx86_* ) ${CC} -o kdump kdump.o ${TOP_LIBDIR}/libcmd.a  ${TOP_LIBDIR}/util.a -lelf ${XLIBS} ;; \
-       *nbsd*) touch kdump ;; \
+       *bsd*) touch kdump ;; \
        * )     ${CC} -o kdump kdump.o ${TOP_LIBDIR}/libcmd.a  ${TOP_LIBDIR}/util.a ${XLIBS} ;; \
        esac
 
@@ -189,12 +194,14 @@ kdump64:
 kdump.o: kdump.c ${INCLS} AFS_component_version_number.c
        -set -x; \
        case ${SYS_NAME} in \
+               *linux26* | *linux_26* ) \
+                       touch kdump.o ;; \
                alpha_linux* ) \
                        $(MAKE) kdump-alpha_linux-${LINUX_VERSION}.o ;; \
                *linux* ) \
                        $(MAKE) kdump-linux-${LINUX_VERSION}.o ;; \
                alpha_osf1 | alpha_osf20 |  alpha_osf30 | alpha_osf32 | alpha_osf32c| alpha_dux?? ) \
-                       ${CC} ${CFLAGS} -I/usr/sys/include -I/usr/sys/BINARY -I/usr/sys/AFS -DDEBUGGER -c ${srcdir}/kdump.c ;;\
+                       ${CC} ${AFS_CFLAGS} -I/usr/sys/include -I/usr/sys/BINARY -I/usr/sys/AFS -DDEBUGGER -c ${srcdir}/kdump.c ;;\
                sgi_6? ) \
                        for f in ../libafs/STATIC.IP*/CPU_KDEFS; \
                        do      IP=`expr "$$f" : '../libafs/STATIC.\(IP..\)'`; \
@@ -213,17 +220,17 @@ kdump.o: kdump.c ${INCLS} AFS_component_version_number.c
                                                ${KERN_DBG} ${KERN_OPTMZ} -I${TOP_INCDIR} \
                                                -I${TOP_OBJDIR}/src/config \
                                                $$CPU_KDEFS \
-                                               ${XCFLAGS} -DAFS_32BIT_KERNEL_ENV \
+                                               ${XCFLAGS} ${ARCHFLAGS} -DAFS_32BIT_KERNEL_ENV \
                                                -c ${srcdir}/kdump.c -o kdump.$$IP.o \
                                        ;; \
                                esac || exit $$?; \
                        done \
                        ;; \
-               *nbsd*) \
+               *bsd*) \
                        touch kdump.o ;; \
                *) \
                        ${CC} ${KERN_DBG} ${KERN_OPTMZ} -I${TOP_SRCDIR} -I${TOP_INCDIR}/afs \
-                       -I${TOP_OBJDIR}/src/config -I${TOP_OBJDIR}/src -I${TOP_INCDIR} ${XCFLAGS} \
+                       -I${TOP_OBJDIR}/src/config -I${TOP_OBJDIR}/src -I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS} \
                        -o kdump.o -c ${srcdir}/kdump.c ;; \
        esac ;
 
@@ -243,7 +250,7 @@ kdump-linux-@LINUX_VERSION@.o: kdump.c ${INCLS} AFS_component_version_number.c
                -I${TOP_OBJDIR}/src/afs/${MKAFS_OSTYPE} \
                -I${TOP_OBJDIR}/src/config -I${TOP_OBJDIR}/src/libafs/afs \
                -I${TOP_SRCDIR} -I${TOP_SRCDIR}/afs/${MKAFS_OSTYPE} \
-               -I${TOP_INCDIR} ${XCFLAGS} -o kdump-linux-${LINUX_VERSION}.o \
+               -I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS} -o kdump-linux-${LINUX_VERSION}.o \
                -c ${srcdir}/kdump.c
 
 kdump-linux-@LINUX_VERSION@: kdump-linux-@LINUX_VERSION@.o
@@ -257,130 +264,111 @@ kdump-alpha_linux-@LINUX_VERSION@.o: kdump.c ${INCLS} AFS_component_version_numb
                -I${TOP_OBJDIR}/src/afs/${MKAFS_OSTYPE} \
                -I${TOP_OBJDIR}/src/config -I${TOP_OBJDIR}/src/libafs/afs \
                -I${TOP_SRCDIR} -I${TOP_SRCDIR}/afs/${MKAFS_OSTYPE} \
-               -I${TOP_INCDIR} ${XCFLAGS} -mno-fp-regs -ffixed-8 \
-               -o kdump-alpha_linux-${LINUX_VERSION}.o -c ${srcdir}/kdump.c ;; \
+               -I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS} -mno-fp-regs -ffixed-8 \
+               -o kdump-alpha_linux-${LINUX_VERSION}.o -c ${srcdir}/kdump.c ;;
 
 kdump-alpha_linux-@LINUX_VERSION@: kdump-alpha_linux-@LINUX_VERSION@.o
        ${CC} ${KERN_DBG} ${KERN_OPTMZ} -o kdump-alpha_linux-${LINUX_VERSION} kdump-alpha_linux-${LINUX_VERSION}.o \
                ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a ${XLIBS}
 
 #
-# kdump install targets
+# Install targets
 #
-${DEST}/etc/kdump: kdump-build
+install: kdump-build fs livesys up fstrace cmdebug afsio
+       ${INSTALL} -d ${DESTDIR}${bindir}
+       ${INSTALL} -d ${DESTDIR}${afssrvbindir}
+       ${INSTALL} -d ${DESTDIR}${sbindir}
+       ${INSTALL_PROGRAM} fs ${DESTDIR}${bindir}/fs
+       ${INSTALL_PROGRAM} livesys ${DESTDIR}${bindir}/livesys
+       ${INSTALL_PROGRAM} fs ${DESTDIR}${afssrvbindir}/fs
+       ${INSTALL_PROGRAM} up ${DESTDIR}${bindir}/up
+       ${INSTALL_PROGRAM} fstrace ${DESTDIR}${sbindir}/fstrace
+       ${INSTALL_PROGRAM} cmdebug ${DESTDIR}${bindir}/cmdebug
+       ${INSTALL_PROGRAM} afsio ${DESTDIR}${bindir}/afsio ;
        -set -x; \
        case ${SYS_NAME} in \
        sgi_6? ) \
-               ${INSTALLex} -f ${srcdir}/kdump.sh.sgi_ipnos ${DEST}/etc/kdump; \
-               ln -fs kdump ${DEST}/etc/kdump32; \
-               ln -fs kdump.IP20 ${DEST}/etc/kdump.IP22; \
-               ln -fs kdump.IP20 ${DEST}/etc/kdump.IP32; \
+               ${INSTALL_SCRIPT} kdump.sh.sgi_ipnos ${DESTDIR}${sbindir}/kdump; \
+               ln -fs kdump ${DESTDIR}${sbindir}/kdump32; \
+               ln -fs kdump.IP20 ${DESTDIR}${sbindir}/kdump.IP22; \
+               ln -fs kdump.IP20 ${DESTDIR}${sbindir}/kdump.IP32; \
                for f in kdump.IP??; \
-                       do ${INSTALL} -s $$f ${DEST}/etc/$$f || exit $$? ; \
+                       do ${INSTALL_PROGRAM} $$f ${DESTDIR}${sbindir}/$$f || exit $$? ; \
                done ;; \
        sun*_5[789] | sun*_510 ) \
-               ${INSTALLex} -f ${srcdir}/kdump.sh.solaris7 ${DEST}/etc/kdump; \
-               ${INSTALL} -s -f ${srcdir}/kdump ${DEST}/etc/kdump32;; \
-       *alpha_linux* ) \
-               ${INSTALLex} -f ${srcdir}/kdump.sh.linux ${DEST}/etc/kdump; \
-               ${INSTALL} -s kdump-alpha_linux-${LINUX_VERSION} $@ ;; \
+               ${INSTALL_SCRIPT} kdump.sh.solaris7 ${DESTDIR}${sbindir}/kdump32; \
+               ${INSTALL_PROGRAM} kdump-build ${DESTDIR}${sbindir}/kdump;; \
+       *linux26* | *linux_26* ) \
+               ;; \
        *linux* ) \
-               ${INSTALLex} -f ${srcdir}/kdump.sh.linux ${DEST}/etc/kdump; \
-               ${INSTALL} -s kdump-linux-${LINUX_VERSION} $@-${LINUX_VERSION} ;; \
+               ${INSTALL_SCRIPT} kdump.sh.linux ${DESTDIR}${sbindir}/kdump; \
+               ${INSTALL_PROGRAM} kdump-build ${DESTDIR}${sbindir}/kdump ;; \
        hp_ux11* ) \
-               ${INSTALLex} -f ${srcdir}/kdump.sh.hp_ux11 ${DEST}/etc/kdump; \
-               ${INSTALL} -s -f $? $@;; \
-       *nbsd*) \
+               ${INSTALL_SCRIPT} kdump.sh.hp_ux11 ${DESTDIR}${sbindir}/kdump; \
+               ${INSTALL_PROGRAM} kdump-build ${DESTDIR}${sbindir}/kdump ;; \
+       *bsd* ) \
                ;; \
        *) \
-               ${INSTALL} -s $? $@ ;; \
+               ${INSTALL_PROGRAM} kdump-build ${DESTDIR}${sbindir}/kdump ;; \
        esac
-
-${DEST}/etc/kdump64: kdump-build
        if [ -f kdump64 ]; then \
-               ${INSTALL} -s kdump64 $@; \
+               ${INSTALL_PROGRAM} kdump64 ${DESTDIR}${sbindir}/kdump; \
        fi
 
-
-#
-# Install targets
-#
-install: \
-       ${DESTDIR}${bindir}/fs \
-       ${DESTDIR}${bindir}/livesys \
-       ${DESTDIR}${afssrvbindir}/fs \
-       ${DESTDIR}${bindir}/up \
-       ${DESTDIR}${sbindir}/fstrace \
-       ${DESTDIR}${bindir}/cmdebug \
-       ${DESTDIR}${sbindir}/kdump \
-       ${DESTDIR}${sbindir}/kdump64
-
-#
-# Misc targets
-#
-
-clean:
-       $(RM) -f *.o *.a up fs kdump-* kdump kdump64 core cmdebug AFS_component_version_number.c fstrace gcpags livesys
-
-test:
-       cd test; $(MAKE)
-
-include ../config/Makefile.version
-
-${DESTDIR}${bindir}/fs: fs
-       ${INSTALL} -s $? $@
-
-${DESTDIR}${bindir}/livesys: livesys
-       ${INSTALL} -s $? $@
-
-${DESTDIR}${afssrvbindir}/fs: fs
-       ${INSTALL} -s $? $@
-
-${DESTDIR}${bindir}/up: up
-       ${INSTALL} -s $? $@
-
-${DESTDIR}${sbindir}/fstrace: fstrace
-       ${INSTALL} -s $? $@
-
-${DESTDIR}${bindir}/cmdebug: cmdebug
-       ${INSTALL} -s $? $@
-
-${DESTDIR}${sbindir}/kdump: kdump-build
+dest: kdump-build fs livesys up fstrace cmdebug afsio
+       ${INSTALL} -d ${DEST}/bin
+       ${INSTALL} -d ${DEST}/etc
+       ${INSTALL} -d ${DEST}/root.server/usr/afs/bin
+       ${INSTALL_PROGRAM} fs ${DEST}/bin/fs
+       ${INSTALL_PROGRAM} livesys ${DEST}/bin/livesys
+       ${INSTALL_PROGRAM} fs ${DEST}/root.server/usr/afs/bin/fs
+       ${INSTALL_PROGRAM} up ${DEST}/bin/up
+       ${INSTALL_PROGRAM} fstrace ${DEST}/etc/fstrace
+       ${INSTALL_PROGRAM} cmdebug ${DEST}/bin/cmdebug
+       ${INSTALL_PROGRAM} afsio ${DEST}/bin/afsio
        -set -x; \
        case ${SYS_NAME} in \
        sgi_6? ) \
-               ${INSTALLex} -f kdump.sh.sgi_ipnos ${DESTDIR}${sbindir}/kdump; \
-               ln -fs kdump ${DESTDIR}${sbindir}/kdump32; \
-               ln -fs kdump.IP20 ${DESTDIR}${sbindir}/kdump.IP22; \
-               ln -fs kdump.IP20 ${DESTDIR}${sbindir}/kdump.IP32; \
+               ${INSTALL_SCRIPT} ${srcdir}/kdump.sh.sgi_ipnos ${DEST}/etc/kdump; \
+               ln -fs kdump ${DEST}/etc/kdump32; \
+               ln -fs kdump.IP20 ${DEST}/etc/kdump.IP22; \
+               ln -fs kdump.IP20 ${DEST}/etc/kdump.IP32; \
                for f in kdump.IP??; \
-                       do ${INSTALL} -s $$f ${DESTDIR}${sbindir}/$$f || exit $$? ; \
+                       do ${INSTALL_PROGRAM} $$f ${DEST}/etc/$$f || exit $$? ; \
                done ;; \
        sun*_5[789] | sun*_510 ) \
-               ${INSTALLex} -f kdump.sh.solaris7 ${DESTDIR}${sbindir}/kdump32; \
-               ${INSTALL} -s -f $? $@;; \
+               ${INSTALL_SCRIPT} ${srcdir}/kdump.sh.solaris7 ${DEST}/etc/kdump; \
+               ${INSTALL_PROGRAM} ${srcdir}/kdump ${DEST}/etc/kdump32;; \
+       *linux26* | *linux_26* ) \
+               ;; \
+       *alpha_linux* ) \
+               ${INSTALL_SCRIPT} ${srcdir}/kdump.sh.linux ${DEST}/etc/kdump; \
+               ${INSTALL_PROGRAM} kdump-alpha_linux-${LINUX_VERSION} ${DEST}/etc/kdump-${LINUX_VERSION} ;; \
        *linux* ) \
-               ${INSTALLex} -f kdump.sh.linux ${DESTDIR}${sbindir}/kdump; \
-               ${INSTALL} -s $? $@ ;; \
+               ${INSTALL_SCRIPT} ${srcdir}/kdump.sh.linux ${DEST}/etc/kdump; \
+               ${INSTALL_PROGRAM} kdump-linux-${LINUX_VERSION} ${DEST}/etc/kdump-${LINUX_VERSION} ;; \
        hp_ux11* ) \
-               ${INSTALLex} -f kdump.sh.hp_ux11 ${DESTDIR}${sbindir}/kdump; \
-               ${INSTALL} -s -f $? $@;; \
+               ${INSTALL_SCRIPT} ${srcdir}/kdump.sh.hp_ux11 ${DEST}/etc/kdump32; \
+               ${INSTALL_PROGRAM} kdump-build ${DEST}/etc/kdump ;; \
+       *bsd*) \
+               ;; \
        *) \
-               ${INSTALL} -s $? $@ ;; \
+               ${INSTALL_PROGRAM} kdump-build ${DEST}/etc/kdump ;; \
        esac
-
-${DESTDIR}${sbindir}/kdump64: kdump-build
        if [ -f kdump64 ]; then \
-               ${INSTALL} -s kdump64 $@; \
+               ${INSTALL_PROGRAM} kdump64 ${DEST}/etc/kdump; \
        fi
 
-dest: \
-       ${DEST}/bin/fs \
-       ${DEST}/bin/livesys \
-       ${DEST}/root.server/usr/afs/bin/fs \
-       ${DEST}/bin/up \
-       ${DEST}/etc/fstrace \
-       ${DEST}/bin/cmdebug \
-       ${DEST}/etc/kdump \
-       ${DEST}/etc/kdump64
+#
+# Misc targets
+#
+
+clean:
+       $(RM) -f *.o *.a up fs kdump-* kdump kdump64 core cmdebug \
+               AFS_component_version_number.c fstrace gcpags livesys dedebug \
+               cacheout afsio
 
+test:
+       cd test; $(MAKE)
+
+include ../config/Makefile.version