check curses-libs by configure
[openafs.git] / src / afsmonitor / Makefile.in
index 0e258a7..acc7820 100644 (file)
@@ -5,71 +5,64 @@
 # License.  For details, see the LICENSE file in the top-level source
 # directory or online at http://www.openafs.org/dl/license10.html
 
-# Makefile for Afsmonitor, the AFS Performance monitoring tool
-DESTDIR=@DESTDIR@
-SRCDIR=@SRCDIR@
-TOP_SRCDIR=@TOP_SRCDIR@
-SYS_NAME=@AFS_SYSNAME@
+srcdir=@srcdir@
+include @TOP_OBJDIR@/src/config/Makefile.config
+include @TOP_OBJDIR@/src/config/Makefile.lwp
 
-SHELL = /bin/sh
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
 
-include ../config/Makefile.${SYS_NAME}
-
-CFLAGS=-g -I. \
-       -I${TOP_SRCDIR}/config \
-       -I${SRCDIR}/include \
-       -I${SRCDIR}/include/afs \
-       -I${SRCDIR} ${XCFLAGS}
-LDFLAGS = ${XLDFLAGS}
-
-INCLS=${SRCDIR}/include/afs/gtxobjects.h \
-       ${SRCDIR}/include/afs/gtxwindows.h \
-       ${SRCDIR}/include/afs/gtxcurseswin.h \
-       ${SRCDIR}/include/afs/gtxdumbwin.h \
-       ${SRCDIR}/include/afs/gtxX11win.h \
-       ${SRCDIR}/include/afs/gtxobjects.h \
-       ${SRCDIR}/include/afs/gtxlightobj.h \
-       ${SRCDIR}/include/afs/gtxtextobj.h \
-       ${SRCDIR}/include/afs/gtxobjdict.h \
-       ${SRCDIR}/include/afs/keys.h \
-       ${SRCDIR}/include/afs/cellconfig.h \
-       ${SRCDIR}/include/afs/cmd.h \
-       ${SRCDIR}/include/afs/xstat_fs.h \
-       ${SRCDIR}/include/afs/xstat_cm.h \
+INCLS=${TOP_INCDIR}/afs/gtxobjects.h \
+       ${TOP_INCDIR}/afs/gtxwindows.h \
+       ${TOP_INCDIR}/afs/gtxcurseswin.h \
+       ${TOP_INCDIR}/afs/gtxdumbwin.h \
+       ${TOP_INCDIR}/afs/gtxX11win.h \
+       ${TOP_INCDIR}/afs/gtxobjects.h \
+       ${TOP_INCDIR}/afs/gtxlightobj.h \
+       ${TOP_INCDIR}/afs/gtxtextobj.h \
+       ${TOP_INCDIR}/afs/gtxobjdict.h \
+       ${TOP_INCDIR}/afs/keys.h \
+       ${TOP_INCDIR}/afs/cellconfig.h \
+       ${TOP_INCDIR}/afs/cmd.h \
+       ${TOP_INCDIR}/afs/xstat_fs.h \
+       ${TOP_INCDIR}/afs/xstat_cm.h \
        afsmonitor.h \
        afsmon-labels.h
-LIBS=${SRCDIR}/lib/afs/libxstat_fs.a \
-       ${SRCDIR}/lib/afs/libxstat_cm.a \
-       ${SRCDIR}/lib/afs/libgtx.a \
-       ${SRCDIR}/lib/afs/libafsint.a \
-       ${SRCDIR}/lib/afs/libcmd.a \
-       ${SRCDIR}/lib/librx.a \
-       ${SRCDIR}/lib/liblwp.a \
-       ${SRCDIR}/lib/afs/libsys.a \
-       ${SRCDIR}/lib/afs/util.a 
+LIBS=${TOP_LIBDIR}/libxstat_fs.a \
+       ${TOP_LIBDIR}/libxstat_cm.a \
+       ${TOP_LIBDIR}/libgtx.a \
+       ${TOP_LIBDIR}/libafsint.a \
+       ${TOP_LIBDIR}/libcmd.a \
+       ${TOP_LIBDIR}/librx.a \
+       ${TOP_LIBDIR}/liblwp.a \
+       ${TOP_LIBDIR}/libsys.a \
+       ${TOP_LIBDIR}/util.a
 
-EXTRA_LIBS= ${TXLIBS} ${SRCDIR}/lib/afs/libtermlib.a  ${XLIBS} 
+EXTRA_LIBS=${LIB_curses} ${XLIBS}
 
-all: afsmonitor 
-system: install
+all: afsmonitor
 
 afsmon-output.o: afsmon-output.c ${INCLS}
 afsmon-win.o: afsmon-win.c ${INCLS}
 afsmonitor.o: afsmonitor.c ${INCLS} AFS_component_version_number.c
 
 afsmonitor: afsmonitor.o afsmon-win.o afsmon-output.o ${LIBS}
-       ${CC} ${LDFLAGS} -o afsmonitor afsmonitor.o afsmon-win.o \
-               afsmon-output.o ${LIBS} ${EXTRA_LIBS}
+       $(AFS_LDRULE) afsmonitor.o afsmon-win.o afsmon-output.o \
+               ${LIBS} $(LIB_roken) ${EXTRA_LIBS}
 
 afsmon-parselog:  afsmon-parselog.o ${LIBS}
-       ${CC} ${CFLAGS} -o afsmon-parselog afsmon-parselog.c \
-               ${LIBS} ${EXTRA_LIBS}
+       $(AFS_LDRULE) afsmon-parselog.c \
+               ${LIBS} $(LIB_roken) ${EXTRA_LIBS}
+
+install: afsmonitor
+       ${INSTALL} -d ${DESTDIR}${bindir}
+       ${INSTALL_PROGRAM} afsmonitor ${DESTDIR}${bindir}/afsmonitor
 
-#
-# Misc others
-#
-install: all
-       ${INSTALL} afsmonitor ${DESTDIR}/bin
+dest: afsmonitor
+       ${INSTALL} -d ${DEST}/bin
+       ${INSTALL_PROGRAM} afsmonitor ${DEST}/bin/afsmonitor
 
 clean:
        $(RM) -f *.o afsmonitor AFS_component_version_number.c