1 | ###########################################################################
|
---|
2 | #
|
---|
3 | # Makefile -- 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 |
|
---|
27 | GSDL_DIR = ../..
|
---|
28 | INDEXERS_DIR = $(GSDL_DIR)/indexers
|
---|
29 | PACKAGES_DIR = $(GSDL_DIR)/packages
|
---|
30 |
|
---|
31 |
|
---|
32 | USE_SQLITE = @USE_SQLITE@
|
---|
33 | ifeq ($(USE_SQLITE), 1)
|
---|
34 | SQLITE_DEFINES = -DUSE_SQLITE
|
---|
35 | SQLITE_INCLUDES = -I$(PACKAGES_DIR)/sqlite/include
|
---|
36 | else
|
---|
37 | SQLITE_DEFINES =
|
---|
38 | SQLITE_INCLUDES =
|
---|
39 | endif
|
---|
40 |
|
---|
41 |
|
---|
42 | AR = ar
|
---|
43 | CC = @CC@
|
---|
44 | CXX = @CXX@
|
---|
45 | CFLAGS = @CFLAGS@ @COMPAT32BITFLAGS@
|
---|
46 | CXXFLAGS = @CXXFLAGS@ @COMPAT32BITFLAGS@
|
---|
47 | DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER $(SQLITE_DEFINES)
|
---|
48 | # Do NOT add the "recpt" directory here: the colserver should be independent of the receptionist!
|
---|
49 | INCLUDES = @GDBM_INCLUDE@ -I. -I$(GSDL_DIR) -I$(GSDL_DIR)/lib \
|
---|
50 | -I$(INDEXERS_DIR)/mg -I$(INDEXERS_DIR)/mg/lib -I$(INDEXERS_DIR)/mg/src/text \
|
---|
51 | -I$(INDEXERS_DIR)/mgpp/lib -I$(INDEXERS_DIR)/mgpp/text \
|
---|
52 | -I$(PACKAGES_DIR)/expat/include $(SQLITE_INCLUDES)
|
---|
53 | RANLIB = @RANLIB@
|
---|
54 |
|
---|
55 |
|
---|
56 | COMPILE = $(CC) -c $(CFLAGS) $(DEFS) $(INCLUDES)
|
---|
57 | CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
|
---|
58 |
|
---|
59 |
|
---|
60 | .SUFFIXES:
|
---|
61 | .SUFFIXES: .c .o
|
---|
62 | .c.o:
|
---|
63 | $(COMPILE) $<
|
---|
64 |
|
---|
65 | .SUFFIXES: .cpp .o
|
---|
66 | .cpp.o:
|
---|
67 | $(CXXCOMPILE) $<
|
---|
68 |
|
---|
69 |
|
---|
70 | SOURCES = \
|
---|
71 | browsefilter.cpp \
|
---|
72 | collectserver.cpp \
|
---|
73 | collectset.cpp \
|
---|
74 | colservrconfig.cpp \
|
---|
75 | comtypes.cpp \
|
---|
76 | expat_document.cpp \
|
---|
77 | expat_resultset.cpp \
|
---|
78 | filter.cpp \
|
---|
79 | lucenequeryfilter.cpp \
|
---|
80 | lucenesearch.cpp \
|
---|
81 | lucenesource.cpp \
|
---|
82 | maptools.cpp \
|
---|
83 | mgq.c \
|
---|
84 | mgqueryfilter.cpp \
|
---|
85 | mgsearch.cpp \
|
---|
86 | mgsource.cpp \
|
---|
87 | mgppqueryfilter.cpp \
|
---|
88 | mgppsearch.cpp \
|
---|
89 | phrasequeryfilter.cpp \
|
---|
90 | phrasesearch.cpp \
|
---|
91 | querycache.cpp \
|
---|
92 | queryfilter.cpp \
|
---|
93 | queryinfo.cpp \
|
---|
94 | search.cpp \
|
---|
95 | source.cpp \
|
---|
96 | sqlbrowsefilter.cpp
|
---|
97 |
|
---|
98 | OBJECTS = \
|
---|
99 | browsefilter.o \
|
---|
100 | collectserver.o \
|
---|
101 | collectset.o \
|
---|
102 | colservrconfig.o \
|
---|
103 | comtypes.o \
|
---|
104 | expat_document.o \
|
---|
105 | expat_resultset.o \
|
---|
106 | filter.o \
|
---|
107 | lucenequeryfilter.o \
|
---|
108 | lucenesearch.o \
|
---|
109 | lucenesource.o \
|
---|
110 | maptools.o \
|
---|
111 | mgq.o \
|
---|
112 | mgqueryfilter.o \
|
---|
113 | mgsearch.o \
|
---|
114 | mgsource.o \
|
---|
115 | mgppqueryfilter.o \
|
---|
116 | mgppsearch.o \
|
---|
117 | phrasequeryfilter.o \
|
---|
118 | phrasesearch.o \
|
---|
119 | querycache.o \
|
---|
120 | queryfilter.o \
|
---|
121 | queryinfo.o \
|
---|
122 | search.o \
|
---|
123 | source.o \
|
---|
124 | sqlbrowsefilter.o
|
---|
125 |
|
---|
126 | LIBRARY = gsdlcolservr.a
|
---|
127 |
|
---|
128 |
|
---|
129 | # Default target: make gsdlcolservr.a
|
---|
130 | all: $(LIBRARY)
|
---|
131 |
|
---|
132 | gsdlcolservr.a: $(OBJECTS)
|
---|
133 | rm -f $(LIBRARY)
|
---|
134 | $(AR) cru $(LIBRARY) $(OBJECTS)
|
---|
135 | $(RANLIB) $(LIBRARY)
|
---|
136 |
|
---|
137 | install:
|
---|
138 |
|
---|
139 | clean:
|
---|
140 | rm -f $(OBJECTS) $(LIBRARY)
|
---|
141 |
|
---|
142 | distclean:
|
---|
143 | rm -f $(OBJECTS) $(LIBRARY) Makefile
|
---|
144 |
|
---|
145 | depend:
|
---|
146 | makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
|
---|