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

Last change on this file since 3036 was 2968, checked in by ibaj1, 22 years ago

* empty log message *

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 10.7 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@
45CXX = @CXX@
46#CCFLAGS = @CFLAGS@ -Wall -Wunused -pedantic -W -Woverloaded-virtual
47
48CXXFLAGS = $(Z_CFLAGS) $(CORBA_CFLAGS) @CXXFLAGS@
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 -I../..
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 -I../..
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 -I../mgpp/text $(MICO_INC)
83
84RANLIB = @RANLIB@
85LDFLAGS = @LDFLAGS@
86GDBM_LIBS=@GDBM_LIBPATH@ -lgdbm
87LIBS = $(GDBM_LIBS) @LIBS@
88GSDLOS = @gsdlos@
89INSTALL = @INSTALL@
90
91COMPILE = $(CC) -c $(CCFLAGS) $(DEFS) $(INCLUDES)
92LINK = $(CC) $(LDFLAGS) -o $@
93
94CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
95CXXLINK = $(CXX) $(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=argdb.o authenaction.o collectoraction.o infodbclass.o userdb.o usersaction.o historydb.o librarymain.o nullproto.o queryaction.o z3950proto.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 $(CXXCOMPILE) $<
123
124$(GDBM_OBJS) :%.o :%.cpp
125 $(CXXCOMPILE) @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 browseactiontools.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 historydb.h collectoraction.h \
140 phindaction.h summarise.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 \
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 browseactiontools.h formattools.cpp phindaction.cpp summarise.cpp
163
164
165RECPTSOURCES = recptmain.cpp
166
167ifeq ($(USE_Z3950), 1)
168Z_LIBSOURCES=z3950proto.cpp z3950server.cpp zparse.tab.c parse.yy.c $(YAZDIR)/client/yaz_zclient.c
169else
170Z_LIBSOURCES=
171endif
172
173LIBRARYSOURCES = nullproto.cpp librarymain.cpp $(Z_LIBSOURCES)
174
175SOURCES = $(COMMONSOURCES) $(RECPTSOURCES) $(LIBRARYSOURCES)
176
177
178ifeq ($(USE_Z3950), 1)
179Z_COMOBJS=parse.yy.o
180else
181Z_COMOBJS=
182endif
183
184COMMONOBJECTS = receptionist.o cgiwrapper.o cgiargs.o action.o browserclass.o \
185 converter.o recptconfig.o cgiutils.o OIDtools.o browsetools.o \
186 htmlgen.o statusaction.o pageaction.o comtypes.o \
187 recptproto.o pingaction.o queryaction.o documentaction.o \
188 extlinkaction.o browseaction.o htmlutils.o querytools.o browseactiontools.o \
189 formattools.o tipaction.o authenaction.o argdb.o \
190 infodbclass.o userdb.o usersaction.o vlistbrowserclass.o \
191 hlistbrowserclass.o datelistbrowserclass.o invbrowserclass.o \
192 pagedbrowserclass.o htmlbrowserclass.o phindbrowserclass.o \
193 historydb.o $(Z_COMOBJS) collectoraction.o phindaction.o \
194 summarise.o
195
196RECPTOBJECTS = recptmain.o
197
198
199ifeq ($(USE_Z3950), 1)
200Z_LIBOBJS=z3950proto.o z3950server.o zparse.tab.o $(YAZDIR)/client/yaz_zclient.o
201else
202Z_LIBOBJS=
203endif
204
205LIBRARYOBJECTS = nullproto.o librarymain.o $(Z_LIBOBJS)
206
207OBJECTS = $(COMMONOBJECTS) $(RECPTOBJECTS) $(LIBRARYOBJECTS)
208
209
210COLSERVROBJECTS = ../colservr/mgq.o \
211 ../colservr/search.o \
212 ../colservr/mgsearch.o \
213 ../colservr/querycache.o \
214 ../colservr/queryinfo.o \
215 ../colservr/collectserver.o \
216 ../colservr/colservrconfig.o \
217 ../colservr/maptools.o \
218 ../colservr/filter.o \
219 ../colservr/source.o \
220 ../colservr/browsefilter.o \
221 ../colservr/queryfilter.o \
222 ../colservr/mggdbmsource.o \
223 ../colservr/phrasesearch.o \
224 ../colservr/phrasequeryfilter.o \
225 ../colservr/mgqueryfilter.o \
226 ../colservr/mgppsearch.o \
227 ../colservr/mgppqueryfilter.o \
228 ../colservr/collectset.o
229
230
231
232## z39.50 rules
233# Note! If USE_FASTCGI=1, yaz is still compiled and linked, but never
234# called by librarymain.cpp.
235$(YAZDIR)/client/yaz_zclient.o: $(YAZDIR)/lib/libyaz.a
236 cd $(YAZDIR)/client && $(MAKE) yaz_zclient.o
237
238# this should be done by the top level makefile...
239$(YAZDIR)/lib/libyaz.a:
240 cd $(YAZDIR) && $(MAKE) all
241
242# put a separate rule here, as it speeds up compilation of other objects
243# if they don't need to include all the yaz headers
244z3950%.o: z3950%.cpp
245 $(COMPILE) -I$(YAZDIR)/include $<
246
247zparse.tab.c: zparse.y
248 @YACC@ -b zparse -d zparse.y
249
250zparse.tab.h: zparse.tab.c
251
252parse.yy.c: parse.fl zparse.tab.h
253 flex -oparse.yy.c parse.fl
254
255
256
257# We'll keep the .c and .h files for those without lex/flex and yacc/bison.
258#PARSE_TMPFILES= zparse.tab.o zparse.tab.c zparse.tab.h parse.yy.o parse.yy.c
259PARSE_TMPFILE=zparse.tab.o parse.yy.o
260
261distclean:
262 rm -f $(OBJECTS) $(EXEC) $(PARSE_TMPFILES) Makefile
263
264clean:
265 rm -f $(OBJECTS) $(EXEC) $(PARSE_TMPFILES)
266
267install:
268 $(INSTALL) -m 755 -s library ../../cgi-bin
269
270depend:
271 makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
272
273# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
274ifeq ($(USE_FASTCGI), 1)
275 FASTCGI_OBJS = ../../packages/fcgi/libfcgi/libfcgi.a
276else
277 FASTCGI_OBJS =
278endif
279
280RECPT_OBJS = $(COMMONOBJECTS) $(RECPTOBJECTS) \
281 ../../lib/gsdllib.a \
282 ../../packages/mg/src/text/libtextin.a \
283 ../../packages/mg/lib/libmg.a \
284 $(FASTCGI_OBJS) \
285 ../mgpp/text/libtextin.a \
286 ../mgpp/lib/libmg.a
287
288recpt: $(RECPT_OBJS)
289 $(CXXLINK) $(RECPT_OBJS) $(LIBS)
290
291# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
292ifeq ($(USE_Z3950), 1)
293Z_LIBYAZ_A=$(YAZDIR)/lib/libyaz.a
294else
295Z_LIBYAZ_A=
296endif
297
298
299LIBRARY_OBJS = $(COMMONOBJECTS) $(LIBRARYOBJECTS) $(COLSERVROBJECTS) \
300 ../../lib/gsdllib.a \
301 ../../packages/mg/src/text/libtextin.a \
302 ../../packages/mg/lib/libmg.a \
303 $(FASTCGI_OBJS) $(Z_LIBYAZ_A) \
304 ../mgpp/text/libtextin.a \
305 ../mgpp/lib/libmg.a
306
307library: $(LIBRARY_OBJS)
308 $(CXXLINK) $(LIBRARY_OBJS) $(LIBS)
309
310# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
311
312RECPTLIB_OBJECTS = nullproto.o corbaproto.o \
313 ../../lib/corbatext_t.o ../../lib/corbaconv_text_t.o \
314 ../../lib/corbaiface.o ../../lib/corbaiface_skel.o
315
316RLIBRARY_OBJS = $(COMMONOBJECTS) $(RECPTLIB_OBJECTS) $(COLSERVROBJECTS) \
317 ../../lib/gsdllib.a \
318 ../../packages/mg/src/text/libtextin.a \
319 ../../packages/mg/lib/libmg.a \
320 $(FASTCGI_OBJS) $(Z_LIBOBJS) $(Z_LIBYAZ_A) \
321 ../mgpp/text/libtextin.a \
322 ../mgpp/lib/libmg.a
323
324RECPTLIB_OBJS = $(RLIBRARY_OBJS) ../colservr/corbaServer.o
325
326corbaserver: $(RECPTLIB_OBJS)
327 @echo -e building corbaserver
328 $(MLINK) $(RECPTLIB_OBJS) $(MLIBS)
329# stripping symbols was a cunning plan, but caused difficulties when
330# it came to debugging ...
331# non GNU strips might not like these options - check autoconf?
332# strip --strip-all --discard-all corbaserver
333# strip corbaserver
334# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
335
336CORBARECPT_OBJECTS = nullproto.o corbaproto.o corbaclient.o
337
338CORBARECPT_OBJS = $(COMMONOBJECTS) $(CORBARECPT_OBJECTS) $(COLSERVROBJECTS) \
339 ../../lib/corbaiface.o \
340 ../../lib/corbaiface_skel.o \
341 ../../lib/corbaconv_text_t.o \
342 ../../lib/corbatext_t.o \
343 ../../lib/gsdllib.a \
344 ../../packages/mg/src/text/libtextin.a \
345 ../../packages/mg/lib/libmg.a \
346 $(FASTCGI_OBJS) \
347 ../mgpp/text/libtextin.a \
348 ../mgpp/lib/libmg.a
349
350
351corbarecptldd: $(CORBARECPT_OBJS)
352 @echo -e building corbarecptldd:
353 $(MLINK) $(CORBARECPT_OBJS) $(MLIBS)
354
355test:
356
Note: See TracBrowser for help on using the repository browser.