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

Last change on this file since 2394 was 2394, checked in by dmm9, 23 years ago

browse action added

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