source: gsdl/trunk/runtime-src/src/recpt/Makefile.in@ 19387

Last change on this file since 19387 was 19387, checked in by oranfry, 14 years ago

ignore mod_gsdl install

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 6.7 KB
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@
32
33INDEXERS_DIR = $(COMMON_DIR)/indexers
34COMMON_PACKAGES_DIR = $(COMMON_DIR)/packages
35RUNTIME_PACKAGES_DIR = $(RUNTIME_DIR)/packages
36COLSERVR_DIR = $(RUNTIME_DIR)/src/colservr
37PROTOCOL_DIR = $(RUNTIME_DIR)/src/protocol
38Z3950_DIR = $(RUNTIME_DIR)/src/z3950
39
40
41ENABLE_ACCENTFOLD = @ENABLE_ACCENTFOLD@
42ifeq ($(ENABLE_ACCENTFOLD), 1)
43ACCENTFOLD_LIBS = $(INDEXERS_DIR)/packages/unac/libunac.a
44else
45ACCENTFOLD_LIBS =
46endif
47
48USE_FASTCGI = @USE_FASTCGI@
49ifeq ($(USE_FASTCGI), 1)
50FASTCGI_DEFS = -DUSE_FASTCGI
51FASTCGI_INCLUDES = -I$(RUNTIME_PACKAGES_DIR)/fcgi/include
52FASTCGI_LIBS = $(RUNTIME_PACKAGES_DIR)/fcgi/libfcgi/libfcgi.a
53else
54FASTCGI_DEFS =
55FASTCGI_INCLUDES =
56FASTCGI_LIBS =
57endif
58
59USE_SQLITE = @USE_SQLITE@
60ifeq ($(USE_SQLITE), 1)
61SQLITE_LIBS = $(COMMON_PACKAGES_DIR)/sqlite/lib/libsqlite3.a -ldl -lpthread
62else
63SQLITE_LIBS =
64endif
65
66USE_Z3950 = @USE_Z3950@
67ifeq ($(USE_Z3950), 1)
68Z3950_DEFS = -DUSE_Z3950
69Z3950_INCLUDES = -I$(Z3950_DIR)
70Z3950_LIBS = $(Z3950_DIR)/gsdlz3950.a $(RUNTIME_PACKAGES_DIR)/yaz/lib/libyaz.a
71else
72Z3950_DEFS =
73Z3950_INCLUDES =
74Z3950_LIBS =
75endif
76
77USE_APACHE_HTTPD=@USE_APACHE_HTTPD@
78#ifeq ($(USE_APACHE_HTTPD), 1)
79ifeq ($(USE_APACHE_HTTPD), "IGNORE_FOR_NOW")
80APACHE_OBJS = string_pool.o mod_gsdl.o
81
82APACHE_INSTDIR=$(GSDL_DIR)/apache-httpd/$(GSDLOS)
83APACHE_SRCLIBDIR=../../packages/apache-httpd/httpd-2.2.11/srclib
84
85APXS_CFLAGS=-I$(APACHE_INSTDIR)/include \
86 -I$(APACHE_SRCLIBDIR)/apr/include -I$(APACHE_SRCLIBDIR)/apr-util/include
87
88APXS_LDFLAGS= -L$(APACHE_INSTDIR)/lib \
89 -L$(APACHE_SRCLIBDIR)/apr/include -L$(APACHE_SRCLIBDIR)/apr-util/include
90
91APACHE_MODULE = mod_gsdl.so
92else
93APACHE_OBJS =
94APACHE_MODULE =
95endif
96
97
98AR = ar
99CC = @CC@
100CFLAGS=@CFLAGS@ @COMPAT32BITFLAGS@
101CXX = @CXX@
102CXXFLAGS = @CXXFLAGS@ @COMPAT32BITFLAGS@
103DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DHAVE_CONFIG_H $(FASTCGI_DEFS) $(Z3950_DEFS)
104INCLUDES = -I. -I$(GSDL_DIR) -I$(COMMON_DIR)/src/lib -I$(COMMON_PACKAGES_DIR)/gdbm/include \
105 -I$(COLSERVR_DIR) -I$(PROTOCOL_DIR) \
106 -I$(INDEXERS_DIR)/mg -I$(INDEXERS_DIR)/mg/lib -I$(INDEXERS_DIR)/mgpp/text \
107 -I$(COMMON_PACKAGES_DIR)/expat/include $(FASTCGI_INCLUDES) $(Z3950_INCLUDES)
108INSTALL = @INSTALL@
109LDFLAGS = @LDFLAGS@ @COMPAT32BITFLAGS@
110LIBS = @LIBS@ $(COMMON_PACKAGES_DIR)/gdbm/lib/libgdbm.a -L$(COMMON_PACKAGES_DIR)/expat/lib -lexpat \
111 $(ACCENTFOLD_LIBS) $(FASTCGI_LIBS) $(SQLITE_LIBS) $(Z3950_LIBS)
112RANLIB = @RANLIB@
113
114
115CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
116CXXLINK = $(CXX) $(LDFLAGS) -o $@
117
118
119SOURCES = \
120 action.cpp \
121 argdb.cpp \
122 authenaction.cpp \
123 browseaction.cpp \
124 browseactiontools.cpp \
125 browserclass.cpp \
126 browsetoolsclass.cpp \
127 cgiargs.cpp \
128 cgiutils.cpp \
129 cgiwrapper.cpp \
130 collectoraction.cpp \
131 configaction.cpp \
132 converter.cpp \
133 datelistbrowserclass.cpp \
134 depositoraction.cpp \
135 documentaction.cpp \
136 dynamicclassifieraction.cpp \
137 extlinkaction.cpp \
138 formattools.cpp \
139 gtiaction.cpp \
140 highlighttext.cpp \
141 historydb.cpp \
142 hlistbrowserclass.cpp \
143 htmlbrowserclass.cpp \
144 htmlutils.cpp \
145 invbrowserclass.cpp \
146 librarymain.cpp \
147 maincfg.cpp \
148 pageaction.cpp \
149 pagedbrowserclass.cpp \
150 phindaction.cpp \
151 phindbrowserclass.cpp \
152 pingaction.cpp \
153 queryaction.cpp \
154 querytools.cpp \
155 receptionist.cpp \
156 statusaction.cpp \
157 summarise.cpp \
158 tipaction.cpp \
159 userdb.cpp \
160 usersaction.cpp \
161 vlistbrowserclass.cpp \
162 wizardaction.cpp
163
164OBJECTS = \
165 action.o \
166 argdb.o \
167 authenaction.o \
168 browseaction.o \
169 browseactiontools.o \
170 browserclass.o \
171 browsetoolsclass.o \
172 cgiargs.o \
173 cgiutils.o \
174 cgiwrapper.o \
175 collectoraction.o \
176 configaction.o \
177 converter.o \
178 datelistbrowserclass.o \
179 depositoraction.o \
180 documentaction.o \
181 dynamicclassifieraction.o \
182 extlinkaction.o \
183 formattools.o \
184 gtiaction.o \
185 highlighttext.o \
186 historydb.o \
187 hlistbrowserclass.o \
188 htmlbrowserclass.o \
189 htmlutils.o \
190 invbrowserclass.o \
191 librarymain.o \
192 maincfg.o \
193 pageaction.o \
194 pagedbrowserclass.o \
195 phindaction.o \
196 phindbrowserclass.o \
197 pingaction.o \
198 queryaction.o \
199 querytools.o \
200 receptionist.o \
201 statusaction.o \
202 summarise.o \
203 tipaction.o \
204 userdb.o \
205 usersaction.o \
206 vlistbrowserclass.o \
207 wizardaction.o
208
209LIBRARY = gsdlrecpt.a
210
211GSDL_LIBS = \
212 $(PROTOCOL_DIR)/gsdlprotocol.a \
213 $(COLSERVR_DIR)/gsdlcolservr.a \
214 $(INDEXERS_DIR)/mg/src/text/libmgtext.a \
215 $(INDEXERS_DIR)/mg/lib/libmglib.a \
216 $(INDEXERS_DIR)/mgpp/text/libmgpptext.a \
217 $(INDEXERS_DIR)/mgpp/lib/libmgpplib.a \
218 $(COMMON_DIR)/src/lib/gsdllib.a
219
220EXECUTABLE_OBJECTS = \
221 $(OBJECTS) \
222 $(GSDL_LIBS)
223
224EXECUTABLE = library.cgi
225
226
227# Default target: make both gsdlrecpt.a and the library executable
228all: $(LIBRARY) $(EXECUTABLE) $(APACHE_MODULE)
229
230gsdlrecpt.a: $(OBJECTS)
231 rm -f $(LIBRARY)
232 $(AR) cru $(LIBRARY) $(OBJECTS)
233 $(RANLIB) $(LIBRARY)
234
235$(EXECUTABLE): $(EXECUTABLE_OBJECTS) $(GSDL_LIBS)
236 $(CXXLINK) $(EXECUTABLE_OBJECTS) $(LIBS)
237
238mod_gsdl.o: mod_gsdl.cpp
239 $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES) -D_APACHE_MOD=2 -fPIC $(APXS_CFLAGS) -Wall -o $@ $<
240
241mod_gsdl.so: $(APACHE_OBJS) $(LIBRARY)
242 $(CXX) -fPIC -shared -o $@ $(APACHE_OBJS) $(LIBRARY) $(GSDL_LIBS) $(LIBS)
243
244
245.SUFFIXES:
246.SUFFIXES: .cpp .o
247.cpp.o:
248 $(CXXCOMPILE) $<
249
250
251install: $(EXECUTABLE)
252 $(INSTALL) -m 755 -s $(EXECUTABLE) $(GSDL_DIR)/cgi-bin
253#ifeq ($(USE_APACHE_HTTPD), 1)
254ifeq ($(USE_APACHE_HTTPD), "IGNORE_FOR_NOW")
255 $(GSDL_DIR)/apache-httpd/$(GSDLOS)/bin/apxs -i -n gsdl mod_gsdl.so
256endif
257
258clean:
259 rm -f $(OBJECTS) $(LIBRARY) $(EXECUTABLE) $(APACHE_MODULE) $(APACHE_OBJS)
260
261distclean:
262 rm -f $(OBJECTS) $(LIBRARY) $(EXECUTABLE) Makefile
263
264depend:
265 makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
Note: See TracBrowser for help on using the repository browser.