-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
131 lines (100 loc) · 3.35 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
VERSION=4.00
srcdir=@srcdir@
VPATH=@srcdir@
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
mandir=@mandir@
datadir=@datadir@
docdir=@datadir@/doc/dbench
XSLTPROC = /usr/bin/xsltproc
INSTALLCMD=@INSTALL@
LIBS=@LIBS@ -lpopt -lz @LIBSMBCLIENT@
DESTDIR=/
CC=@CC@
CFLAGS=@CFLAGS@ -I. -DVERSION=\"$(VERSION)\" -DDATADIR=\"$(datadir)\"
EXEEXT=@EXEEXT@
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 sockio.o nfsio.o libnfs.a socklib.o @LINUXSCSI@ iscsi.o @SMBO@
SRV_OBJS = util.o tbench_srv.o socklib.o
all: dbench doc comm
comm: comm_create comm_remove comm_write
comm_create: $(DB_OBJS) comm.h
$(CC) -o $@ comm_create.c $(LIBS) $(LIBNFS_OBJ)
comm_remove: $(DB_OBJS) comm.h
$(CC) -o $@ comm_remove.c $(LIBS) $(LIBNFS_OBJ)
comm_write: $(DB_OBJS) comm.h
$(CC) -o $@ comm_write.c $(LIBS) $(LIBNFS_OBJ)
dbench: $(DB_OBJS)
$(CC) -o $@ $(DB_OBJS) $(LIBS)
tbench_srv: $(SRV_OBJS)
$(CC) -o $@ $(SRV_OBJS) $(LIBS)
tbench: dbench
ln -sf dbench tbench
libnfs.a: $(LIBNFS_OBJ)
@echo Creating library $@
ar r libnfs.a $(LIBNFS_OBJ)
ranlib libnfs.a
nfsio.o: nfsio.c mount.h nfs.h
@echo Compiling $@
gcc -g -c nfsio.c -o $@
libnfs.o: libnfs.c libnfs.h mount.h nfs.h
@echo Compiling $@
gcc -g -c libnfs.c -o $@
mount.h: mount.x
@echo Generating $@
rpcgen -h mount.x > mount.h
nfs.h: nfs.x
@echo Generating $@
rpcgen -h nfs.x > nfs.h
mount_xdr.o: mount_xdr.c mount.h
@echo Compiling $@
gcc -g -c mount_xdr.c -o $@
mount_xdr.c: mount.x
@echo Generating $@
rpcgen -c mount.x > mount_xdr.c
mount_client.o: mount_client.c mount.h
@echo Compiling $@
gcc -g -c mount_client.c -o $@
mount_client.c: mount.x
@echo Generating $@
rpcgen -l mount.x > mount_client.c
nfs_xdr.o: nfs_xdr.c nfs.h
@echo Compiling $@
gcc -g -c nfs_xdr.c -o $@
nfs_xdr.c: nfs.x
@echo Generating $@
rpcgen -c nfs.x > nfs_xdr.c
nfs_client.o: nfs_client.c nfs.h
@echo Compiling $@
gcc -g -c nfs_client.c -o $@
nfs_client.c: nfs.x
@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
mkdir -p $(DESTDIR)$(bindir)
mkdir -p $(DESTDIR)$(docdir)/loadfiles
mkdir -p $(DESTDIR)$(mandir)/man1
${INSTALLCMD} dbench $(DESTDIR)$(bindir)
${INSTALLCMD} loadfiles/client.txt $(DESTDIR)$(docdir)/loadfiles
${INSTALLCMD} loadfiles/nfs.txt $(DESTDIR)$(docdir)/loadfiles
${INSTALLCMD} loadfiles/nfs_2.txt $(DESTDIR)$(docdir)/loadfiles
${INSTALLCMD} loadfiles/smb.txt $(DESTDIR)$(docdir)/loadfiles
${INSTALLCMD} loadfiles/smb_1.txt $(DESTDIR)$(docdir)/loadfiles
${INSTALLCMD} loadfiles/smb_2.txt $(DESTDIR)$(docdir)/loadfiles
${INSTALLCMD} loadfiles/smb_3.txt $(DESTDIR)$(docdir)/loadfiles
${INSTALLCMD} loadfiles/iscsi.txt $(DESTDIR)$(docdir)/loadfiles
${INSTALLCMD} loadfiles/scsi.txt $(DESTDIR)$(docdir)/loadfiles
${INSTALLCMD} -m644 dbench.1 $(DESTDIR)$(mandir)/man1
clean:
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
proto:
./mkproto.pl *.c > proto.h