1 |
dpavlin |
237 |
# |
2 |
|
|
#/* |
3 |
|
|
# openisis - an open implementation of the CDS/ISIS database |
4 |
|
|
# Version 0.8.x (patchlevel see file Version) |
5 |
|
|
# Copyright (C) 2001-2003 by Erik Grziwotz, erik@openisis.org |
6 |
|
|
# |
7 |
|
|
# This library is free software; you can redistribute it and/or |
8 |
|
|
# modify it under the terms of the GNU Lesser General Public |
9 |
|
|
# License as published by the Free Software Foundation; either |
10 |
|
|
# version 2.1 of the License, or (at your option) any later version. |
11 |
|
|
# |
12 |
|
|
# This library is distributed in the hope that it will be useful, |
13 |
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 |
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 |
|
|
# Lesser General Public License for more details. |
16 |
|
|
# |
17 |
|
|
# You should have received a copy of the GNU Lesser General Public |
18 |
|
|
# License along with this library; if not, write to the Free Software |
19 |
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 |
|
|
# |
21 |
|
|
# see README for more information |
22 |
|
|
#EOH */ |
23 |
|
|
# |
24 |
|
|
# |
25 |
|
|
# $Id: Makefile,v 1.92 2003/06/30 09:59:35 kripke Exp $ |
26 |
|
|
# the Makefile |
27 |
|
|
# |
28 |
|
|
|
29 |
|
|
TARGETS=$(BINARY) ois |
30 |
|
|
|
31 |
|
|
# some require explicit ST or MT build, other targets work with both |
32 |
|
|
# O switchable directory for binaries; one of |
33 |
|
|
# sto for single threaded unix (used by Perl, PHP, Tcl) |
34 |
|
|
# mto for multi threaded unix (used by Java, Tcl) |
35 |
|
|
# win for gates of hell (used by general failure) |
36 |
|
|
# |
37 |
|
|
# sto or win |
38 |
|
|
STO=sto |
39 |
|
|
# sto, mto or win |
40 |
|
|
O=sto |
41 |
|
|
|
42 |
|
|
MTFLAGS= |
43 |
|
|
MTLIBS= |
44 |
|
|
ifneq ($(WIN32),) |
45 |
|
|
STO=win |
46 |
|
|
O=win |
47 |
|
|
# don't support MT on windows -- Java or PHP must connect server |
48 |
|
|
MTFLAGS= |
49 |
|
|
EXE=.exe |
50 |
|
|
else |
51 |
|
|
ifneq ($(MT),) |
52 |
|
|
O=mto |
53 |
|
|
MTFLAGS=-D_REENTRANT |
54 |
|
|
MTLIBS=-lpthread |
55 |
|
|
endif |
56 |
|
|
endif |
57 |
|
|
|
58 |
|
|
BINARY=$(O)/openisis$(EXE) |
59 |
|
|
JTARGETS=openisis.jar mto/libopenjsis.so |
60 |
|
|
# object files in lib |
61 |
|
|
LOBJS=lstr.o ldb.o lrec.o lfmt.o luti.o lio.o lqry.o lbt.o lcs.o lses.o lfdt.o lstb.o ldsp.o lcli.o lenc.o leva.o |
62 |
|
|
# object files in server lib |
63 |
|
|
LSVOBJS=$(O)/lsv.o |
64 |
|
|
# classes in jar |
65 |
|
|
ifeq ($(J2EE),) |
66 |
|
|
EECLASSES= |
67 |
|
|
else |
68 |
|
|
# additional utilities requiring at least basic j2ee libs javax.mail, org.xml |
69 |
|
|
# you might have to add something like that to your CLASSPATH |
70 |
|
|
# /opt/tomcat/common/lib/mail.jar:/opt/tomcat/common/lib/activation.jar:/opt/tomcat/common/lib/xerces.jar |
71 |
|
|
EECLASSES=Mail RecToXml XmlToRec XmlTest |
72 |
|
|
endif |
73 |
|
|
CLASSES=Field Rec Db NativeDb PureDb Test Charset Fdt \ |
74 |
|
|
PlainSerializer Utils $(EECLASSES) |
75 |
|
|
XSUB=perl/blib/arch/auto/OpenIsis/OpenIsis.so |
76 |
|
|
|
77 |
|
|
# standard make defines |
78 |
|
|
CC=gcc |
79 |
|
|
RANLIB=ranlib |
80 |
|
|
|
81 |
|
|
# you may want to try jikes |
82 |
|
|
JC=javac |
83 |
|
|
|
84 |
|
|
# figure out where to find JNI ... |
85 |
|
|
ifeq ($(JNIINC),) |
86 |
|
|
ifeq ($(JAVAHOME),) |
87 |
|
|
JAVAHOME=/usr/java/jdk1.3 |
88 |
|
|
endif |
89 |
|
|
JNIINC=-I$(JAVAHOME)/include -I$(JAVAHOME)/include/linux |
90 |
|
|
endif |
91 |
|
|
|
92 |
|
|
# running openisis |
93 |
|
|
OPENISIS=$(BINARY) |
94 |
|
|
RUNJAVA=LD_LIBRARY_PATH=mto java -classpath openisis.jar:$(CLASSPATH) |
95 |
|
|
|
96 |
|
|
ifneq ($(WIN32),) |
97 |
|
|
JTARGETS=openisis.jar openjsis.dll |
98 |
|
|
# Note that console output redirection doesn't work well |
99 |
|
|
# older wine 20010731 often croaks "FIXME:pthread_rwlock_rdlock" |
100 |
|
|
# since 200111*, console output didn't work at all |
101 |
|
|
# some versions should support wine -console tty |
102 |
|
|
OPENISIS=wine -- win/openisis |
103 |
|
|
include make.mingw |
104 |
|
|
tclsubdir=win |
105 |
|
|
endif |
106 |
|
|
|
107 |
|
|
|
108 |
|
|
|
109 |
|
|
# DBG= |
110 |
|
|
ifeq ($(NDEBUG),) |
111 |
|
|
DBG=-g |
112 |
|
|
else |
113 |
|
|
DBG=-DNDEBUG |
114 |
|
|
endif |
115 |
|
|
# ARCH=-march=i586 |
116 |
|
|
|
117 |
|
|
|
118 |
|
|
# compile |
119 |
|
|
CPPFLAGS= |
120 |
|
|
# note that -O is necessary for -Wuninitialized warnings |
121 |
|
|
# -fstack-check ??? |
122 |
|
|
ifeq (,$(WIN32)) |
123 |
|
|
PIC=-fPIC |
124 |
|
|
else |
125 |
|
|
PIC= |
126 |
|
|
endif |
127 |
|
|
CFLAGS=$(DBG) -O2 -Wall -W -Wshadow -pedantic -Wno-long-long $(PIC) |
128 |
|
|
|
129 |
|
|
|
130 |
|
|
|
131 |
|
|
# ############################# link ################################## |
132 |
|
|
# common linker flags |
133 |
|
|
LDFLAGS= |
134 |
|
|
|
135 |
|
|
# link statically from openisis.a |
136 |
|
|
# do not use -static, since we don't want to slurp in libc |
137 |
|
|
LDSTATIC=$(LDFLAGS) |
138 |
|
|
|
139 |
|
|
# create shared object |
140 |
|
|
LDSHARED=$(LDFLAGS) -shared -Wl,-init,openIsisInit,-fini,openIsisFini |
141 |
|
|
|
142 |
|
|
# link using shared object - the default |
143 |
|
|
LDDYNAM=$(LDFLAGS) |
144 |
|
|
|
145 |
|
|
SYSLIBS= |
146 |
|
|
ifeq (solaris,$(OSTYPE)) |
147 |
|
|
# rt for nanosleep |
148 |
|
|
SYSLIBS=-lrt -lsocket -lnsl |
149 |
|
|
endif |
150 |
|
|
LDLIBS=$(SYSLIBS) |
151 |
|
|
|
152 |
|
|
|
153 |
|
|
# DB to use -- define DB for db/DB/DB, or DBDIR for other path |
154 |
|
|
ifeq ($(DB),) |
155 |
|
|
DB=cds |
156 |
|
|
endif |
157 |
|
|
ifeq ($(DBDIR),) |
158 |
|
|
DBDIR=db/$(DB)/$(DB) |
159 |
|
|
endif |
160 |
|
|
|
161 |
|
|
# single and multi threaded objects |
162 |
|
|
STOBJS=$(LOBJS:l%=$(STO)/l%) |
163 |
|
|
MTOBJS=$(LOBJS:l%=mto/l%) |
164 |
|
|
|
165 |
|
|
|
166 |
|
|
|
167 |
|
|
# ############################# targets ################################## |
168 |
|
|
# |
169 |
|
|
# standard default target |
170 |
|
|
all: $(TARGETS) |
171 |
|
|
|
172 |
|
|
.PHONY: all clean run demo lstbtest lrectest perl jar java jdoc tcl tk |
173 |
|
|
# do not delete intermediates |
174 |
|
|
.PRECIOUS: org/openisis/%.java %.class %.h |
175 |
|
|
|
176 |
|
|
clean: |
177 |
|
|
rm -rf sto mto win *.jar *.tmp *.exp org/openisis/*.class core jdoc Makefile.old testout.txt |
178 |
|
|
[ ! -f perl/Makefile ] || make -C perl clean |
179 |
|
|
make -C tcl clean |
180 |
|
|
|
181 |
|
|
$(O)/libopenisis.a: $(LOBJS:l%=$(O)/l%) |
182 |
|
|
$(AR) $(ARFLAGS) $@ $^ |
183 |
|
|
$(RANLIB) $@ |
184 |
|
|
|
185 |
|
|
$(O)/libopenisis.so: $(LOBJS:l%=$(O)/l%) |
186 |
|
|
$(CC) $(LDSHARED) $(LDLIBS) -o $@ $^ |
187 |
|
|
|
188 |
|
|
$(O)/liboisrv.a: $(LSVOBJS) |
189 |
|
|
$(AR) $(ARFLAGS) $@ $^ |
190 |
|
|
$(RANLIB) $@ |
191 |
|
|
|
192 |
|
|
$(O)/openisis$(EXE): $(O)/openisis.o $(O)/libopenisis.a |
193 |
|
|
$(CC) $(DBG) $(LDSTATIC) $(LDLIBS) $(MTLIBS) -o $@ $^ |
194 |
|
|
|
195 |
|
|
shared: $(O)/openisis.o $(O)/libopenisis.so |
196 |
|
|
$(CC) $(DBG) $(LDDYNAM) -o $(O)/openisis $^ |
197 |
|
|
|
198 |
|
|
win32: |
199 |
|
|
@ $(MAKE) --no-print-directory WIN32=sorry |
200 |
|
|
|
201 |
|
|
|
202 |
|
|
|
203 |
|
|
# ########################## demos and tests ############################### |
204 |
|
|
# |
205 |
|
|
demo: $(O)/demo |
206 |
|
|
$(O)/demo -db $(DBDIR) 42 |
207 |
|
|
|
208 |
|
|
$(O)/demo: $(O)/demo.o $(O)/libopenisis.a |
209 |
|
|
$(CC) $(DBG) -o $@ $^ |
210 |
|
|
|
211 |
|
|
lrectest: $(O)/lrectest |
212 |
|
|
$(O)/lrectest |
213 |
|
|
|
214 |
|
|
$(O)/lrectest: $(O)/lrectest.o $(O)/libopenisis.a |
215 |
|
|
$(CC) $(DBG) $(LDLIBS) -o $@ $^ |
216 |
|
|
|
217 |
|
|
lstbtest: $(O)/lstbtest |
218 |
|
|
$(O)/lstbtest |
219 |
|
|
|
220 |
|
|
$(O)/lstbtest: $(O)/lstbtest.o $(O)/libopenisis.a |
221 |
|
|
$(CC) $(DBG) $(LDLIBS) -o $@ $^ |
222 |
|
|
|
223 |
|
|
$(STO)/oipl: oipl.c |
224 |
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) -rdynamic -ldl -o $@ $^ |
225 |
|
|
|
226 |
|
|
ois: $(O)/ois |
227 |
|
|
: |
228 |
|
|
|
229 |
|
|
$(O)/ois: $(O)/ois.o $(O)/libopenisis.a $(O)/liboisrv.a |
230 |
|
|
$(CC) $(LDSTATIC) $^ $(LDLIBS) $(MTLIBS) -o $@ |
231 |
|
|
|
232 |
|
|
|
233 |
|
|
run: $(BINARY) |
234 |
|
|
$(OPENISIS) -v $${V:-warn} -db $(DBDIR) $(FMT) 2>&1 | less |
235 |
|
|
|
236 |
|
|
dump: $(BINARY) |
237 |
|
|
$(OPENISIS) -v $${V:-warn} -db $(DBDIR) $(FMT) |
238 |
|
|
|
239 |
|
|
recode: $(BINARY) |
240 |
|
|
$(OPENISIS) -v $${V:-warn} -db $(DBDIR) $(FMT) | recode 850/..Latin-1 |
241 |
|
|
|
242 |
|
|
check: $(BINARY) |
243 |
|
|
$(OPENISIS) -v $${V:-warn} -db $(DBDIR) -check |
244 |
|
|
|
245 |
|
|
search: $(BINARY) |
246 |
|
|
$(OPENISIS) -v $${V:-warn} -search 'development$$' -db $(DBDIR) $(FMT) 2>&1 | less |
247 |
|
|
|
248 |
|
|
searchdump: $(BINARY) |
249 |
|
|
$(OPENISIS) -v $${V:-warn} -search '$$' -db $(DBDIR) $(FMT) 2>&1 |
250 |
|
|
|
251 |
|
|
terms: $(BINARY) |
252 |
|
|
$(OPENISIS) -v $${V:-warn} -terms '$$' -db $(DBDIR) $(FMT) 2>&1 | less |
253 |
|
|
|
254 |
|
|
test: $(BINARY) |
255 |
|
|
$(OPENISIS) -scan development -fmt prop -db $(DBDIR) >testout.txt |
256 |
|
|
$(OPENISIS) -terms '$$' -fmt prop -db $(DBDIR) >>testout.txt |
257 |
|
|
$(OPENISIS) -search 'devel$$' -fmt mfnf -db $(DBDIR) >>testout.txt |
258 |
|
|
diff testout.txt testres.txt |
259 |
|
|
|
260 |
|
|
crash: $(BINARY) |
261 |
|
|
time $(OPENISIS) -v $${V:-warn} -crash 'Z$$' -db db/unesb/unesb |
262 |
|
|
|
263 |
|
|
searchtest: $(BINARY) |
264 |
|
|
$(OPENISIS) -v $${V:-warn} -fmt mfnf -search 'a$$' -db $(DBDIR) $(FMT) >testout.txt |
265 |
|
|
diff testout.txt searchtest.txt |
266 |
|
|
|
267 |
|
|
pftest: $(BINARY) |
268 |
|
|
$(OPENISIS) -v $${V:-warn} -search 'Dacca' -db $(DBDIR) \ |
269 |
|
|
-pft "$${PFT:-`cat test.pft`}" |
270 |
|
|
|
271 |
|
|
shsearch: shared |
272 |
|
|
LD_LIBRARY_PATH=$(O) $(OPENISIS) -v $${V:-debug} -search development -db $(DBDIR) $(FMT) 2>&1 | less |
273 |
|
|
|
274 |
|
|
# take your time :) |
275 |
|
|
time: $(BINARY) |
276 |
|
|
free |
277 |
|
|
time $(OPENISIS) -perf 100000 -db $(DBDIR) >/dev/null |
278 |
|
|
free |
279 |
|
|
|
280 |
|
|
# time results for the unesb perf test differ dramatically |
281 |
|
|
# depending on the working of operating system caching |
282 |
|
|
# you may achive about 0.40 sec (12.000 recs per sec) |
283 |
|
|
# but immediatly after timing the cds, |
284 |
|
|
# the same test may take more than 40 sec |
285 |
|
|
utime: $(BINARY) |
286 |
|
|
free |
287 |
|
|
time $(OPENISIS) -perf 5000 -db db/unesb/unesb >/dev/null |
288 |
|
|
free |
289 |
|
|
time $(OPENISIS) -fmt mfnf -search 'k$$' -db db/unesb/unesb >/dev/null |
290 |
|
|
|
291 |
|
|
|
292 |
|
|
|
293 |
|
|
|
294 |
|
|
# ############################# perl ################################## |
295 |
|
|
# |
296 |
|
|
# |
297 |
|
|
perl: $(XSUB) |
298 |
|
|
: |
299 |
|
|
: ++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
300 |
|
|
: +++ as root in the perl subdir, run 'make install' +++ |
301 |
|
|
: ++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
302 |
|
|
|
303 |
|
|
ptest: $(XSUB) |
304 |
|
|
@$(MAKE) -C perl test |
305 |
|
|
|
306 |
|
|
perl/Makefile: perl/Makefile.PL |
307 |
|
|
cd perl && perl Makefile.PL |
308 |
|
|
|
309 |
|
|
# perl's Makefile doesn't know all deps |
310 |
|
|
$(XSUB): perl/OpenIsis.pm perl/OpenIsis.xs openisis.h $(STO)/libopenisis.a perl/Makefile |
311 |
|
|
@-[ ! -f perl/OpenIsis.c ] || rm perl/OpenIsis.c |
312 |
|
|
@$(MAKE) -C perl |
313 |
|
|
|
314 |
|
|
# standalone tree with OpenIsis module |
315 |
|
|
perltree: $(XSUB) |
316 |
|
|
@-[ -d perl/tmptree/auto/OpenIsis ] || mkdir -p perl/tmptree/auto/OpenIsis |
317 |
|
|
cp -p perl/OpenIsis.pm perl/tmptree |
318 |
|
|
cp -p $(XSUB) perl/tmptree/auto/OpenIsis |
319 |
|
|
- strip perl/tmptree/auto/OpenIsis/OpenIsis.so |
320 |
|
|
|
321 |
|
|
pdemo: perltree |
322 |
|
|
perl/demo.pl |
323 |
|
|
|
324 |
|
|
|
325 |
|
|
|
326 |
|
|
# ############################# tcl ################################## |
327 |
|
|
# |
328 |
|
|
tcl: $(O)/libopenisis.a |
329 |
|
|
@$(MAKE) -C tcl bin/isish |
330 |
|
|
|
331 |
|
|
tk: $(O)/libopenisis.a |
332 |
|
|
@$(MAKE) -C tcl bin/wisish |
333 |
|
|
|
334 |
|
|
tcltk: tcl tk |
335 |
|
|
|
336 |
|
|
ttest: tcl |
337 |
|
|
@$(MAKE) -C tcl test |
338 |
|
|
|
339 |
|
|
|
340 |
|
|
|
341 |
|
|
|
342 |
|
|
# ############################# java ################################## |
343 |
|
|
# |
344 |
|
|
java: $(JTARGETS) |
345 |
|
|
: |
346 |
|
|
|
347 |
|
|
jtest: java |
348 |
|
|
$(RUNJAVA) \ |
349 |
|
|
org.openisis.Test -v $${V:-warn} -db $(DBDIR) -encoding Cp850 \ |
350 |
|
|
-row 42 \ |
351 |
|
|
-search development \ |
352 |
|
|
-terms '' \ |
353 |
|
|
-mpu -row 130 \ |
354 |
|
|
-mhl -hta -row 130 \ |
355 |
|
|
-m1 -row 130 \ |
356 |
|
|
>testout.txt |
357 |
|
|
diff testout.txt jtest.txt |
358 |
|
|
|
359 |
|
|
jcrash: java |
360 |
|
|
$(RUNJAVA) \ |
361 |
|
|
org.openisis.Test -v $${V:-warn} -dbpath db/unesb -db unesb \ |
362 |
|
|
-crash Z |
363 |
|
|
|
364 |
|
|
# print in cds1.pft format |
365 |
|
|
jcds1: java |
366 |
|
|
$(RUNJAVA) \ |
367 |
|
|
org.openisis.Test -v $${V:-warn} -db $(DBDIR) -encoding Cp850 \ |
368 |
|
|
-m1 -dump |
369 |
|
|
|
370 |
|
|
jtime: java |
371 |
|
|
$(RUNJAVA) \ |
372 |
|
|
org.openisis.Test -search 'a$$' -v $${V:-warn} \ |
373 |
|
|
-db db/unesb/unesb >/dev/null |
374 |
|
|
|
375 |
|
|
jdump: java |
376 |
|
|
$(RUNJAVA) \ |
377 |
|
|
org.openisis.Test -v 9 -db $(DBDIR) 2>&1 | less |
378 |
|
|
|
379 |
|
|
jwrite: java |
380 |
|
|
$(RUNJAVA) \ |
381 |
|
|
org.openisis.Test -v 9 -db $(DBDIR) -write |
382 |
|
|
|
383 |
|
|
jxml: java |
384 |
|
|
ifeq ($(J2EE),) |
385 |
|
|
echo please be shure to have org.xml. stuff in your CLASSPATH |
386 |
|
|
$(MAKE) J2EE=1 jxml |
387 |
|
|
else |
388 |
|
|
$(RUNJAVA) \ |
389 |
|
|
-Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser \ |
390 |
|
|
org.openisis.XmlTest $${testxml:-test.xml} |
391 |
|
|
endif |
392 |
|
|
|
393 |
|
|
# -overview overview.html |
394 |
|
|
jdoc: |
395 |
|
|
- mkdir jdoc |
396 |
|
|
javadoc \ |
397 |
|
|
-sourcepath . \ |
398 |
|
|
-encoding ISO-8859-1 \ |
399 |
|
|
-J-Xmx64m \ |
400 |
|
|
-d jdoc \ |
401 |
|
|
-use \ |
402 |
|
|
-version \ |
403 |
|
|
-author \ |
404 |
|
|
-windowtitle 'org.openisis source code documentation' \ |
405 |
|
|
-doctitle 'org.openisis source code documentation' \ |
406 |
|
|
-header 'org.openisis source code documentation' \ |
407 |
|
|
-footer 'this is <b>public</b> material' \ |
408 |
|
|
-bottom 'for <b>your</b> eyes only' \ |
409 |
|
|
-stylesheetfile jdocstyle.css \ |
410 |
|
|
-charset "iso-8859-1" \ |
411 |
|
|
org.openisis |
412 |
|
|
|
413 |
|
|
charset: java |
414 |
|
|
mkdir -p db/charset |
415 |
|
|
$(RUNJAVA) \ |
416 |
|
|
org.openisis.Charset -utf8seq >db/charset/charset.seq |
417 |
|
|
mx seq=db/charset/charset.seq create=db/charset/charset -all now tell=1 |
418 |
|
|
mx db/charset/charset fst='1 1 MHL,V1' \ |
419 |
|
|
ln1=db/charset/charset.lk1 ln2=db/charset/charset.lk2 +fix -all now tell=1 |
420 |
|
|
ifload db/charset/charset db/charset/charset.lk1 db/charset/charset.lk2 \ |
421 |
|
|
+fix tell=1 -reset -balan |
422 |
|
|
$(RUNJAVA) \ |
423 |
|
|
org.openisis.Charset |
424 |
|
|
|
425 |
|
|
# make additional ee classes |
426 |
|
|
j2ee: openisis.jar $(EECLASSES:%=org/openisis/%.class) |
427 |
|
|
: |
428 |
|
|
|
429 |
|
|
# openisis.jar: $(foreach cls,$(CLASSES),org/openisis/$(cls).class) |
430 |
|
|
openisis.jar: $(CLASSES:%=org/openisis/%.class) |
431 |
|
|
jar cvf $@ org/openisis/*.class |
432 |
|
|
|
433 |
|
|
%.class: %.java |
434 |
|
|
$(JC) -classpath .:$(CLASSPATH) $< |
435 |
|
|
|
436 |
|
|
%.h: %.class |
437 |
|
|
javah -jni -o $@ $(subst /,.,$*) |
438 |
|
|
|
439 |
|
|
ifneq ($(O),mto) |
440 |
|
|
mto/libopenjsis.so: openjsis.c $(MTOBJS) |
441 |
|
|
$(MAKE) MT=1 $@ |
442 |
|
|
else |
443 |
|
|
mto/openjsis.o: openjsis.c |
444 |
|
|
@- [ -d mto ] || mkdir mto |
445 |
|
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $(MTFLAGS) $(JNIINC) -o $@ $< |
446 |
|
|
|
447 |
|
|
mto/libopenjsis.so: mto/openjsis.o mto/libopenisis.a |
448 |
|
|
$(CC) $(LDSHARED) -o $@ $^ |
449 |
|
|
endif |
450 |
|
|
|
451 |
|
|
%.dll: |
452 |
|
|
$(CC) -mdll -o junk.tmp -Wl,--base-file,$*.tmp $($*_deps) |
453 |
|
|
dlltool --dllname $@ --base-file $*.tmp \ |
454 |
|
|
--output-exp $*.exp --input-def $*.def |
455 |
|
|
dlltool --dllname $@ --input-def $*.def \ |
456 |
|
|
--output-lib lib$*.a |
457 |
|
|
gcc -mdll -mconsole -o $@ $($*_deps) -Wl,$*.exp,--enable-stdcall-fixup |
458 |
|
|
|
459 |
|
|
# dependences of win32 dlls |
460 |
|
|
# note on cross-builds: make sure you have the proper jni headers included - |
461 |
|
|
# those supplied for the target platform |
462 |
|
|
openjsis_deps=openjsis.o $(LOBJS) |
463 |
|
|
openjsis.dll: $(openjsis_deps) |
464 |
|
|
|
465 |
|
|
|
466 |
|
|
|
467 |
|
|
# ############################# rules ################################## |
468 |
|
|
# |
469 |
|
|
# $@ target $^ all prerequisites $? newer $< first $* stem |
470 |
|
|
# |
471 |
|
|
mto/%.o: %.c |
472 |
|
|
@- [ -d mto ] || mkdir mto |
473 |
|
|
$(CC) -c $(CPPFLAGS) $(MTFLAGS) $(CFLAGS) -o $@ $< |
474 |
|
|
|
475 |
|
|
# sto or win |
476 |
|
|
$(STO)/%.o: %.c |
477 |
|
|
@- [ -d $(STO) ] || mkdir $(STO) |
478 |
|
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< |
479 |
|
|
|
480 |
|
|
|
481 |
|
|
# maintenance targets ... most need a posix shell |
482 |
|
|
ci: clean |
483 |
|
|
: +++ enter checkin message +++ |
484 |
|
|
-read msg && ci -l -m"$$msg" * |
485 |
|
|
|
486 |
|
|
Version: $(BINARY) |
487 |
|
|
echo "OpenIsis `$(OPENISIS) -version`" >Version |
488 |
|
|
./lscvs -lr | sort >>Version |
489 |
|
|
|
490 |
|
|
tar: Version |
491 |
|
|
@-[ -d tar ] || mkdir tar |
492 |
|
|
./lscvs -r | sort | tar czvfT tar/openisis.`$(OPENISIS) -version`.tgz - |
493 |
|
|
|
494 |
|
|
snap: clean |
495 |
|
|
@-[ -d tar ] || mkdir tar |
496 |
|
|
tar czvf tar/oi`date +%y%m%d`.tgz . --exclude CVS --exclude tar --exclude WEB-INF |
497 |
|
|
|
498 |
|
|
headers: |
499 |
|
|
for f in *.h *.c */*.h */*.c perl/*.xs org/openisis/*.java; do \ |
500 |
|
|
cat Header.txt >$$f.tmp; \ |
501 |
|
|
sed -e '1,/^EOH/d' $$f >>$$f.tmp; \ |
502 |
|
|
mv -f $$f.tmp $$f; \ |
503 |
|
|
done |
504 |
|
|
for f in `grep -rl '^#EOH' .`; do \ |
505 |
|
|
head -n 1 $$f >$$f.tmp; \ |
506 |
|
|
sed -e 's/^/#/' Header.txt >>$$f.tmp; \ |
507 |
|
|
sed -e '1,/^#EOH/d' $$f >>$$f.tmp; \ |
508 |
|
|
echo $$f; \ |
509 |
|
|
diff $$f $$f.tmp; \ |
510 |
|
|
mv -f $$f.tmp $$f; \ |
511 |
|
|
done |
512 |
|
|
|
513 |
|
|
# please do not try to make deps w/o sed, gcc and mv ... |
514 |
|
|
deps: |
515 |
|
|
gcc -MM `./lscvs |grep '\.c$$' |sort` >deps.tmp |
516 |
|
|
sed -n -e '1,/^# generated deps/p' Makefile >Makefile.tmp |
517 |
|
|
sed -e '/^[^ ]/s/^/mto\//' <deps.tmp >>Makefile.tmp |
518 |
|
|
sed -e '/^[^ ]/s/^/$$(STO)\//' <deps.tmp >>Makefile.tmp |
519 |
|
|
rm deps.tmp |
520 |
|
|
mv -f Makefile Makefile.old |
521 |
|
|
mv Makefile.tmp Makefile |
522 |
|
|
-diff Makefile Makefile.old |
523 |
|
|
|
524 |
|
|
# generated deps -- do not edit below this line |
525 |
|
|
mto/demo.o: demo.c openisis.h |
526 |
|
|
mto/ioperf.o: ioperf.c |
527 |
|
|
mto/lbt.o: lbt.c lio.h luti.h loi.h openisis.h lll.h lbt.h ldb.h |
528 |
|
|
mto/lcli.o: lcli.c openisis.h loi.h lio.h luti.h lll.h lcli.h |
529 |
|
|
mto/lcs.o: lcs.c luti.h loi.h openisis.h lio.h lll.h lcs.h |
530 |
|
|
mto/ldb.o: ldb.c lstr.h lio.h luti.h loi.h openisis.h lll.h lbt.h ldb.h \ |
531 |
|
|
lcs.h lfdt.h |
532 |
|
|
mto/ldsp.o: ldsp.c openisis.h loi.h ldb.h luti.h lll.h ldsp.h lfdt.h |
533 |
|
|
mto/lenc.o: lenc.c openisis.h ldsp.h |
534 |
|
|
mto/leva.o: leva.c openisis.h ldsp.h |
535 |
|
|
mto/lfdt.o: lfdt.c openisis.h loi.h lfdt.h luti.h |
536 |
|
|
mto/lfmt.o: lfmt.c ldb.h luti.h loi.h openisis.h lll.h |
537 |
|
|
mto/lio.o: lio.c luti.h loi.h openisis.h lses.h lio.h lll.h lstr.h |
538 |
|
|
mto/lqry.o: lqry.c ldb.h luti.h loi.h openisis.h lll.h |
539 |
|
|
mto/lrec.o: lrec.c ldb.h luti.h loi.h openisis.h lll.h lio.h lcs.h |
540 |
|
|
mto/lrectest.o: lrectest.c openisis.h loi.h lfdt.h luti.h |
541 |
|
|
mto/lses.o: lses.c lses.h loi.h openisis.h lio.h luti.h lll.h |
542 |
|
|
mto/lstb.o: lstb.c openisis.h loi.h lcli.h ldb.h luti.h lll.h ldsp.h \ |
543 |
|
|
lfdt.h |
544 |
|
|
mto/lstbtest.o: lstbtest.c openisis.h loi.h ldb.h luti.h lll.h |
545 |
|
|
mto/lstr.o: lstr.c lstr.h luti.h loi.h openisis.h |
546 |
|
|
mto/lsv.o: lsv.c lsv.h loi.h openisis.h lio.h luti.h lll.h lses.h |
547 |
|
|
mto/luti.o: luti.c openisis.h luti.h loi.h |
548 |
|
|
mto/mlock.o: mlock.c |
549 |
|
|
mto/oipl.o: oipl.c |
550 |
|
|
mto/ois.o: ois.c lsv.h loi.h openisis.h lio.h luti.h lll.h lses.h ldsp.h |
551 |
|
|
mto/openisis.o: openisis.c openisis.h lio.h luti.h loi.h lll.h |
552 |
|
|
mto/openjsis.o: openjsis.c openisis.h org/openisis/NativeDb.h |
553 |
|
|
mto/tpl.o: tpl.c ldb.h luti.h loi.h openisis.h lll.h |
554 |
|
|
$(STO)/demo.o: demo.c openisis.h |
555 |
|
|
$(STO)/ioperf.o: ioperf.c |
556 |
|
|
$(STO)/lbt.o: lbt.c lio.h luti.h loi.h openisis.h lll.h lbt.h ldb.h |
557 |
|
|
$(STO)/lcli.o: lcli.c openisis.h loi.h lio.h luti.h lll.h lcli.h |
558 |
|
|
$(STO)/lcs.o: lcs.c luti.h loi.h openisis.h lio.h lll.h lcs.h |
559 |
|
|
$(STO)/ldb.o: ldb.c lstr.h lio.h luti.h loi.h openisis.h lll.h lbt.h ldb.h \ |
560 |
|
|
lcs.h lfdt.h |
561 |
|
|
$(STO)/ldsp.o: ldsp.c openisis.h loi.h ldb.h luti.h lll.h ldsp.h lfdt.h |
562 |
|
|
$(STO)/lenc.o: lenc.c openisis.h ldsp.h |
563 |
|
|
$(STO)/leva.o: leva.c openisis.h ldsp.h |
564 |
|
|
$(STO)/lfdt.o: lfdt.c openisis.h loi.h lfdt.h luti.h |
565 |
|
|
$(STO)/lfmt.o: lfmt.c ldb.h luti.h loi.h openisis.h lll.h |
566 |
|
|
$(STO)/lio.o: lio.c luti.h loi.h openisis.h lses.h lio.h lll.h lstr.h |
567 |
|
|
$(STO)/lqry.o: lqry.c ldb.h luti.h loi.h openisis.h lll.h |
568 |
|
|
$(STO)/lrec.o: lrec.c ldb.h luti.h loi.h openisis.h lll.h lio.h lcs.h |
569 |
|
|
$(STO)/lrectest.o: lrectest.c openisis.h loi.h lfdt.h luti.h |
570 |
|
|
$(STO)/lses.o: lses.c lses.h loi.h openisis.h lio.h luti.h lll.h |
571 |
|
|
$(STO)/lstb.o: lstb.c openisis.h loi.h lcli.h ldb.h luti.h lll.h ldsp.h \ |
572 |
|
|
lfdt.h |
573 |
|
|
$(STO)/lstbtest.o: lstbtest.c openisis.h loi.h ldb.h luti.h lll.h |
574 |
|
|
$(STO)/lstr.o: lstr.c lstr.h luti.h loi.h openisis.h |
575 |
|
|
$(STO)/lsv.o: lsv.c lsv.h loi.h openisis.h lio.h luti.h lll.h lses.h |
576 |
|
|
$(STO)/luti.o: luti.c openisis.h luti.h loi.h |
577 |
|
|
$(STO)/mlock.o: mlock.c |
578 |
|
|
$(STO)/oipl.o: oipl.c |
579 |
|
|
$(STO)/ois.o: ois.c lsv.h loi.h openisis.h lio.h luti.h lll.h lses.h ldsp.h |
580 |
|
|
$(STO)/openisis.o: openisis.c openisis.h lio.h luti.h loi.h lll.h |
581 |
|
|
$(STO)/openjsis.o: openjsis.c openisis.h org/openisis/NativeDb.h |
582 |
|
|
$(STO)/tpl.o: tpl.c ldb.h luti.h loi.h openisis.h lll.h |