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

Last change on this file since 2173 was 2173, checked in by cs025, 23 years ago

Improvements to configure scripts in their support of various MICO
environment considerations, particularly when MICO is on the system
paths.

Fixed CORBA version of ping to correspond with parameters etc. of the
native form.

Finally, improved PING action to be more than a simple call to
the HASCOLLECTION action in the null protocol.

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