source: main/trunk/greenstone2/runtime-src/src/colservr/Makefile.in@ 21472

Last change on this file since 21472 was 21472, checked in by mdewsnip, 11 years ago

Created USE_GDBM and USE_JDBM defines that work similar to USE_SQLITE and USE_MSSQL for controlling which infodb types are compiled in. Currently these are not configurable through the configure scripts and are always on.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 4.5 KB
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
162OBJECTS = \
163 browsefilter.o \
164 collectserver.o \
165 collectset.o \
166 colservrconfig.o \
167 comtypes.o \
168 expat_document.o \
169 expat_resultset.o \
170 filter.o \
171 $(LUCENE_OBJECTS) \
172 maptools.o \
173 $(MG_OBJECTS) \
174 $(MGPP_OBJECTS) \
175 phrasesearch.o \
176 querycache.o \
177 queryfilter.o \
178 queryinfo.o \
179 search.o \
180 source.o \
181 sqlbrowsefilter.o
182
183LIBRARY = gsdlcolservr.a
184
185
186# Default target: make gsdlcolservr.a
187all: $(LIBRARY)
188
189gsdlcolservr.a: $(OBJECTS)
190 rm -f $(LIBRARY)
191 $(AR) cru $(LIBRARY) $(OBJECTS)
192 $(RANLIB) $(LIBRARY)
193
194install:
195
196clean:
197 rm -f $(OBJECTS) $(LIBRARY)
198
199distclean:
200 rm -f $(OBJECTS) $(LIBRARY) Makefile
201
202depend:
203 makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
Note: See TracBrowser for help on using the repository browser.