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

Last change on this file since 21324 was 21324, checked in by ak19, 14 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
RevLine 
[556]1###########################################################################
2#
[18224]3# Makefile -- runtime-src/src/colservr
[558]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#
[15426]8# Copyright (C) 1999-2008 The New Zealand Digital Library Project
[556]9#
10#
[558]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#
[556]25###########################################################################
26
[16563]27GSDL_DIR = ../../..
[16572]28COMMON_DIR = $(GSDL_DIR)/common-src
[15459]29
[16563]30INDEXERS_DIR = $(COMMON_DIR)/indexers
[18224]31COMMON_PACKAGES_DIR = $(COMMON_DIR)/packages
[15474]32
[21324]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
[16563]52
[21324]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
[15684]83USE_SQLITE = @USE_SQLITE@
84ifeq ($(USE_SQLITE), 1)
[15729]85SQLITE_DEFINES = -DUSE_SQLITE
[18224]86SQLITE_INCLUDES = -I$(COMMON_PACKAGES_DIR)/sqlite/include
[15684]87else
[15729]88SQLITE_DEFINES =
[15684]89SQLITE_INCLUDES =
90endif
91
92
[15466]93AR = ar
[556]94CC = @CC@
[15551]95CXX = @CXX@
96CFLAGS = @CFLAGS@ @COMPAT32BITFLAGS@
97CXXFLAGS = @CXXFLAGS@ @COMPAT32BITFLAGS@
[15729]98DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER $(SQLITE_DEFINES)
[15426]99# Do NOT add the "recpt" directory here: the colserver should be independent of the receptionist!
[18224]100INCLUDES = -I. -I$(GSDL_DIR) -I$(COMMON_DIR)/src/lib -I$(COMMON_PACKAGES_DIR)/gdbm/include \
[21324]101 $(MG_INCLUDES) \
102 $(MGPP_INCLUDES) \
[18224]103 -I$(COMMON_PACKAGES_DIR)/expat/include $(SQLITE_INCLUDES)
[15466]104RANLIB = @RANLIB@
[1323]105
106
[15426]107COMPILE = $(CC) -c $(CFLAGS) $(DEFS) $(INCLUDES)
[15551]108CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
[1323]109
[8031]110
[15426]111.SUFFIXES:
112.SUFFIXES: .c .o
113.c.o:
114 $(COMPILE) $<
[556]115
[15426]116.SUFFIXES: .cpp .o
117.cpp.o:
[15551]118 $(CXXCOMPILE) $<
[15426]119
120
[15460]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 \
[21324]130 $(LUCENE_SOURCES) \
[15460]131 maptools.cpp \
[21324]132 $(MG_SOURCES) \
133 $(MGPP_SOURCES) \
[15460]134 phrasesearch.cpp \
135 querycache.cpp \
136 queryfilter.cpp \
137 queryinfo.cpp \
138 search.cpp \
[15757]139 source.cpp \
140 sqlbrowsefilter.cpp
[15426]141
[15460]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 \
[21324]151 $(LUCENE_OBJECTS) \
[15460]152 maptools.o \
[21324]153 $(MG_OBJECTS) \
154 $(MGPP_OBJECTS) \
[15460]155 phrasesearch.o \
156 querycache.o \
157 queryfilter.o \
158 queryinfo.o \
159 search.o \
[15757]160 source.o \
161 sqlbrowsefilter.o
[556]162
[15466]163LIBRARY = gsdlcolservr.a
[556]164
165
[15579]166# Default target: make gsdlcolservr.a
167all: $(LIBRARY)
168
[15466]169gsdlcolservr.a: $(OBJECTS)
[15579]170 rm -f $(LIBRARY)
171 $(AR) cru $(LIBRARY) $(OBJECTS)
172 $(RANLIB) $(LIBRARY)
[15460]173
[15580]174install:
[15466]175
[15469]176clean:
[15579]177 rm -f $(OBJECTS) $(LIBRARY)
[15469]178
[992]179distclean:
[15579]180 rm -f $(OBJECTS) $(LIBRARY) Makefile
[15460]181
[556]182depend:
[15551]183 makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
Note: See TracBrowser for help on using the repository browser.