source: trunk/gsdl/src/recpt/Makefile.in@ 1937

Last change on this file since 1937 was 1937, checked in by jrm21, 23 years ago

z39.50 support is now disabled by default, enabled by configure script.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 10.4 KB
Line 
1###########################################################################
2#
3# Makefile -- src/recpt
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 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
27USE_Z3950 = @USE_Z3950@
28ifeq ($(USE_Z3950), 1)
29Z_CFLAGS=-DUSE_Z3950
30else
31Z_CFLAGS=
32endif
33
34AR = ar
35CC = @CC@
36CPP = @CXX@
37#CCFLAGS = @CFLAGS@ -Wall -Wunused -pedantic -W -Woverloaded-virtual
38
39CCFLAGS = $(Z_CFLAGS) @CFLAGS@
40
41# YAZ kit for z39.50
42YAZDIR=../../packages/yaz
43
44USE_FASTCGI = @USE_FASTCGI@
45ifneq ($(USE_FASTCGI), 1)
46DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM @DEFS@
47INCLUDES = -I../../lib -I. -I../colservr -I../../packages/mg \
48 -I../../packages/mg/lib -I../../packages/mg/src/text \
49 -I../mgpp/lib -I../mgpp/text
50else
51DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DUSE_FASTCGI @DEFS@
52
53INCLUDES = -I../../lib -I. -I../colservr -I../../packages/mg \
54 -I../../packages/mg/lib -I../../packages/mg/src/text \
55 -I../../packages/fcgi/include -I../mgpp/lib \
56 -I../mgpp/text
57endif
58MICO_DIR = @MICO_DIR@
59ifeq ($(MICO_DIR), yes)
60MICO_INC =
61MICO_LIB =
62else
63ifeq ($(MICO_DIR), default)
64MICO_DIR = ../../packages/mico/include
65endif
66MICO_INC = -I$(MICO_DIR)
67MICO_LIB = -L$(MICO_DIR)
68endif
69MINCLUDES = -I. -I../../lib -I../colservr $(MICO_INC)
70
71USE_CORBA = @USE_CORBA@
72
73RANLIB = @RANLIB@
74LDFLAGS = @LDFLAGS@
75LIBS = @LIBS@
76
77GSDLOS = @gsdlos@
78
79
80COMPILE = $(CC) -c $(CCFLAGS) $(DEFS) $(INCLUDES)
81LINK = $(CC) $(LDFLAGS) -o $@
82
83CPPCOMPILE = $(CPP) -c $(CCFLAGS) $(DEFS) $(INCLUDES)
84CPPLINK = $(CPP) $(LDFLAGS) -o $@
85
86MCOMPILE = mico-c++ -x c++ $(MCFLAGS) $(DEFS) $(MINCLUDES) -c
87MLINK = mico-ld -static $(LDFLAGS) $(MICO_LIB) -o $@
88MLIBS = $(LIBS) -lmico2.2.7
89
90.SUFFIXES:
91.SUFFIXES: .c .o
92.c.o:
93 $(COMPILE) $<
94
95.SUFFIXES: .cpp .o
96.cpp.o:
97 $(CPPCOMPILE) $<
98
99.SUFFIXES: .mpp .o
100.mpp.o:
101 $(MCOMPILE) $<
102
103COMMONHEADERS = receptionist.h cgiwrapper.h cgiargs.h action.h browserclass.h \
104 converter.h recptconfig.h cgiutils.h OIDtools.h browsetools.h htmlgen.h \
105 statusaction.h pageaction.h comtypes.h recptproto.h \
106 pingaction.h queryaction.h documentaction.h \
107 extlinkaction.h htmlutils.h \
108 querytools.h formattools.h tipaction.h authenaction.h infodbclass.h \
109 userdb.h usersaction.h vlistbrowserclass.h hlistbrowserclass.h \
110 datelistbrowserclass.h invbrowserclass.h pagedbrowserclass.h \
111 htmlbrowserclass.h phindbrowserclass.h \
112 historydb.h collectoraction.h
113
114RECEPTHEADERS =
115
116ifeq ($(USE_CORBA), 1)
117LIBRARYHEADERS = nullproto.h z3950proto.h z3950server.h corbaproto.h
118else
119LIBRARYHEADERS = nullproto.h z3950proto.h z3950server.h
120endif
121
122HEADERS = $(COMMONHEADERS) $(RECPTHEADERS) $(LIBRARYHEADERS)
123
124
125COMMONSOURCES = receptionist.cpp cgiwrapper.cpp cgiargs.cpp action.cpp browserclass.cpp \
126 converter.cpp recptconfig.cpp cgiutils.cpp OIDtools.cpp browsetools.cpp \
127 htmlgen.cpp statusaction.cpp pageaction.cpp comtypes.cpp \
128 recptproto.cpp pingaction.cpp queryaction.cpp documentaction.cpp \
129 extlinkaction.cpp htmlutils.cpp querytools.cpp formattools.cpp \
130 tipaction.cpp authenaction.cpp infodbclass.cpp userdb.cpp usersaction.cpp \
131 vlistbrowserclass.cpp hlistbrowserclass.cpp datelistbrowserclass.cpp \
132 invbrowserclass.cpp pagedbrowserclass.cpp htmlbrowserclass.cpp \
133 phindbrowserclass.cpp historydb.cpp collectoraction.cpp
134
135
136RECPTSOURCES = recptmain.cpp
137
138ifeq ($(USE_Z3950), 1)
139Z_LIBSOURCES=z3950proto.cpp z3950server.cpp zparse.tab.c parse.yy.c $(YAZDIR)/client/yaz_zclient.c
140else
141Z_LIBSOURCES=
142endif
143
144LIBRARYSOURCES = nullproto.cpp librarymain.cpp $(Z_LIBSOURCES)
145
146SOURCES = $(COMMONSOURCES) $(RECPTSOURCES) $(LIBRARYSOURCES)
147
148
149ifeq ($(USE_Z3950), 1)
150Z_COMOBJS=parse.yy.o
151else
152Z_COMOBJS=
153endif
154
155COMMONOBJECTS = receptionist.o cgiwrapper.o cgiargs.o action.o browserclass.o \
156 converter.o recptconfig.o cgiutils.o OIDtools.o browsetools.o \
157 htmlgen.o statusaction.o pageaction.o comtypes.o \
158 recptproto.o pingaction.o queryaction.o documentaction.o \
159 extlinkaction.o htmlutils.o querytools.o \
160 formattools.o tipaction.o authenaction.o \
161 infodbclass.o userdb.o usersaction.o vlistbrowserclass.o \
162 hlistbrowserclass.o datelistbrowserclass.o invbrowserclass.o \
163 pagedbrowserclass.o htmlbrowserclass.o phindbrowserclass.o \
164 historydb.o $(Z_COMOBJS) collectoraction.o
165
166RECPTOBJECTS = recptmain.o
167
168
169ifeq ($(USE_Z3950), 1)
170Z_LIBOBJS=z3950proto.o z3950server.o zparse.tab.o $(YAZDIR)/client/yaz_zclient.o
171else
172Z_LIBOBJS=
173endif
174
175LIBRARYOBJECTS = nullproto.o librarymain.o $(Z_LIBOBJS)
176
177OBJECTS = $(COMMONOBJECTS) $(RECPTOBJECTS) $(LIBRARYOBJECTS)
178
179
180COLSERVROBJECTS = ../colservr/mgq.o \
181 ../colservr/search.o \
182 ../colservr/mgsearch.o \
183 ../colservr/querycache.o \
184 ../colservr/queryinfo.o \
185 ../colservr/collectserver.o \
186 ../colservr/colservrconfig.o \
187 ../colservr/maptools.o \
188 ../colservr/filter.o \
189 ../colservr/source.o \
190 ../colservr/browsefilter.o \
191 ../colservr/queryfilter.o \
192 ../colservr/mggdbmsource.o \
193 ../colservr/phrasesearch.o \
194 ../colservr/phrasequeryfilter.o \
195 ../colservr/mgqueryfilter.o \
196 ../colservr/mgppsearch.o \
197 ../colservr/mgppqueryfilter.o \
198 ../colservr/collectset.o
199
200ifeq ($(USE_CORBA), 1)
201#EXEC = recpt library corbaserver corbarecptldd
202EXEC = library corbaserver corbarecptldd
203else
204#EXEC = recpt library
205EXEC = library
206endif
207
208all: $(EXEC)
209
210
211
212## z39.50 rules
213# Note! If USE_FASTCGI=1, yaz is still compiled and linked, but never
214# called by librarymain.cpp.
215$(YAZDIR)/client/yaz_zclient.o: $(YAZDIR)/lib/libyaz.a
216 cd $(YAZDIR)/client && make yaz_zclient.o
217
218# this should be done by the top level makefile...
219$(YAZDIR)/lib/libyaz.a:
220 cd $(YAZDIR) && make all
221
222# put a separate rule here, as it speeds up compilation of other objects
223# if they don't need to include all the yaz headers
224z3950%.o: z3950%.cpp
225 $(COMPILE) -I$(YAZDIR)/include $<
226
227zparse.tab.c: zparse.y
228 @YACC@ -b zparse -d zparse.y
229
230zparse.tab.h: zparse.tab.c
231
232parse.yy.c: parse.fl zparse.tab.h
233 flex -oparse.yy.c parse.fl
234
235
236
237# We'll keep the .c and .h files for those without lex/flex and yacc/bison.
238#PARSE_TMPFILES= zparse.tab.o zparse.tab.c zparse.tab.h parse.yy.o parse.yy.c
239PARSE_TMPFILE=zparse.tab.o parse.yy.o
240
241distclean:
242 rm -f $(OBJECTS) $(EXEC) $(PARSE_TMPFILES) Makefile
243
244clean:
245 rm -f $(OBJECTS) $(EXEC) $(PARSE_TMPFILES)
246
247install:
248 install -m 755 -s library ../../cgi-bin
249
250depend:
251 makedepend -Y -- $(DEFS) $(INCLUDES) $(CCFLAGS) -- $(SOURCES)
252
253# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
254
255
256ifneq ($(USE_FASTCGI), 1)
257RECPT_OBJS = $(COMMONOBJECTS) $(RECPTOBJECTS) \
258 ../../lib/gsdllib.a \
259 ../../packages/mg/src/text/libtextin.a \
260 ../../packages/mg/lib/libmg.a \
261 ../mgpp/text/libtextin.a \
262 ../mgpp/lib/libmg.a
263else
264RECPT_OBJS = $(COMMONOBJECTS) $(RECPTOBJECTS) \
265 ../../lib/gsdllib.a \
266 ../../packages/mg/src/text/libtextin.a \
267 ../../packages/mg/lib/libmg.a \
268 ../../packages/fcgi/libfcgi/libfcgi.a \
269 ../mgpp/text/libtextin.a \
270 ../mgpp/lib/libmg.a
271endif
272
273recpt: $(RECPT_OBJS)
274 $(CPPLINK) $(RECPT_OBJS) $(LIBS)
275
276# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
277ifeq ($(USE_Z3950), 1)
278Z_LIBYAZ_A=$(YAZDIR)/lib/libyaz.a
279else
280Z_LIBYAZ_A=
281endif
282
283
284ifneq ($(USE_FASTCGI), 1)
285LIBRARY_OBJS = $(COMMONOBJECTS) $(LIBRARYOBJECTS) $(COLSERVROBJECTS) \
286 ../../lib/gsdllib.a \
287 ../../packages/mg/src/text/libtextin.a \
288 ../../packages/mg/lib/libmg.a \
289 $(Z_LIBYAZ_A) \
290 ../mgpp/text/libtextin.a \
291 ../mgpp/lib/libmg.a
292else
293LIBRARY_OBJS = $(COMMONOBJECTS) $(LIBRARYOBJECTS) $(COLSERVROBJECTS) \
294 ../../lib/gsdllib.a \
295 ../../packages/mg/src/text/libtextin.a \
296 ../../packages/mg/lib/libmg.a \
297 ../../packages/fcgi/libfcgi/libfcgi.a \
298 ../mgpp/text/libtextin.a \
299 ../mgpp/lib/libmg.a \
300 $(Z_LIBYAZ_A)
301endif
302
303library: $(LIBRARY_OBJS)
304 $(CPPLINK) $(LIBRARY_OBJS) $(LIBS)
305
306# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
307
308RECPTLIB_OBJECTS = nullproto.o corbaproto.o \
309 ../../lib/corbatext_t.o ../../lib/corbaconv_text_t.o \
310 ../../lib/corbaiface.o
311ifneq ($(USE_FASTCGI), 1)
312RLIBRARY_OBJS = $(COMMONOBJECTS) $(RECPTLIB_OBJECTS) $(COLSERVROBJECTS) \
313 ../../lib/gsdllib.a \
314 ../../packages/mg/src/text/libtextin.a \
315 ../../packages/mg/lib/libmg.a \
316 ../mgpp/text/libtextin.a \
317 ../mgpp/lib/libmg.a
318else
319RLIBRARY_OBJS = $(COMMONOBJECTS) $(RECPTLIB_OBJECTS) $(COLSERVROBJECTS) \
320 ../../lib/gsdllib.a \
321 ../../packages/mg/src/text/libtextin.a \
322 ../../packages/mg/lib/libmg.a \
323 ../../packages/fcgi/libfcgi/libfcgi.a \
324 ../mgpp/text/libtextin.a \
325 ../mgpp/lib/libmg.a
326endif
327RECPTLIB_OBJS = $(RLIBRARY_OBJS) ../colservr/corbaServer.o
328
329corbaserver: $(RECPTLIB_OBJS)
330 $(MLINK) $(RECPTLIB_OBJS) $(MLIBS)
331
332# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
333
334CORBARECPT_OBJECTS = nullproto.o corbaproto.o corbaclient.o
335ifneq ($(USE_FASTCGI), 1)
336CORBARECPT_OBJS = $(COMMONOBJECTS) $(CORBARECPT_OBJECTS) $(COLSERVROBJECTS) \
337 ../../lib/gsdllib.a \
338 ../../packages/mg/src/text/libtextin.a \
339 ../../packages/mg/lib/libmg.a \
340 ../mgpp/text/libtextin.a \
341 ../mgpp/lib/libmg.a
342else
343CORBARECPT_OBJS = $(COMMONOBJECTS) $(CORBARECPT_OBJECTS) $(COLSERVROBJECTS) \
344 ../../lib/gsdllib.a \
345 ../../packages/mg/src/text/libtextin.a \
346 ../../packages/mg/lib/libmg.a \
347 ../../packages/fcgi/libfcgi/libfcgi.a \
348 ../mgpp/text/libtextin.a \
349 ../mgpp/lib/libmg.a
350endif
351
352corbarecptldd: $(CORBARECPT_OBJS)
353 $(MLINK) $(CORBARECPT_OBJS) $(MLIBS)
354
355test:
Note: See TracBrowser for help on using the repository browser.