-
Notifications
You must be signed in to change notification settings - Fork 2
/
LTmakefile.in
318 lines (230 loc) · 10.2 KB
/
LTmakefile.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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
# Makefile to build QDBM using libtool
#================================================================
# Setting variables
#================================================================
# Generic settings
SHELL = @SHELL@
# Packaging
PACKAGE = @PACKAGE_NAME@
VERSION = @PACKAGE_VERSION@
LIBVER = @LIBVER@
LIBREV = @LIBREV@
# Targets
MYHEADS = depot.h curia.h relic.h hovel.h cabin.h villa.h vista.h odeum.h
MYLIBOBJS = depot.lo curia.lo relic.lo hovel.lo cabin.lo villa.lo vista.lo odeum.lo myconf.lo
MYLIBS = libqdbm.la
MYBINS = dpmgr dptest dptsv crmgr crtest crtsv rlmgr rltest hvmgr hvtest \
cbtest cbcodec vlmgr vltest vltsv odmgr odtest odidx qmttest
MYMAN1S = dpmgr.1 dptest.1 dptsv.1 crmgr.1 crtest.1 crtsv.1 rlmgr.1 rltest.1 hvmgr.1 hvtest.1 \
cbtest.1 cbcodec.1 vlmgr.1 vltest.1 vltsv.1 odmgr.1 odtest.1 odidx.1 qmttest.1
MYMAN3S = qdbm.3 depot.3 dpopen.3 curia.3 cropen.3 relic.3 hovel.3 \
cabin.3 villa.3 vlopen.3 vista.3 odeum.3 odopen.3
MYDOCS = spex.html spex-ja.html COPYING ChangeLog NEWS THANKS
MYPCS = qdbm.pc
# Install destinations
prefix = @prefix@
exec_prefix = @exec_prefix@
MYHEADDIR = @includedir@
MYLIBDIR = @libdir@
MYBINDIR = @bindir@
MYMAN1DIR = @mandir@/man1
MYMAN3DIR = @mandir@/man3
MYSHAREDIR = $(prefix)/share/$(PACKAGE)
MYPCDIR = @libdir@/pkgconfig
# Building binaries
LIBTOOL = libtool
CC = gcc
CFLAGS = -I. -I$(MYHEADDIR) -I$(HOME)/include -I/usr/local/include @MYDEFS@ \
-D_XOPEN_SOURCE_EXTENDED=1 -D_GNU_SOURCE=1 -D__EXTENSIONS__=1 -D_HPUX_SOURCE=1 \
-D_POSIX_MAPPED_FILES=1 -D_POSIX_SYNCHRONIZED_IO=1 \
-DPIC=1 -D_THREAD_SAFE=1 -D_REENTRANT=1 -DNDEBUG -O3
LD = gcc
LIBLDFLAGS = -rpath $(MYLIBDIR) -R $(MYLIBDIR) \
-version-info $$(($(LIBVER)+$(LIBREV))):0:$(LIBREV) @LIBS@
LDFLAGS = -rpath $(MYLIBDIR) -R $(MYLIBDIR) -L. -lqdbm @LIBS@
INSTALL = install
MKDIR = mkdir -p
CP = cp -rf
RM = rm -rf
#================================================================
# Suffix rules
#================================================================
.SUFFIXES :
.SUFFIXES : .c .lo
.c.lo :
$(LIBTOOL) --mode=compile --tag=CC $(CC) -c $(CFLAGS) $<
#================================================================
# Actions
#================================================================
all : $(MYLIBS) $(MYBINS)
@printf '\n'
@printf '#================================================================\n'
@printf '# Ready to install.\n'
@printf '#================================================================\n'
clean :
$(RM) $(MYLIBS) $(MYBINS) *.o *.a *.so *.lo *.la a.out .libs \
*.exe *.dll.a *.dll TAGS srcdoc gmon.out leak.log casket casket.* *~
install :
$(LIBTOOL) --mode=install $(INSTALL) $(MYHEADS) $(MYHEADDIR)
$(LIBTOOL) --mode=install $(INSTALL) $(MYLIBS) $(MYLIBDIR)
$(LIBTOOL) --mode=install $(INSTALL) $(MYBINS) $(MYBINDIR)
$(MKDIR) $(MYMAN1DIR)
cd man && $(CP) $(MYMAN1S) $(MYMAN1DIR)
$(MKDIR) $(MYMAN3DIR)
cd man && $(CP) $(MYMAN3S) $(MYMAN3DIR)
$(MKDIR) $(MYSHAREDIR)
$(CP) $(MYDOCS) $(MYSHAREDIR)
$(MKDIR) $(MYPCDIR)
$(CP) $(MYPCS) $(MYPCDIR)
@printf '\n'
@printf '#================================================================\n'
@printf '# Thanks for using QDBM.\n'
@printf '#================================================================\n'
uninstall :
cd $(MYHEADDIR) && $(LIBTOOL) --mode=uninstall $(RM) $(MYHEADS)
cd $(MYLIBDIR) && $(LIBTOOL) --mode=uninstall $(RM) $(MYLIBS)
cd $(MYBINDIR) && $(LIBTOOL) --mode=uninstall $(RM) $(MYBINS)
cd $(MYMAN1DIR) && $(RM) $(MYMAN1S)
cd $(MYMAN3DIR) && $(RM) $(MYMAN3S)
$(RM) $(MYSHAREDIR)
cd $(MYPCDIR) && $(RM) $(MYPCS)
distclean : clean
$(RM) Makefile LTmakefile rpmspec config.cache config.log config.status autom4te.cache
check :
$(RM) casket*
$(LIBTOOL) --mode=execute ./dptest write -s casket 500 500000
$(LIBTOOL) --mode=execute ./dptest write casket 50000 5000
$(LIBTOOL) --mode=execute ./dptest read casket
$(LIBTOOL) --mode=execute ./dptest read -wb casket
$(LIBTOOL) --mode=execute ./dptest rcat -c casket 50000 50 500 32 8
$(LIBTOOL) --mode=execute ./dptest combo casket
$(LIBTOOL) --mode=execute ./dptest wicked -c casket 5000
$(LIBTOOL) --mode=execute ./dptest wicked casket 500
$(LIBTOOL) --mode=execute ./dpmgr repair casket
$(LIBTOOL) --mode=execute ./dpmgr optimize casket
$(LIBTOOL) --mode=execute ./dpmgr list casket
$(RM) casket*
$(LIBTOOL) --mode=execute ./crtest write -s casket 500 100000 5
$(LIBTOOL) --mode=execute ./crtest write casket 50000 500 10
$(LIBTOOL) --mode=execute ./crtest read casket
$(LIBTOOL) --mode=execute ./crtest read -wb casket
$(LIBTOOL) --mode=execute ./crtest rcat -c casket 50000 5 10 500 32 8
$(LIBTOOL) --mode=execute ./crtest combo casket
$(LIBTOOL) --mode=execute ./crtest wicked -c casket 5000
$(LIBTOOL) --mode=execute ./crtest wicked casket 500
$(LIBTOOL) --mode=execute ./crmgr repair casket
$(LIBTOOL) --mode=execute ./crmgr optimize casket
$(LIBTOOL) --mode=execute ./crmgr list casket
$(RM) casket*
$(LIBTOOL) --mode=execute ./crtest write -lob casket 1000 50 10
$(LIBTOOL) --mode=execute ./crtest read -lob casket
$(RM) casket*
$(LIBTOOL) --mode=execute ./rltest write casket 5000
$(LIBTOOL) --mode=execute ./rltest read casket 5000
$(LIBTOOL) --mode=execute ./rlmgr list casket
$(RM) casket*
$(LIBTOOL) --mode=execute ./hvtest write casket 5000
$(LIBTOOL) --mode=execute ./hvtest read casket 5000
$(LIBTOOL) --mode=execute ./hvmgr optimize casket
$(LIBTOOL) --mode=execute ./hvmgr list casket
$(RM) casket*
$(LIBTOOL) --mode=execute ./hvtest write -qdbm -s casket 500
$(LIBTOOL) --mode=execute ./hvtest write -qdbm casket 5000
$(LIBTOOL) --mode=execute ./hvtest read -qdbm casket 5000
$(RM) casket*
$(LIBTOOL) --mode=execute ./cbtest sort 5000
$(LIBTOOL) --mode=execute ./cbtest strstr 500
$(LIBTOOL) --mode=execute ./cbtest list 50000
$(LIBTOOL) --mode=execute ./cbtest list -d 500
$(LIBTOOL) --mode=execute ./cbtest map 50000 500
$(LIBTOOL) --mode=execute ./cbtest map -d 500 5
$(LIBTOOL) --mode=execute ./cbtest heap 50000 500
$(LIBTOOL) --mode=execute ./cbtest heap -d 500 50
$(LIBTOOL) --mode=execute ./cbtest wicked 5000
$(LIBTOOL) --mode=execute ./cbtest misc
$(RM) casket*
$(LIBTOOL) --mode=execute ./vltest write -tune 32 31 32 32 casket 50000
$(LIBTOOL) --mode=execute ./vltest read casket
$(LIBTOOL) --mode=execute ./vltest rdup -tune 32 31 512 256 casket 50000 50000
$(LIBTOOL) --mode=execute ./vltest combo casket
$(LIBTOOL) --mode=execute ./vltest wicked -c casket 5000
$(LIBTOOL) --mode=execute ./vltest wicked casket 500
$(LIBTOOL) --mode=execute ./vlmgr repair casket
$(LIBTOOL) --mode=execute ./vlmgr optimize casket
$(LIBTOOL) --mode=execute ./vlmgr list casket
$(RM) casket*
$(LIBTOOL) --mode=execute ./vltest write -int -cz -tune 32 31 32 32 casket 50000
$(LIBTOOL) --mode=execute ./vltest read -int -vc casket
$(LIBTOOL) --mode=execute ./vltest rdup -int -cz -cc -tune 32 31 512 256 casket 50000 50000
$(LIBTOOL) --mode=execute ./vltest combo -cz casket
$(LIBTOOL) --mode=execute ./vltest wicked -cz -c casket 5000
$(LIBTOOL) --mode=execute ./vltest combo -cy casket
$(LIBTOOL) --mode=execute ./vltest wicked -cy -c casket 5000
$(LIBTOOL) --mode=execute ./vltest combo -cx casket
$(LIBTOOL) --mode=execute ./vltest wicked -cx -c casket 5000
$(RM) casket*
$(LIBTOOL) --mode=execute ./odtest write casket 500 50 5000
$(LIBTOOL) --mode=execute ./odtest read casket
$(LIBTOOL) --mode=execute ./odtest combo casket
$(LIBTOOL) --mode=execute ./odtest wicked casket 500
$(RM) casket*
$(LIBTOOL) --mode=execute ./qmttest casket 50000 10
$(RM) casket*
@printf '\n'
@printf '#================================================================\n'
@printf '# Checking completed.\n'
@printf '#================================================================\n'
.PHONY : all clean install check
#================================================================
# Building binaries
#================================================================
libqdbm.la : $(MYLIBOBJS)
$(LIBTOOL) --mode=link --tag=CC $(LD) $(MYLIBOBJS) -o $@ $(LIBLDFLAGS)
dpmgr : dpmgr.lo $(MYLIBS)
$(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ dpmgr.lo $(LDFLAGS)
dptest : dptest.lo $(MYLIBS)
$(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ dptest.lo $(LDFLAGS)
dptsv : dptsv.lo $(MYLIBS)
$(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ dptsv.lo $(LDFLAGS)
crmgr : crmgr.lo $(MYLIBS)
$(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ crmgr.lo $(LDFLAGS)
crtest : crtest.lo $(MYLIBS)
$(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ crtest.lo $(LDFLAGS)
crtsv : crtsv.lo $(MYLIBS)
$(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ crtsv.lo $(LDFLAGS)
rlmgr : rlmgr.lo $(MYLIBS)
$(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ rlmgr.lo $(LDFLAGS)
rltest : rltest.lo $(MYLIBS)
$(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ rltest.lo $(LDFLAGS)
hvmgr : hvmgr.lo $(MYLIBS)
$(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ hvmgr.lo $(LDFLAGS)
hvtest : hvtest.lo $(MYLIBS)
$(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ hvtest.lo $(LDFLAGS)
cbtest : cbtest.lo $(MYLIBS)
$(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ cbtest.lo $(LDFLAGS)
cbcodec : cbcodec.lo $(MYLIBS)
$(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ cbcodec.lo $(LDFLAGS)
vlmgr : vlmgr.lo $(MYLIBS)
$(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ vlmgr.lo $(LDFLAGS)
vltest : vltest.lo $(MYLIBS)
$(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ vltest.lo $(LDFLAGS)
vltsv : vltsv.lo $(MYLIBS)
$(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ vltsv.lo $(LDFLAGS)
odmgr : odmgr.lo $(MYLIBS)
$(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ odmgr.lo $(LDFLAGS)
odtest : odtest.lo $(MYLIBS)
$(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ odtest.lo $(LDFLAGS)
odidx : odidx.lo $(MYLIBS)
$(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ odidx.lo $(LDFLAGS)
qmttest : qmttest.lo $(MYLIBS)
$(LIBTOOL) --mode=link --tag=CC $(LD) -o $@ qmttest.lo $(LDFLAGS)
depot.lo dpmgr.lo dptest.lo dptsv.lo : depot.h myconf.h
curia.lo crmgr.lo crtest.lo crtsv.lo : curia.h depot.h myconf.h
relic.lo rlmgr.lo rltest.lo : relic.h depot.h myconf.h
hovel.lo hvmgr.lo hvtest.lo : hovel.h depot.h curia.h myconf.h
cabin.lo cbtest.lo : cabin.h myconf.h
villa.lo vlmgr.lo vltest.lo vltsv.lo : villa.h depot.h cabin.h myconf.h
vista.lo : vista.h villa.h depot.h curia.h cabin.h myconf.h villa.c
odeum.lo odmgr.lo odtest.lo odidx.lo : odeum.h depot.h curia.h cabin.h villa.h myconf.h
myconf.lo : myconf.h
# END OF FILE