root/main/trunk/greenstone2/runtime-src/src/colservr/Makefile.in @ 22050

Revision 22050, 4.6 KB (checked in by davidb, 10 years ago)

Updating of code to support sql-query filter

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1###########################################################################
2#
3# Makefile -- runtime-src/src/colservr
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
29
30INDEXERS_DIR = $(COMMON_DIR)/indexers
31COMMON_PACKAGES_DIR = $(COMMON_DIR)/packages
32
33# NOTE: phrasequeryfilter inherits from mgqueryfilter and uses mgsearch
34ENABLE_MG = @ENABLE_MG@
35ifeq ($(ENABLE_MG), 1)
36MG_SOURCES = mgq.c \
37    mgqueryfilter.cpp \
38    mgsearch.cpp \
39    mgsource.cpp \
40    phrasequeryfilter.cpp
41MG_OBJECTS = mgq.o \
42    mgqueryfilter.o \
43    mgsearch.o \
44    mgsource.o \
45    phrasequeryfilter.o
46MG_INCLUDES = -I$(INDEXERS_DIR)/mg -I$(INDEXERS_DIR)/mg/lib -I$(INDEXERS_DIR)/mg/src/text
47else
48MG_SOURCES =
49MG_OBJECTS =
50MG_INCLUDES =
51endif
52
53ENABLE_MGPP = @ENABLE_MGPP@
54ifeq ($(ENABLE_MGPP), 1)
55MGPP_SOURCES = mgppqueryfilter.cpp \
56    mgppsearch.cpp \
57    mgppsource.cpp
58MGPP_OBJECTS = mgppqueryfilter.o \
59    mgppsearch.o \
60    mgppsource.o
61MGPP_INCLUDES = -I$(INDEXERS_DIR)/mgpp/lib -I$(INDEXERS_DIR)/mgpp/text
62else
63MGPP_SOURCES =
64MGPP_OBJECTS =
65MGPP_INCLUDES =
66endif
67
68
69ENABLE_LUCENE = @ENABLE_LUCENE@
70ifeq ($(ENABLE_LUCENE), 1)
71LUCENE_SOURCES = lucenequeryfilter.cpp \
72    lucenesearch.cpp \
73    lucenesource.cpp
74LUCENE_OBJECTS = lucenequeryfilter.o \
75    lucenesearch.o \
76    lucenesource.o
77else
78LUCENE_SOURCES =
79LUCENE_OBJECTS =
80endif
81
82
83# Currently not configurable, and always on
84USE_GDBM = 1
85ifeq ($(USE_GDBM), 1)
86GDBM_DEFINES = -DUSE_GDBM
87GDBM_INCLUDES = -I$(COMMON_PACKAGES_DIR)/gdbm/include
88else
89GDBM_DEFINES =
90GDBM_INCLUDES =
91endif
92
93
94# Currently not configurable, and always on
95USE_JDBM = 1
96ifeq ($(USE_JDBM), 1)
97JDBM_DEFINES = -DUSE_JDBM
98else
99JDBM_DEFINES =
100endif
101
102
103USE_SQLITE = @USE_SQLITE@
104ifeq ($(USE_SQLITE), 1)
105SQLITE_DEFINES = -DUSE_SQLITE
106SQLITE_INCLUDES = -I$(COMMON_PACKAGES_DIR)/sqlite/include
107else
108SQLITE_DEFINES =
109SQLITE_INCLUDES =
110endif
111
112
113AR = ar
114CC = @CC@
115CXX = @CXX@
116CFLAGS = @CFLAGS@ @COMPAT32BITFLAGS@
117CXXFLAGS = @CXXFLAGS@ @COMPAT32BITFLAGS@
118DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES)
119# Do NOT add the "recpt" directory here: the colserver should be independent of the receptionist!
120INCLUDES = -I. -I$(GSDL_DIR) -I$(COMMON_DIR)/src/lib \
121    $(MG_INCLUDES) \
122    $(MGPP_INCLUDES) \
123    -I$(COMMON_PACKAGES_DIR)/expat/include $(GDBM_INCLUDES) $(SQLITE_INCLUDES)
124RANLIB = @RANLIB@
125
126
127COMPILE = $(CC) -c $(CFLAGS) $(DEFS) $(INCLUDES)
128CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
129
130
131.SUFFIXES:
132.SUFFIXES: .c .o
133.c.o:
134    $(COMPILE) $<
135
136.SUFFIXES: .cpp .o
137.cpp.o:
138    $(CXXCOMPILE) $<
139
140
141SOURCES = \
142        browsefilter.cpp \
143    collectserver.cpp \
144    collectset.cpp \
145        colservrconfig.cpp \
146    comtypes.cpp \
147    expat_document.cpp \
148    expat_resultset.cpp \
149    filter.cpp \
150    $(LUCENE_SOURCES) \
151    maptools.cpp \
152    $(MG_SOURCES) \
153    $(MGPP_SOURCES) \
154    phrasesearch.cpp \
155    querycache.cpp \
156    queryfilter.cpp \
157    queryinfo.cpp \
158    search.cpp \
159    source.cpp \
160    sqlbrowsefilter.cpp \
161    sqlqueryfilter.cpp \
162    sqlfilter.cpp
163
164OBJECTS = \
165        browsefilter.o \
166    collectserver.o \
167    collectset.o \
168        colservrconfig.o \
169    comtypes.o \
170    expat_document.o \
171    expat_resultset.o \
172    filter.o \
173    $(LUCENE_OBJECTS) \
174    maptools.o \
175    $(MG_OBJECTS) \
176    $(MGPP_OBJECTS) \
177    phrasesearch.o \
178    querycache.o \
179    queryfilter.o \
180    queryinfo.o \
181    search.o \
182    source.o \
183    sqlbrowsefilter.o \
184    sqlqueryfilter.o \
185    sqlfilter.o
186
187LIBRARY = gsdlcolservr.a
188
189
190# Default target: make gsdlcolservr.a
191all: $(LIBRARY)
192
193gsdlcolservr.a: $(OBJECTS)
194    rm -f $(LIBRARY)
195    $(AR) cru $(LIBRARY) $(OBJECTS)
196    $(RANLIB) $(LIBRARY)
197
198install:
199
200clean:
201    rm -f $(OBJECTS) $(LIBRARY)
202
203distclean:
204    rm -f $(OBJECTS) $(LIBRARY) Makefile
205
206depend:
207    makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
Note: See TracBrowser for help on using the browser.