root/main/trunk/greenstone2/runtime-src/src/recpt/Makefile.in @ 25560

Revision 25560, 8.1 KB (checked in by ak19, 8 years ago)

Dr Bainbridge has introduced the isPersistentAction (add the a=is-persistent to the library url). It is true for server.exe and when using mod_gsdl, but false for library.cgi which uses the apache web server (when not using mod_gsdl).

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1###########################################################################
2#
3# Makefile -- runtime-src/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-2008  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
27GSDL_DIR = ../../..
28COMMON_DIR = $(GSDL_DIR)/common-src
29RUNTIME_DIR = $(GSDL_DIR)/runtime-src
30
31GSDLOS = @gsdlos@
32GSDLARCH = @gsdlarch@
33
34INDEXERS_DIR = $(COMMON_DIR)/indexers
35COMMON_PACKAGES_DIR = $(COMMON_DIR)/packages
36RUNTIME_PACKAGES_DIR = $(RUNTIME_DIR)/packages
37COLSERVR_DIR = $(RUNTIME_DIR)/src/colservr
38PROTOCOL_DIR = $(RUNTIME_DIR)/src/protocol
39Z3950_DIR = $(RUNTIME_DIR)/src/z3950
40
41
42ENABLE_ACCENTFOLD = @ENABLE_ACCENTFOLD@
43ifeq ($(ENABLE_ACCENTFOLD), 1)
44ACCENTFOLD_LIBS = $(INDEXERS_DIR)/packages/unac/libunac.a $(COMMON_PACKAGES_DIR)/iconv/lib/libiconv.a
45else
46ACCENTFOLD_LIBS =
47endif
48
49ENABLE_MG = @ENABLE_MG@
50ifeq ($(ENABLE_MG), 1)
51MG_INDEXERS_LIBS = $(INDEXERS_DIR)/mg/src/text/libmgtext.a \
52    $(INDEXERS_DIR)/mg/lib/libmglib.a
53MG_INCLUDES = -I$(INDEXERS_DIR)/mg -I$(INDEXERS_DIR)/mg/lib
54else
55MG_INDEXERS_LIBS =
56MG_INCLUDES =
57endif
58
59ENABLE_MGPP = @ENABLE_MGPP@
60ifeq ($(ENABLE_MGPP), 1)
61MGPP_SOURCES = phindaction.cpp
62MGPP_OBJECTS = phindaction.o
63MGPP_INDEXERS_LIBS = $(INDEXERS_DIR)/mgpp/text/libmgpptext.a \
64    $(INDEXERS_DIR)/mgpp/lib/libmgpplib.a
65MGPP_INCLUDES = -I$(INDEXERS_DIR)/mgpp/text -I$(INDEXERS_DIR)/mgpp/lib
66else
67MGPP_SOURCES =
68MGPP_OBJECTS =
69MGPP_INDEXERS_LIBS =
70MGPP_INCLUDES =
71endif
72
73USE_FASTCGI = @USE_FASTCGI@
74ifeq ($(USE_FASTCGI), 1)
75FASTCGI_DEFS = -DUSE_FASTCGI
76FASTCGI_INCLUDES = -I$(RUNTIME_PACKAGES_DIR)/fcgi/include
77FASTCGI_LIBS = $(RUNTIME_PACKAGES_DIR)/fcgi/libfcgi/libfcgi.a
78else
79FASTCGI_DEFS =
80FASTCGI_INCLUDES =
81FASTCGI_LIBS =
82endif
83
84USE_GDBM = @USE_GDBM@
85ifeq ($(USE_GDBM), 1)
86GDBM_DEFINES = -DUSE_GDBM
87GDBM_INCLUDES = -I$(COMMON_PACKAGES_DIR)/gdbm/include
88GDBM_LIBS = $(COMMON_PACKAGES_DIR)/gdbm/lib/libgdbm.a
89else
90GDBM_DEFINES =
91GDBM_INCLUDES =
92GDBM_LIBS =
93endif
94
95USE_JDBM = @USE_JDBM@
96ifeq ($(USE_JDBM), 1)
97JDBM_DEFINES = -DUSE_JDBM
98else
99JDBM_DEFINES =
100endif
101
102USE_SQLITE = @USE_SQLITE@
103ifeq ($(USE_SQLITE), 1)
104SQLITE_DEFINES = -DUSE_SQLITE
105SQLITE_LIBS = $(COMMON_PACKAGES_DIR)/sqlite/lib/libsqlite3.a -ldl -lpthread
106SQL_SOURCES = sqlqueryaction.cpp
107SQL_OBJECTS = sqlqueryaction.o
108else
109SQLITE_DEFINES =
110SQLITE_LIBS =
111SQL_SOURCES =
112SQL_OBJECTS =
113endif
114
115USE_RSS = @USE_RSS@
116ifeq ($(USE_RSS), 1)
117RSS_DEFINES = -DUSE_RSS
118RSS_SOURCES = rssaction.cpp
119RSS_OBJECTS = rssaction.o
120else
121RSS_DEFINES =
122RSS_SOURCES =
123RSS_OBJECTS =
124endif
125
126
127USE_Z3950 = @USE_Z3950@
128ifeq ($(USE_Z3950), 1)
129Z3950_DEFS = -DUSE_Z3950
130Z3950_INCLUDES = -I$(Z3950_DIR)
131Z3950_LIBS = $(Z3950_DIR)/gsdlz3950.a $(RUNTIME_PACKAGES_DIR)/yaz/lib/libyaz.a
132else
133Z3950_DEFS =
134Z3950_INCLUDES =
135Z3950_LIBS =
136endif
137
138USE_APACHE_HTTPD=@USE_APACHE_HTTPD@
139#ifeq ($(USE_APACHE_HTTPD), 1)
140ifeq ($(USE_APACHE_HTTPD), "IGNORE_FOR_NOW")
141APACHE_OBJS = string_pool.o mod_gsdl.o
142
143APACHE_INSTDIR=$(GSDL_DIR)/apache-httpd/$(GSDLOS)
144APACHE_SRCLIBDIR=../../packages/apache-httpd/httpd-2.2.11/srclib
145
146APXS_CFLAGS=-I$(APACHE_INSTDIR)/include \
147  -I$(APACHE_SRCLIBDIR)/apr/include -I$(APACHE_SRCLIBDIR)/apr-util/include
148
149APXS_LDFLAGS= -L$(APACHE_INSTDIR)/lib \
150  -L$(APACHE_SRCLIBDIR)/apr/include -L$(APACHE_SRCLIBDIR)/apr-util/include
151
152APACHE_MODULE = mod_gsdl.so
153else
154APACHE_OBJS =
155APACHE_MODULE =
156endif
157
158# Extension support
159EXT_DEFINES =
160EXT_INCLUDES =
161EXT_LDFLAGS =
162EXT_LIBS =
163
164
165
166AR = ar
167CC = @CC@
168CFLAGS=@CFLAGS@ @ARCH_DEP_FLAGS@
169CXX = @CXX@
170CXXFLAGS = @CXXFLAGS@ @ARCH_DEP_FLAGS@
171DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DHAVE_CONFIG_H $(FASTCGI_DEFS) $(RSS_DEFINES) $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES) $(Z3950_DEFS) $(EXT_DEFINES)
172INCLUDES = -I. -I$(GSDL_DIR) -I$(COMMON_DIR)/src/lib \
173        -I$(COLSERVR_DIR) -I$(PROTOCOL_DIR) \
174    $(MG_INCLUDES) $(MGPP_INCLUDES) \
175        -I$(COMMON_PACKAGES_DIR)/expat/include $(FASTCGI_INCLUDES) $(GDBM_INCLUDES) $(Z3950_INCLUDES) $(EXT_INCLUDES)
176INSTALL = @INSTALL@
177LDFLAGS = @LDFLAGS@ @ARCH_DEP_FLAGS@ $(EXT_LDFLAGS)
178LIBS = @LIBS@ $(GDBM_LIBS) \
179    $(COMMON_PACKAGES_DIR)/expat/lib/libexpat.a \
180    $(ACCENTFOLD_LIBS) $(FASTCGI_LIBS) $(SQLITE_LIBS) $(Z3950_LIBS) $(EXT_LIBS)
181RANLIB = @RANLIB@
182
183
184CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
185CXXLINK = $(CXX) $(LDFLAGS) -o $@
186
187
188SOURCES = \
189    action.cpp \
190    argdb.cpp \
191    authenaction.cpp \
192    browseaction.cpp \
193    browseactiontools.cpp \
194    browserclass.cpp \
195    browsetoolsclass.cpp \
196    cgiargs.cpp \
197    cgiutils.cpp \
198    cgiwrapper.cpp \
199    collectoraction.cpp \
200    configaction.cpp \
201        converter.cpp \
202    datelistbrowserclass.cpp \
203    depositoraction.cpp \
204    documentaction.cpp \
205    dynamicclassifieraction.cpp \
206    extlinkaction.cpp \
207    formattools.cpp \
208    gtiaction.cpp \
209    highlighttext.cpp \
210    historydb.cpp \
211    hlistbrowserclass.cpp \
212    htmlbrowserclass.cpp \
213    htmlutils.cpp \
214    invbrowserclass.cpp \
215    librarymain.cpp \
216    maincfg.cpp \
217    pageaction.cpp \
218    pagedbrowserclass.cpp \
219    $(MGPP_SOURCES) \
220    phindbrowserclass.cpp \
221    pingaction.cpp \
222    ispersistentaction.cpp \
223    basequeryaction.cpp \
224    queryaction.cpp \
225    $(SQL_SOURCES) \
226    querytools.cpp \
227    receptionist.cpp \
228    $(RSS_SOURCES) \
229    statusaction.cpp \
230    summarise.cpp \
231    tipaction.cpp \
232    userdb.cpp \
233    usersaction.cpp \
234    vlistbrowserclass.cpp \
235    wizardaction.cpp
236
237OBJECTS = \
238    action.o \
239    argdb.o \
240    authenaction.o \
241    browseaction.o \
242    browseactiontools.o \
243    browserclass.o \
244    browsetoolsclass.o \
245    cgiargs.o \
246    cgiutils.o \
247    cgiwrapper.o \
248    collectoraction.o \
249    configaction.o \
250        converter.o \
251    datelistbrowserclass.o \
252    depositoraction.o \
253    documentaction.o \
254    dynamicclassifieraction.o \
255    extlinkaction.o \
256    formattools.o \
257    gtiaction.o \
258    highlighttext.o \
259    historydb.o \
260    hlistbrowserclass.o \
261    htmlbrowserclass.o \
262    htmlutils.o \
263    invbrowserclass.o \
264    librarymain.o \
265    maincfg.o \
266    pageaction.o \
267    pagedbrowserclass.o \
268    $(MGPP_OBJECTS) \
269    phindbrowserclass.o \
270    pingaction.o \
271    ispersistentaction.o \
272    basequeryaction.o \
273    queryaction.o \
274    $(SQL_OBJECTS) \
275    querytools.o \
276    receptionist.o \
277    $(RSS_OBJECTS) \
278    statusaction.o \
279    summarise.o \
280    tipaction.o \
281    userdb.o \
282    usersaction.o \
283    vlistbrowserclass.o \
284    wizardaction.o
285
286LIBRARY = gsdlrecpt.a
287
288GSDL_LIBS = \
289    $(PROTOCOL_DIR)/gsdlprotocol.a \
290    $(COLSERVR_DIR)/gsdlcolservr.a \
291    $(MG_INDEXERS_LIBS) \
292    $(MGPP_INDEXERS_LIBS) \
293    $(COMMON_DIR)/src/lib/gsdllib.a
294
295EXECUTABLE_OBJECTS = \
296    $(OBJECTS) \
297    $(GSDL_LIBS)
298
299EXECUTABLE = library.cgi
300
301
302# Default target: make both gsdlrecpt.a and the library executable
303all: $(LIBRARY) $(EXECUTABLE) $(APACHE_MODULE)
304
305gsdlrecpt.a: $(OBJECTS)
306    rm -f $(LIBRARY)
307    $(AR) cru $(LIBRARY) $(OBJECTS)
308    $(RANLIB) $(LIBRARY)
309
310$(EXECUTABLE): $(EXECUTABLE_OBJECTS) $(GSDL_LIBS)
311    $(CXXLINK) $(EXECUTABLE_OBJECTS) $(LIBS)
312
313mod_gsdl.o: mod_gsdl.cpp
314    $(CXX) -c  $(CXXFLAGS) $(DEFS) $(INCLUDES) -D_APACHE_MOD=2 -fPIC $(APXS_CFLAGS) -Wall -o $@ $<
315
316mod_gsdl.so: $(APACHE_OBJS) $(LIBRARY)
317    $(CXX) -fPIC -shared -o $@ $(APACHE_OBJS) $(LIBRARY) $(GSDL_LIBS) $(LIBS)
318
319
320.SUFFIXES:
321.SUFFIXES: .cpp .o
322.cpp.o:
323    $(CXXCOMPILE) $<
324
325
326install: $(EXECUTABLE)
327    $(INSTALL) -m 755 -s $(EXECUTABLE) $(GSDL_DIR)/cgi-bin/$(GSDLOS)$(GSDLARCH)
328#ifeq ($(USE_APACHE_HTTPD), 1)
329ifeq ($(USE_APACHE_HTTPD), "IGNORE_FOR_NOW")
330    $(GSDL_DIR)/apache-httpd/$(GSDLOS)/bin/apxs  -i -n gsdl mod_gsdl.so
331endif
332
333clean:
334    rm -f $(OBJECTS) $(LIBRARY) $(EXECUTABLE) $(APACHE_MODULE) $(APACHE_OBJS)
335
336distclean:
337    rm -f $(OBJECTS) $(LIBRARY) $(EXECUTABLE) Makefile
338
339depend:
340    makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
Note: See TracBrowser for help on using the browser.