bindir=@bindir@
mandir=@mandir@
datadir=@datadir@
+XSLTPROC = /usr/bin/xsltproc
INSTALLCMD=@INSTALL@
-LIBS=@LIBS@ -lpopt
+LIBS=@LIBS@ -lpopt -lz -lsmbclient
CC=@CC@
CFLAGS=@CFLAGS@ -I. -DVERSION=\"$(VERSION)\" -DDATADIR=\"$(datadir)\"
LIBNFS_OBJ = libnfs.o mount_client.o nfs_client.o mount_xdr.o nfs_xdr.o
-DB_OBJS = fileio.o util.o dbench.o child.o system.o snprintf.o
-TB_OBJS = sockio.o util.o dbench.o child.o socklib.o snprintf.o
-NFS_OBJS = nfsio.o util.o dbench.o child.o socklib.o snprintf.o libnfs.a
+DB_OBJS = fileio.o util.o dbench.o child.o system.o snprintf.o sockio.o nfsio.o libnfs.a socklib.o linux_scsi.o iscsi.o smb.o
SRV_OBJS = util.o tbench_srv.o socklib.o
-all: dbench tbench tbench_srv nfsbench
+all: dbench tbench nfsbench tbench_srv doc
dbench: $(DB_OBJS)
$(CC) -o $@ $(DB_OBJS) $(LIBS)
-tbench: $(TB_OBJS)
- $(CC) -o $@ $(TB_OBJS) $(LIBS)
-
tbench_srv: $(SRV_OBJS)
$(CC) -o $@ $(SRV_OBJS) $(LIBS)
-nfsbench: $(NFS_OBJS)
- $(CC) -o $@ $(NFS_OBJS) $(LIBS)
+tbench: dbench
+ ln -sf dbench tbench
+nfsbench: dbench
+ ln -sf dbench nfsbench
libnfs.a: $(LIBNFS_OBJ)
@echo Creating library $@
@echo Generating $@
rpcgen -l nfs.x > nfs_client.c
+doc/dbench.1.html: doc/dbench.1.xml
+ -test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
+
+doc/dbench.1: doc/dbench.1.xml
+ -test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
+
+doc: doc/dbench.1 doc/dbench.1.html
# Careful here: don't install client.txt over itself.
install: all
${INSTALLCMD} -d $(bindir) $(datadir) $(mandir)
- ${INSTALLCMD} dbench tbench tbench_srv $(bindir)
- ${INSTALLCMD} client.txt $(datadir)
+ ${INSTALLCMD} dbench tbench_srv $(bindir)
+ ${INSTALLCMD} loadfiles/client.txt $(datadir)
+ ${INSTALLCMD} loadfiles/nfs.txt $(datadir)
${INSTALLCMD} -m644 dbench.1 $(mandir)
ln -sf dbench.1 $(mandir)/tbench.1
ln -sf dbench.1 $(mandir)/tbench_srv.1
+ ln -sf $(bindir)/dbench $(bindir)/tbench
+ ln -sf $(bindir)/dbench $(bindir)/nfsbench
clean:
- rm -f *.o *~ dbench tbench tbench_srv libnfs.a
+ rm -f *.[ao] *~ dbench tbench_srv
rm -f mount.h mount_xdr.c mount_client.c
rm -f nfs.h nfs_xdr.c nfs_client.c