source: trunk/gsdl/src/recpt/Makefile.in@ 12926

Last change on this file since 12926 was 12926, checked in by kjdon, 17 years ago

added in accentfolding stuff

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 12.3 KB
Line 
1###########################################################################
2#
3# Makefile -- src/recpt
4# A component of the Greenstone digital library software
5# from the New Zealand Digital Library Project at the
6# University of Waikato, New Zealand.
7#
8# Copyright (C) 1999 The New Zealand Digital Library Project
9#
10#
11# This program is free software; you can redistribute it and/or modify
12# it under the terms of the GNU General Public License as published by
13# the Free Software Foundation; either version 2 of the License, or
14# (at your option) any later version.
15#
16# This program is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with this program; if not, write to the Free Software
23# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24#
25###########################################################################
26
27USE_Z3950 = @USE_Z3950@
28ifeq ($(USE_Z3950), 1)
29Z_CFLAGS=-DUSE_Z3950
30else
31Z_CFLAGS=
32endif
33
34USE_CORBA = @USE_CORBA@
35ifeq ($(USE_CORBA), 1)
36CORBA_CFLAGS=-DUSE_CORBA
37else
38CORBA_CFLAGS=
39endif
40
41ENABLE_ACCENTFOLD = @ENABLE_ACCENTFOLD@
42ifeq ($(ENABLE_ACCENTFOLD), 1)
43AFLIBS = ../../packages/unac/libunac.a
44AFFLAGS = -DENABLE_ACCENTFOLD
45else
46AFLIBS =
47AFFLAGS =
48endif
49
50AR = ar
51CC = @CC@
52CXX = @CXX@
53
54CXXFLAGS = $(Z_CFLAGS) $(CORBA_CFLAGS) $(AFFLAGS) @CXXFLAGS@
55
56# YAZ kit for z39.50
57YAZDIR=../../packages/yaz
58
59
60USE_FASTCGI = @USE_FASTCGI@
61ifneq ($(USE_FASTCGI), 1)
62DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM @DEFS@
63INCLUDES = -I../../lib -I. -I../colservr -I../../packages/mg \
64 -I../../packages/mg/lib -I../../packages/mg/src/text \
65 -I../../packages/expat/include \
66 -I../mgpp/lib -I../mgpp/text -I../..
67else
68DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DUSE_FASTCGI @DEFS@
69INCLUDES = -I../../lib -I. -I../colservr -I../../packages/mg \
70 -I../../packages/mg/lib -I../../packages/mg/src/text \
71 -I../../packages/expat/include \
72 -I../../packages/fcgi/include -I../mgpp/lib \
73 -I../mgpp/text -I../..
74endif
75MICO_DIR = @MICO_DIR@
76MICO_VER = @MICO_VER@
77ifeq ($(MICO_DIR), yes)
78MICO_INC =
79MICO_LIB =
80MICO_PATH =
81else
82ifeq ($(MICO_DIR), default)
83MICO_DIR = ../../packages/mico/include
84MICO_PATH = ../../bin/linux/
85else
86MICO_PATH =
87endif
88MICO_INC = -I$(MICO_DIR)
89MICO_LIB = -L$(MICO_DIR)
90endif
91MINCLUDES = -I. -I../../lib -I../colservr -I../mgpp/text $(MICO_INC)
92
93LC_LIBS = -L../../packages/expat/lib -lexpat
94LC_OBJECTS = \
95 ../colservr/lucenesearch.o \
96 ../colservr/lucenequeryfilter.o \
97 ../colservr/lucenegdbmsource.o \
98 ../colservr/expat_resultset.o \
99 ../colservr/expat_document.o
100
101RANLIB = @RANLIB@
102LDFLAGS = @LDFLAGS@
103GDBM_LIBS=@GDBM_LIBPATH@ -lgdbm
104LIBS = $(GDBM_LIBS) $(LC_LIBS) $(AFLIBS) @LIBS@
105GSDLOS = @gsdlos@
106INSTALL = @INSTALL@
107
108COMPILE = $(CC) -c $(CCFLAGS) $(DEFS) $(INCLUDES)
109LINK = $(CC) $(LDFLAGS) -o $@
110
111CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
112CXXLINK = $(CXX) $(LDFLAGS) -o $@
113
114MCOMPILE = $(MICO_PATH)mico-c++ -x c++ $(MCFLAGS) $(DEFS) $(MINCLUDES) -c
115MSTATIC = @STATIC@
116MLINK = $(MICO_PATH)mico-ld $(MSTATIC) $(LDFLAGS) $(MICO_LIB) -o $@
117MLIBS = $(LIBS) -L../../lib/ -lmico$(MICO_VER) -lmicoaux$(MICO_VER)
118
119# in case gdbm.h/libgdbm.a are in a non-standard place...
120GDBM_OBJS=argdb.o authenaction.o collectoraction.o depositoraction.o wizardaction.o infodbclass.o userdb.o usersaction.o historydb.o librarymain.o nullproto.o queryaction.o z3950proto.o
121
122ifeq ($(USE_CORBA), 1)
123#EXEC = recpt library corbaserver corbarecptldd
124EXEC = library corbaserver corbarecptldd
125else
126#EXEC = recpt library
127EXEC = library
128endif
129
130ifeq ($(USE_Z3950), 1)
131Z3950EXEC = z3950server
132else
133Z3950EXEC =
134endif
135
136all: $(EXEC) $(Z3950EXEC)
137
138
139
140.SUFFIXES:
141.SUFFIXES: .c .o
142.c.o:
143 $(COMPILE) $<
144
145.SUFFIXES: .cpp .o
146.cpp.o:
147 $(CXXCOMPILE) $<
148
149$(GDBM_OBJS) :%.o :%.cpp
150 $(CXXCOMPILE) @GDBM_INCLUDE@ $<
151
152.SUFFIXES: .mpp .o
153.mpp.o:
154 $(MCOMPILE) $< -o $@
155
156
157COMMONHEADERS = receptionist.h cgiwrapper.h cgiargs.h action.h browserclass.h \
158 converter.h recptconfig.h cgiutils.h OIDtools.h browsetoolsclass.h \
159 statusaction.h pageaction.h comtypes.h recptproto.h \
160 pingaction.h queryaction.h documentaction.h \
161 extlinkaction.h browseaction.h htmlutils.h argdb.h \
162 querytools.h browseactiontools.h formattools.h tipaction.h authenaction.h infodbclass.h \
163 userdb.h usersaction.h vlistbrowserclass.h hlistbrowserclass.h \
164 datelistbrowserclass.h invbrowserclass.h pagedbrowserclass.h \
165 htmlbrowserclass.h phindbrowserclass.h historydb.h collectoraction.h depositoraction.h wizardaction.h \
166 phindaction.h summarise.h highlighttext.h gtiaction.h
167
168RECEPTHEADERS =
169
170ifeq ($(USE_CORBA), 1)
171LIBRARYHEADERS = nullproto.h z3950proto.h z3950proxy.h corbaproto.h
172else
173LIBRARYHEADERS = nullproto.h z3950proto.h z3950proxy.h
174endif
175
176HEADERS = $(COMMONHEADERS) $(RECPTHEADERS) $(LIBRARYHEADERS)
177
178
179COMMONSOURCES = receptionist.cpp cgiwrapper.cpp cgiargs.cpp action.cpp browserclass.cpp \
180 converter.cpp recptconfig.cpp cgiutils.cpp OIDtools.cpp browsetoolsclass.cpp \
181 statusaction.cpp pageaction.cpp comtypes.cpp \
182 recptproto.cpp pingaction.cpp queryaction.cpp documentaction.cpp \
183 extlinkaction.cpp browseaction.h htmlutils.cpp querytools.cpp \
184 tipaction.cpp authenaction.cpp infodbclass.cpp userdb.cpp usersaction.cpp \
185 vlistbrowserclass.cpp hlistbrowserclass.cpp datelistbrowserclass.cpp \
186 invbrowserclass.cpp pagedbrowserclass.cpp htmlbrowserclass.cpp \
187 phindbrowserclass.cpp historydb.cpp collectoraction.cpp depositoraction.cpp wizardaction.cpp argdb.cpp \
188 browseactiontools.h formattools.cpp phindaction.cpp summarise.cpp \
189 highlighttext.cpp gtiaction.cpp
190
191
192RECPTSOURCES = recptmain.cpp
193
194ifeq ($(USE_Z3950), 1)
195Z_LIBSOURCES=z3950proto.cpp z3950proxy.cpp yaz_zclient.c zparse.tab.c zparse.yy.c $(YAZDIR)/yaz-2.1.4/client/tabcomplete.c
196else
197Z_LIBSOURCES=
198endif
199
200LIBRARYSOURCES = nullproto.cpp librarymain.cpp $(Z_LIBSOURCES)
201
202SOURCES = $(COMMONSOURCES) $(RECPTSOURCES) $(LIBRARYSOURCES)
203
204
205ifeq ($(USE_Z3950), 1)
206Z_COMOBJS=zparse.yy.o
207else
208Z_COMOBJS=
209endif
210
211
212COMMONOBJECTS = receptionist.o cgiwrapper.o cgiargs.o action.o browserclass.o \
213 converter.o recptconfig.o cgiutils.o OIDtools.o browsetoolsclass.o \
214 statusaction.o pageaction.o comtypes.o \
215 recptproto.o pingaction.o queryaction.o documentaction.o \
216 extlinkaction.o browseaction.o htmlutils.o querytools.o browseactiontools.o \
217 formattools.o tipaction.o authenaction.o argdb.o \
218 infodbclass.o userdb.o usersaction.o vlistbrowserclass.o \
219 hlistbrowserclass.o datelistbrowserclass.o invbrowserclass.o \
220 pagedbrowserclass.o htmlbrowserclass.o phindbrowserclass.o \
221 historydb.o $(Z_COMOBJS) collectoraction.o depositoraction.o wizardaction.o phindaction.o \
222 summarise.o highlighttext.o gtiaction.o
223
224RECPTOBJECTS = recptmain.o
225
226
227ifeq ($(USE_Z3950), 1)
228Z_LIBOBJS=z3950proto.o z3950proxy.o yaz_zclient.o zparse.tab.o
229Z_CLIENTOBJS=$(YAZDIR)/yaz-2.1.4/client/tabcomplete.o
230else
231Z_LIBOBJS=
232Z_CLIENTOBJS=
233endif
234
235LIBRARYOBJECTS = nullproto.o librarymain.o $(Z_LIBOBJS)
236
237OBJECTS = $(COMMONOBJECTS) $(RECPTOBJECTS) $(LIBRARYOBJECTS)
238
239
240COLSERVROBJECTS = ../colservr/mgq.o \
241 ../colservr/search.o \
242 ../colservr/mgsearch.o \
243 ../colservr/querycache.o \
244 ../colservr/queryinfo.o \
245 ../colservr/collectserver.o \
246 ../colservr/colservrconfig.o \
247 ../colservr/maptools.o \
248 ../colservr/filter.o \
249 ../colservr/source.o \
250 ../colservr/browsefilter.o \
251 ../colservr/queryfilter.o \
252 ../colservr/gdbmsource.o \
253 ../colservr/mggdbmsource.o \
254 ../colservr/phrasesearch.o \
255 ../colservr/phrasequeryfilter.o \
256 ../colservr/mgqueryfilter.o \
257 ../colservr/mgppsearch.o \
258 ../colservr/mgppqueryfilter.o \
259 ../colservr/collectset.o \
260 $(LC_OBJECTS)
261
262
263
264## z39.50 rules
265# Note! If USE_FASTCGI=1, yaz is still compiled and linked, but never
266# called by librarymain.cpp.
267yaz_zclient.o: yaz_zclient.c
268 $(COMPILE) -I$(YAZDIR)/yaz-2.1.4/include -I$(YAZDIR)/yaz-2.1.4/client $<
269
270# this should be done by the top level makefile...
271$(YAZDIR)/lib/libyaz.a:
272 cd $(YAZDIR)/yaz-2.1.4/src && $(MAKE) && $(MAKE) install
273
274# put a separate rule here, as it speeds up compilation of other objects
275# if they don't need to include all the yaz headers
276z3950%.o: z3950%.cpp
277 $(COMPILE) -I$(YAZDIR)/include $<
278
279zparse.tab.c: zparse.y
280 @YACC@ -b zparse -d zparse.y
281
282zparse.tab.h: zparse.tab.c
283
284zparse.yy.c: zparse.fl zparse.tab.h
285 flex -Pzconfig -ozparse.yy.c zparse.fl
286
287
288
289# We'll keep the .c and .h files for those without lex/flex and yacc/bison.
290#PARSE_TMPFILES= zparse.tab.o zparse.tab.c zparse.tab.h zparse.yy.o zparse.yy.c
291PARSE_TMPFILE=zparse.tab.o zparse.yy.o
292
293
294distclean:
295 rm -f $(OBJECTS) $(EXEC) $(PARSE_TMPFILES) Makefile
296
297clean:
298 rm -f $(OBJECTS) $(EXEC) $(PARSE_TMPFILES)
299
300install:
301 $(INSTALL) -m 755 -s library ../../cgi-bin
302ifeq ($(USE_Z3950), 1)
303 $(INSTALL) -m 755 -s z3950server ../../bin/$(GSDLOS)
304endif
305
306depend:
307 makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
308
309# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
310ifeq ($(USE_FASTCGI), 1)
311 FASTCGI_OBJS = ../../packages/fcgi/libfcgi/libfcgi.a
312else
313 FASTCGI_OBJS =
314endif
315
316RECPT_OBJS = $(COMMONOBJECTS) $(RECPTOBJECTS) \
317 ../../lib/gsdllib.a \
318 ../../packages/mg/src/text/libtextin.a \
319 ../../packages/mg/lib/libmg.a \
320 $(FASTCGI_OBJS) \
321 ../mgpp/text/libtextin.a \
322 ../mgpp/lib/libmg.a
323
324recpt: $(RECPT_OBJS)
325 $(CXXLINK) $(RECPT_OBJS) $(LIBS)
326
327# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
328ifeq ($(USE_Z3950), 1)
329Z_LIBYAZ_A=$(YAZDIR)/lib/libyaz.a
330else
331Z_LIBYAZ_A=
332endif
333
334
335LIBRARY_OBJS = $(COMMONOBJECTS) $(LIBRARYOBJECTS) $(COLSERVROBJECTS) $(Z_CLIENTOBJS) \
336 ../../lib/gsdllib.a \
337 ../../packages/mg/src/text/libtextin.a \
338 ../../packages/mg/lib/libmg.a \
339 $(FASTCGI_OBJS) $(Z_LIBYAZ_A) \
340 ../mgpp/text/libtextin.a \
341 ../mgpp/lib/libmg.a
342
343library: $(LIBRARY_OBJS)
344 $(CXXLINK) $(LIBRARY_OBJS) $(LIBS)
345
346# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
347
348RECPTLIB_OBJECTS = nullproto.o corbaproto.o \
349 ../../lib/corbatext_t.o ../../lib/corbaconv_text_t.o \
350 ../../lib/corbaiface.o ../../lib/corbaiface_skel.o
351
352RLIBRARY_OBJS = $(COMMONOBJECTS) $(RECPTLIB_OBJECTS) $(COLSERVROBJECTS) \
353 ../../lib/gsdllib.a \
354 ../../packages/mg/src/text/libtextin.a \
355 ../../packages/mg/lib/libmg.a \
356 $(FASTCGI_OBJS) $(Z_LIBOBJS) $(Z_LIBYAZ_A) \
357 ../mgpp/text/libtextin.a \
358 ../mgpp/lib/libmg.a
359
360RECPTLIB_OBJS = $(RLIBRARY_OBJS) ../colservr/corbaServer.o
361
362corbaserver: $(RECPTLIB_OBJS)
363 @echo -e building corbaserver
364 $(MLINK) $(RECPTLIB_OBJS) $(MLIBS)
365# stripping symbols was a cunning plan, but caused difficulties when
366# it came to debugging ...
367# non GNU strips might not like these options - check autoconf?
368# strip --strip-all --discard-all corbaserver
369# strip corbaserver
370# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
371
372CORBARECPT_OBJECTS = nullproto.o corbaproto.o corbaclient.o
373
374CORBARECPT_OBJS = $(COMMONOBJECTS) $(CORBARECPT_OBJECTS) $(COLSERVROBJECTS) \
375 ../../lib/corbaiface.o \
376 ../../lib/corbaiface_skel.o \
377 ../../lib/corbaconv_text_t.o \
378 ../../lib/corbatext_t.o \
379 ../../lib/gsdllib.a \
380 ../../packages/mg/src/text/libtextin.a \
381 ../../packages/mg/lib/libmg.a \
382 $(FASTCGI_OBJS) \
383 ../mgpp/text/libtextin.a \
384 ../mgpp/lib/libmg.a
385
386
387corbarecptldd: $(CORBARECPT_OBJS)
388 @echo -e building corbarecptldd:
389 $(MLINK) $(CORBARECPT_OBJS) $(MLIBS)
390
391test:
392
393Z3950_OBJS = comtypes.o recptproto.o infodbclass.o OIDtools.o recptconfig.o \
394 $(COLSERVROBJECTS) \
395 ../colservr/z3950parser.o ../colservr/z3950explain.o \
396 ../colservr/z3950_to_gsdl.o \
397 ../colservr/z3950server.o ../colservr/read-grs.o nullproto.o \
398 ../../lib/gsdllib.a \
399 ../../packages/mg/src/text/libtextin.a \
400 ../../packages/mg/lib/libmg.a \
401 $(FASTCGI_OBJS) \
402 ../mgpp/text/libtextin.a \
403 ../mgpp/lib/libmg.a ../../packages/yaz/lib/libyaz.a ../../packages/d2m/libd2m.a
404
405
406z3950server: $(Z3950_OBJS)
407 @echo -e building z3950server
408 $(CXXLINK) $(Z3950_OBJS) $(LIBS) -lxml2
Note: See TracBrowser for help on using the repository browser.