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

Last change on this file since 21324 was 21324, checked in by ak19, 12 years ago

Changes to makefiles, configure files, and source code to work with the new configure flags that allow indexers to be individually compiled up by setting each indexer to be enabled or disabled (enable-mg, enable-mgpp, enable-lucene)

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