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

Last change on this file since 25234 was 25234, checked in by jmt12, 9 years ago

Adding some variables to the Makefile.in that extensions can override/add to as necessary - this is needed for TDB support

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 4.6 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
83USE_GDBM = @USE_GDBM@
84ifeq ($(USE_GDBM), 1)
85GDBM_DEFINES = -DUSE_GDBM
86GDBM_INCLUDES = -I$(COMMON_PACKAGES_DIR)/gdbm/include
87else
88GDBM_DEFINES =
89GDBM_INCLUDES =
90endif
91
92
93USE_JDBM = @USE_JDBM@
94ifeq ($(USE_JDBM), 1)
95JDBM_DEFINES = -DUSE_JDBM
96else
97JDBM_DEFINES =
98endif
99
100
101USE_SQLITE = @USE_SQLITE@
102ifeq ($(USE_SQLITE), 1)
103SQLITE_DEFINES = -DUSE_SQLITE
104SQLITE_INCLUDES = -I$(COMMON_PACKAGES_DIR)/sqlite/include
105else
106SQLITE_DEFINES =
107SQLITE_INCLUDES =
108endif
109
110# Support for Extensions
111EXT_DEFINES =
112EXT_INCLUDES =
113
114AR = ar
115CC = @CC@
116CXX = @CXX@
117CFLAGS = @CFLAGS@ @ARCH_DEP_FLAGS@
118CXXFLAGS = @CXXFLAGS@ @ARCH_DEP_FLAGS@
119DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES) $(EXT_DEFINES)
120# Do NOT add the "recpt" directory here: the colserver should be independent of the receptionist!
121INCLUDES = -I. -I$(GSDL_DIR) -I$(COMMON_DIR)/src/lib \
122 $(MG_INCLUDES) \
123 $(MGPP_INCLUDES) \
124 -I$(COMMON_PACKAGES_DIR)/expat/include \
125 $(GDBM_INCLUDES) $(SQLITE_INCLUDES) $(EXT_INCLUDES)
126RANLIB = @RANLIB@
127
128
129COMPILE = $(CC) -c $(CFLAGS) $(DEFS) $(INCLUDES)
130CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
131
132
133.SUFFIXES:
134.SUFFIXES: .c .o
135.c.o:
136 $(COMPILE) $<
137
138.SUFFIXES: .cpp .o
139.cpp.o:
140 $(CXXCOMPILE) $<
141
142
143SOURCES = \
144 browsefilter.cpp \
145 collectserver.cpp \
146 collectset.cpp \
147 colservrconfig.cpp \
148 comtypes.cpp \
149 expat_document.cpp \
150 expat_resultset.cpp \
151 filter.cpp \
152 $(LUCENE_SOURCES) \
153 maptools.cpp \
154 $(MG_SOURCES) \
155 $(MGPP_SOURCES) \
156 phrasesearch.cpp \
157 querycache.cpp \
158 queryfilter.cpp \
159 queryinfo.cpp \
160 search.cpp \
161 source.cpp \
162 sqlbrowsefilter.cpp \
163 sqlqueryfilter.cpp \
164 sqlfilter.cpp
165
166OBJECTS = \
167 browsefilter.o \
168 collectserver.o \
169 collectset.o \
170 colservrconfig.o \
171 comtypes.o \
172 expat_document.o \
173 expat_resultset.o \
174 filter.o \
175 $(LUCENE_OBJECTS) \
176 maptools.o \
177 $(MG_OBJECTS) \
178 $(MGPP_OBJECTS) \
179 phrasesearch.o \
180 querycache.o \
181 queryfilter.o \
182 queryinfo.o \
183 search.o \
184 source.o \
185 sqlbrowsefilter.o \
186 sqlqueryfilter.o \
187 sqlfilter.o
188
189LIBRARY = gsdlcolservr.a
190
191
192# Default target: make gsdlcolservr.a
193all: $(LIBRARY)
194
195gsdlcolservr.a: $(OBJECTS)
196 rm -f $(LIBRARY)
197 $(AR) cru $(LIBRARY) $(OBJECTS)
198 $(RANLIB) $(LIBRARY)
199
200install:
201
202clean:
203 rm -f $(OBJECTS) $(LIBRARY)
204
205distclean:
206 rm -f $(OBJECTS) $(LIBRARY) Makefile
207
208depend:
209 makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
Note: See TracBrowser for help on using the repository browser.