source: branches/changing-indexers-branch/gsdl/src/recpt/Makefile.in@ 13767

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

fixed a typo

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