1 | ###########################################################################
|
---|
2 | #
|
---|
3 | # Makefile -- src/oaiservr
|
---|
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 | COLSERVR_DIR = $(GSDL_DIR)/src/colservr
|
---|
30 | PROTOCOL_DIR = $(GSDL_DIR)/src/protocol
|
---|
31 | RECPT_DIR = $(GSDL_DIR)/src/recpt
|
---|
32 |
|
---|
33 | ENABLE_ACCENTFOLD = @ENABLE_ACCENTFOLD@
|
---|
34 | ifeq ($(ENABLE_ACCENTFOLD), 1)
|
---|
35 | ACCENTFOLD_LIBS = $(INDEXERS_DIR)/packages/unac/libunac.a
|
---|
36 | else
|
---|
37 | ACCENTFOLD_LIBS =
|
---|
38 | endif
|
---|
39 |
|
---|
40 | CPP = @CXX@
|
---|
41 | CPPFLAGS = @CXXFLAGS@
|
---|
42 | INCLUDES = -I$(GSDL_DIR)/lib -I$(COLSERVR_DIR) -I$(PROTOCOL_DIR) -I$(RECPT_DIR) -I$(INDEXERS_DIR)/mgpp/text
|
---|
43 | LDFLAGS = @LDFLAGS@
|
---|
44 | LIBS = @LIBS@ @GDBM_LIBPATH@ -lgdbm -L$(GSDL_DIR)/packages/expat/lib -lexpat $(ACCENTFOLD_LIBS)
|
---|
45 | INSTALL = @INSTALL@
|
---|
46 |
|
---|
47 | CPPCOMPILE = $(CPP) -c $(CPPFLAGS) $(INCLUDES)
|
---|
48 | CPPLINK = $(CPP) $(LDFLAGS) -o $@
|
---|
49 |
|
---|
50 |
|
---|
51 | .SUFFIXES:
|
---|
52 | .SUFFIXES: .cpp .o
|
---|
53 | .cpp.o:
|
---|
54 | $(CPPCOMPILE) -o $@ $<
|
---|
55 |
|
---|
56 |
|
---|
57 | COLSERVR_OBJECTS = \
|
---|
58 | $(COLSERVR_DIR)/comtypes.o \
|
---|
59 | $(COLSERVR_DIR)/mgq.o \
|
---|
60 | $(COLSERVR_DIR)/search.o \
|
---|
61 | $(COLSERVR_DIR)/mgsearch.o \
|
---|
62 | $(COLSERVR_DIR)/querycache.o \
|
---|
63 | $(COLSERVR_DIR)/queryinfo.o \
|
---|
64 | $(COLSERVR_DIR)/collectserver.o \
|
---|
65 | $(COLSERVR_DIR)/colservrconfig.o \
|
---|
66 | $(COLSERVR_DIR)/maptools.o \
|
---|
67 | $(COLSERVR_DIR)/filter.o \
|
---|
68 | $(COLSERVR_DIR)/source.o \
|
---|
69 | $(COLSERVR_DIR)/browsefilter.o \
|
---|
70 | $(COLSERVR_DIR)/queryfilter.o \
|
---|
71 | $(COLSERVR_DIR)/gdbmsource.o \
|
---|
72 | $(COLSERVR_DIR)/mggdbmsource.o \
|
---|
73 | $(COLSERVR_DIR)/phrasesearch.o \
|
---|
74 | $(COLSERVR_DIR)/phrasequeryfilter.o \
|
---|
75 | $(COLSERVR_DIR)/mgqueryfilter.o \
|
---|
76 | $(COLSERVR_DIR)/mgppsearch.o \
|
---|
77 | $(COLSERVR_DIR)/mgppqueryfilter.o \
|
---|
78 | $(COLSERVR_DIR)/collectset.o \
|
---|
79 | $(COLSERVR_DIR)/lucenesearch.o \
|
---|
80 | $(COLSERVR_DIR)/lucenequeryfilter.o \
|
---|
81 | $(COLSERVR_DIR)/lucenegdbmsource.o \
|
---|
82 | $(COLSERVR_DIR)/expat_resultset.o \
|
---|
83 | $(COLSERVR_DIR)/expat_document.o
|
---|
84 |
|
---|
85 | PROTOCOL_OBJECTS = \
|
---|
86 | $(PROTOCOL_DIR)/nullproto.o \
|
---|
87 | $(PROTOCOL_DIR)/recptproto.o
|
---|
88 |
|
---|
89 | RECPT_OBJECTS = \
|
---|
90 | $(RECPT_DIR)/cgiargs.o \
|
---|
91 | $(RECPT_DIR)/cgiutils.o \
|
---|
92 | $(RECPT_DIR)/htmlutils.o \
|
---|
93 | $(RECPT_DIR)/recptprototools.o
|
---|
94 |
|
---|
95 | SOURCES = \
|
---|
96 | abstractlistaction.cpp \
|
---|
97 | dublincore.cpp \
|
---|
98 | identityaction.cpp \
|
---|
99 | listidsaction.cpp \
|
---|
100 | listrecsaction.cpp \
|
---|
101 | listsetsaction.cpp \
|
---|
102 | metaformat.cpp \
|
---|
103 | metaformatsaction.cpp \
|
---|
104 | oaiaction.cpp \
|
---|
105 | oaiargs.cpp \
|
---|
106 | oaiconfig.cpp \
|
---|
107 | oaidispatcher.cpp \
|
---|
108 | oaimain.cpp \
|
---|
109 | oaitools.cpp \
|
---|
110 | recordaction.cpp \
|
---|
111 | resumptiontoken.cpp \
|
---|
112 | rfc1807.cpp
|
---|
113 |
|
---|
114 | OBJECTS = \
|
---|
115 | abstractlistaction.o \
|
---|
116 | dublincore.o \
|
---|
117 | identityaction.o \
|
---|
118 | listidsaction.o \
|
---|
119 | listrecsaction.o \
|
---|
120 | listsetsaction.o \
|
---|
121 | metaformat.o \
|
---|
122 | metaformatsaction.o \
|
---|
123 | oaiaction.o \
|
---|
124 | oaiargs.o \
|
---|
125 | oaiconfig.o \
|
---|
126 | oaidispatcher.o \
|
---|
127 | oaimain.o \
|
---|
128 | oaitools.o \
|
---|
129 | recordaction.o \
|
---|
130 | resumptiontoken.o \
|
---|
131 | rfc1807.o
|
---|
132 |
|
---|
133 | GSDL_LIBS = \
|
---|
134 | $(GSDL_DIR)/lib/gsdllib.a \
|
---|
135 | $(INDEXERS_DIR)/mg/src/text/libmgtext.a \
|
---|
136 | $(INDEXERS_DIR)/mg/lib/libmglib.a \
|
---|
137 | $(INDEXERS_DIR)/mgpp/text/libmgpptext.a \
|
---|
138 | $(INDEXERS_DIR)/mgpp/lib/libmgpplib.a
|
---|
139 |
|
---|
140 | EXEC_OBJECTS = \
|
---|
141 | $(OBJECTS) \
|
---|
142 | $(RECPT_OBJECTS) \
|
---|
143 | $(PROTOCOL_OBJECTS) \
|
---|
144 | $(COLSERVR_OBJECTS) \
|
---|
145 | $(GSDL_LIBS)
|
---|
146 |
|
---|
147 | EXEC = oaiserver
|
---|
148 |
|
---|
149 |
|
---|
150 | oaiserver: $(EXEC_OBJECTS)
|
---|
151 | $(CPPLINK) $(EXEC_OBJECTS) $(LIBS)
|
---|
152 |
|
---|
153 | all: $(EXEC)
|
---|
154 |
|
---|
155 | install: $(EXEC)
|
---|
156 | $(INSTALL) -m 755 -s $(EXEC) $(GSDL_DIR)/cgi-bin
|
---|
157 |
|
---|
158 | clean:
|
---|
159 | rm -f $(OBJECTS) $(EXEC)
|
---|
160 |
|
---|
161 | distclean:
|
---|
162 | rm -f $(OBJECTS) $(EXEC) Makefile
|
---|
163 |
|
---|
164 | depend:
|
---|
165 | makedepend -Y -- $(DEFS) $(INCLUDES) $(CPPFLAGS) -- $(SOURCES)
|
---|