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

Last change on this file since 3322 was 3322, checked in by sjboddie, 22 years ago

Attempted to improve search term highlighting. Simple phrase searches will
now be highlighted correctly rather than simply highlighting all terms that
appear in the phrase. There are still many cases where highlighting won't
work quite as expected though, e.g. when stemming is turned on and there
are stemmed terms within the phrase and when there is more than one phrase
in the query string.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 10.7 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
41
42
43AR = ar
44CC = @CC@
45CXX = @CXX@
46#CCFLAGS = @CFLAGS@ -Wall -Wunused -pedantic -W -Woverloaded-virtual
47
48CXXFLAGS = $(Z_CFLAGS) $(CORBA_CFLAGS) @CXXFLAGS@
49
50# YAZ kit for z39.50
51YAZDIR=../../packages/yaz
52
53USE_FASTCGI = @USE_FASTCGI@
54ifneq ($(USE_FASTCGI), 1)
55DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM @DEFS@
56INCLUDES = -I../../lib -I. -I../colservr -I../../packages/mg \
57 -I../../packages/mg/lib -I../../packages/mg/src/text \
58 -I../mgpp/lib -I../mgpp/text -I../..
59else
60DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DUSE_FASTCGI @DEFS@
61INCLUDES = -I../../lib -I. -I../colservr -I../../packages/mg \
62 -I../../packages/mg/lib -I../../packages/mg/src/text \
63 -I../../packages/fcgi/include -I../mgpp/lib \
64 -I../mgpp/text -I../..
65endif
66MICO_DIR = @MICO_DIR@
67MICO_VER = @MICO_VER@
68ifeq ($(MICO_DIR), yes)
69MICO_INC =
70MICO_LIB =
71MICO_PATH =
72else
73ifeq ($(MICO_DIR), default)
74MICO_DIR = ../../packages/mico/include
75MICO_PATH = ../../bin/linux/
76else
77MICO_PATH =
78endif
79MICO_INC = -I$(MICO_DIR)
80MICO_LIB = -L$(MICO_DIR)
81endif
82MINCLUDES = -I. -I../../lib -I../colservr -I../mgpp/text $(MICO_INC)
83
84RANLIB = @RANLIB@
85LDFLAGS = @LDFLAGS@
86GDBM_LIBS=@GDBM_LIBPATH@ -lgdbm
87LIBS = $(GDBM_LIBS) @LIBS@
88GSDLOS = @gsdlos@
89INSTALL = @INSTALL@
90
91COMPILE = $(CC) -c $(CCFLAGS) $(DEFS) $(INCLUDES)
92LINK = $(CC) $(LDFLAGS) -o $@
93
94CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
95CXXLINK = $(CXX) $(LDFLAGS) -o $@
96
97MCOMPILE = $(MICO_PATH)mico-c++ -x c++ $(MCFLAGS) $(DEFS) $(MINCLUDES) -c
98MLINK = $(MICO_PATH)mico-ld -static $(LDFLAGS) $(MICO_LIB) -o $@
99MLIBS = $(LIBS) -L../../lib/ -lmico$(MICO_VER) -lmicoaux$(MICO_VER)
100
101# in case gdbm.h/libgdbm.a are in a non-standard place...
102GDBM_OBJS=argdb.o authenaction.o collectoraction.o infodbclass.o userdb.o usersaction.o historydb.o librarymain.o nullproto.o queryaction.o z3950proto.o
103
104ifeq ($(USE_CORBA), 1)
105#EXEC = recpt library corbaserver corbarecptldd
106EXEC = library corbaserver corbarecptldd
107else
108#EXEC = recpt library
109EXEC = library
110endif
111
112all: $(EXEC)
113
114
115.SUFFIXES:
116.SUFFIXES: .c .o
117.c.o:
118 $(COMPILE) $<
119
120.SUFFIXES: .cpp .o
121.cpp.o:
122 $(CXXCOMPILE) $<
123
124$(GDBM_OBJS) :%.o :%.cpp
125 $(CXXCOMPILE) @GDBM_INCLUDE@ $<
126
127.SUFFIXES: .mpp .o
128.mpp.o:
129 $(MCOMPILE) $< -o $@
130
131COMMONHEADERS = receptionist.h cgiwrapper.h cgiargs.h action.h browserclass.h \
132 converter.h recptconfig.h cgiutils.h OIDtools.h browsetools.h \
133 statusaction.h pageaction.h comtypes.h recptproto.h \
134 pingaction.h queryaction.h documentaction.h \
135 extlinkaction.h browseaction.h htmlutils.h argdb.h \
136 querytools.h browseactiontools.h formattools.h tipaction.h authenaction.h infodbclass.h \
137 userdb.h usersaction.h vlistbrowserclass.h hlistbrowserclass.h \
138 datelistbrowserclass.h invbrowserclass.h pagedbrowserclass.h \
139 htmlbrowserclass.h phindbrowserclass.h historydb.h collectoraction.h \
140 phindaction.h summarise.h highlighttext.h
141
142RECEPTHEADERS =
143
144ifeq ($(USE_CORBA), 1)
145LIBRARYHEADERS = nullproto.h z3950proto.h z3950server.h corbaproto.h
146else
147LIBRARYHEADERS = nullproto.h z3950proto.h z3950server.h
148endif
149
150HEADERS = $(COMMONHEADERS) $(RECPTHEADERS) $(LIBRARYHEADERS)
151
152
153COMMONSOURCES = receptionist.cpp cgiwrapper.cpp cgiargs.cpp action.cpp browserclass.cpp \
154 converter.cpp recptconfig.cpp cgiutils.cpp OIDtools.cpp browsetools.cpp \
155 statusaction.cpp pageaction.cpp comtypes.cpp \
156 recptproto.cpp pingaction.cpp queryaction.cpp documentaction.cpp \
157 extlinkaction.cpp browseaction.h htmlutils.cpp querytools.cpp \
158 tipaction.cpp authenaction.cpp infodbclass.cpp userdb.cpp usersaction.cpp \
159 vlistbrowserclass.cpp hlistbrowserclass.cpp datelistbrowserclass.cpp \
160 invbrowserclass.cpp pagedbrowserclass.cpp htmlbrowserclass.cpp \
161 phindbrowserclass.cpp historydb.cpp collectoraction.cpp argdb.cpp \
162 browseactiontools.h formattools.cpp phindaction.cpp summarise.cpp \
163 highlighttext.cpp
164
165
166RECPTSOURCES = recptmain.cpp
167
168ifeq ($(USE_Z3950), 1)
169Z_LIBSOURCES=z3950proto.cpp z3950server.cpp zparse.tab.c parse.yy.c $(YAZDIR)/client/yaz_zclient.c
170else
171Z_LIBSOURCES=
172endif
173
174LIBRARYSOURCES = nullproto.cpp librarymain.cpp $(Z_LIBSOURCES)
175
176SOURCES = $(COMMONSOURCES) $(RECPTSOURCES) $(LIBRARYSOURCES)
177
178
179ifeq ($(USE_Z3950), 1)
180Z_COMOBJS=parse.yy.o
181else
182Z_COMOBJS=
183endif
184
185COMMONOBJECTS = receptionist.o cgiwrapper.o cgiargs.o action.o browserclass.o \
186 converter.o recptconfig.o cgiutils.o OIDtools.o browsetools.o \
187 statusaction.o pageaction.o comtypes.o \
188 recptproto.o pingaction.o queryaction.o documentaction.o \
189 extlinkaction.o browseaction.o htmlutils.o querytools.o browseactiontools.o \
190 formattools.o tipaction.o authenaction.o argdb.o \
191 infodbclass.o userdb.o usersaction.o vlistbrowserclass.o \
192 hlistbrowserclass.o datelistbrowserclass.o invbrowserclass.o \
193 pagedbrowserclass.o htmlbrowserclass.o phindbrowserclass.o \
194 historydb.o $(Z_COMOBJS) collectoraction.o phindaction.o \
195 summarise.o highlighttext.o
196
197RECPTOBJECTS = recptmain.o
198
199
200ifeq ($(USE_Z3950), 1)
201Z_LIBOBJS=z3950proto.o z3950server.o zparse.tab.o $(YAZDIR)/client/yaz_zclient.o
202else
203Z_LIBOBJS=
204endif
205
206LIBRARYOBJECTS = nullproto.o librarymain.o $(Z_LIBOBJS)
207
208OBJECTS = $(COMMONOBJECTS) $(RECPTOBJECTS) $(LIBRARYOBJECTS)
209
210
211COLSERVROBJECTS = ../colservr/mgq.o \
212 ../colservr/search.o \
213 ../colservr/mgsearch.o \
214 ../colservr/querycache.o \
215 ../colservr/queryinfo.o \
216 ../colservr/collectserver.o \
217 ../colservr/colservrconfig.o \
218 ../colservr/maptools.o \
219 ../colservr/filter.o \
220 ../colservr/source.o \
221 ../colservr/browsefilter.o \
222 ../colservr/queryfilter.o \
223 ../colservr/mggdbmsource.o \
224 ../colservr/phrasesearch.o \
225 ../colservr/phrasequeryfilter.o \
226 ../colservr/mgqueryfilter.o \
227 ../colservr/mgppsearch.o \
228 ../colservr/mgppqueryfilter.o \
229 ../colservr/collectset.o
230
231
232
233## z39.50 rules
234# Note! If USE_FASTCGI=1, yaz is still compiled and linked, but never
235# called by librarymain.cpp.
236$(YAZDIR)/client/yaz_zclient.o: $(YAZDIR)/lib/libyaz.a
237 cd $(YAZDIR)/client && $(MAKE) yaz_zclient.o
238
239# this should be done by the top level makefile...
240$(YAZDIR)/lib/libyaz.a:
241 cd $(YAZDIR) && $(MAKE) all
242
243# put a separate rule here, as it speeds up compilation of other objects
244# if they don't need to include all the yaz headers
245z3950%.o: z3950%.cpp
246 $(COMPILE) -I$(YAZDIR)/include $<
247
248zparse.tab.c: zparse.y
249 @YACC@ -b zparse -d zparse.y
250
251zparse.tab.h: zparse.tab.c
252
253parse.yy.c: parse.fl zparse.tab.h
254 flex -oparse.yy.c parse.fl
255
256
257
258# We'll keep the .c and .h files for those without lex/flex and yacc/bison.
259#PARSE_TMPFILES= zparse.tab.o zparse.tab.c zparse.tab.h parse.yy.o parse.yy.c
260PARSE_TMPFILE=zparse.tab.o parse.yy.o
261
262distclean:
263 rm -f $(OBJECTS) $(EXEC) $(PARSE_TMPFILES) Makefile
264
265clean:
266 rm -f $(OBJECTS) $(EXEC) $(PARSE_TMPFILES)
267
268install:
269 $(INSTALL) -m 755 -s library ../../cgi-bin
270
271depend:
272 makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
273
274# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
275ifeq ($(USE_FASTCGI), 1)
276 FASTCGI_OBJS = ../../packages/fcgi/libfcgi/libfcgi.a
277else
278 FASTCGI_OBJS =
279endif
280
281RECPT_OBJS = $(COMMONOBJECTS) $(RECPTOBJECTS) \
282 ../../lib/gsdllib.a \
283 ../../packages/mg/src/text/libtextin.a \
284 ../../packages/mg/lib/libmg.a \
285 $(FASTCGI_OBJS) \
286 ../mgpp/text/libtextin.a \
287 ../mgpp/lib/libmg.a
288
289recpt: $(RECPT_OBJS)
290 $(CXXLINK) $(RECPT_OBJS) $(LIBS)
291
292# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
293ifeq ($(USE_Z3950), 1)
294Z_LIBYAZ_A=$(YAZDIR)/lib/libyaz.a
295else
296Z_LIBYAZ_A=
297endif
298
299
300LIBRARY_OBJS = $(COMMONOBJECTS) $(LIBRARYOBJECTS) $(COLSERVROBJECTS) \
301 ../../lib/gsdllib.a \
302 ../../packages/mg/src/text/libtextin.a \
303 ../../packages/mg/lib/libmg.a \
304 $(FASTCGI_OBJS) $(Z_LIBYAZ_A) \
305 ../mgpp/text/libtextin.a \
306 ../mgpp/lib/libmg.a
307
308library: $(LIBRARY_OBJS)
309 $(CXXLINK) $(LIBRARY_OBJS) $(LIBS)
310
311# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
312
313RECPTLIB_OBJECTS = nullproto.o corbaproto.o \
314 ../../lib/corbatext_t.o ../../lib/corbaconv_text_t.o \
315 ../../lib/corbaiface.o ../../lib/corbaiface_skel.o
316
317RLIBRARY_OBJS = $(COMMONOBJECTS) $(RECPTLIB_OBJECTS) $(COLSERVROBJECTS) \
318 ../../lib/gsdllib.a \
319 ../../packages/mg/src/text/libtextin.a \
320 ../../packages/mg/lib/libmg.a \
321 $(FASTCGI_OBJS) $(Z_LIBOBJS) $(Z_LIBYAZ_A) \
322 ../mgpp/text/libtextin.a \
323 ../mgpp/lib/libmg.a
324
325RECPTLIB_OBJS = $(RLIBRARY_OBJS) ../colservr/corbaServer.o
326
327corbaserver: $(RECPTLIB_OBJS)
328 @echo -e building corbaserver
329 $(MLINK) $(RECPTLIB_OBJS) $(MLIBS)
330# stripping symbols was a cunning plan, but caused difficulties when
331# it came to debugging ...
332# non GNU strips might not like these options - check autoconf?
333# strip --strip-all --discard-all corbaserver
334# strip corbaserver
335# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
336
337CORBARECPT_OBJECTS = nullproto.o corbaproto.o corbaclient.o
338
339CORBARECPT_OBJS = $(COMMONOBJECTS) $(CORBARECPT_OBJECTS) $(COLSERVROBJECTS) \
340 ../../lib/corbaiface.o \
341 ../../lib/corbaiface_skel.o \
342 ../../lib/corbaconv_text_t.o \
343 ../../lib/corbatext_t.o \
344 ../../lib/gsdllib.a \
345 ../../packages/mg/src/text/libtextin.a \
346 ../../packages/mg/lib/libmg.a \
347 $(FASTCGI_OBJS) \
348 ../mgpp/text/libtextin.a \
349 ../mgpp/lib/libmg.a
350
351
352corbarecptldd: $(CORBARECPT_OBJS)
353 @echo -e building corbarecptldd:
354 $(MLINK) $(CORBARECPT_OBJS) $(MLIBS)
355
356test:
357
Note: See TracBrowser for help on using the repository browser.