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

Last change on this file since 2907 was 2907, checked in by say1, 20 years ago

minor makefile fixes for corbaserver

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 10.6 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 -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
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=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 $(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 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
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
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
195RECPTOBJECTS = recptmain.o
196
197
198ifeq ($(USE_Z3950), 1)
199Z_LIBOBJS=z3950proto.o z3950server.o zparse.tab.o $(YAZDIR)/client/yaz_zclient.o
200else
201Z_LIBOBJS=
202endif
203
204LIBRARYOBJECTS = nullproto.o librarymain.o $(Z_LIBOBJS)
205
206OBJECTS = $(COMMONOBJECTS) $(RECPTOBJECTS) $(LIBRARYOBJECTS)
207
208
209COLSERVROBJECTS = ../colservr/mgq.o \
210 ../colservr/search.o \
211 ../colservr/mgsearch.o \
212 ../colservr/querycache.o \
213 ../colservr/queryinfo.o \
214 ../colservr/collectserver.o \
215 ../colservr/colservrconfig.o \
216 ../colservr/maptools.o \
217 ../colservr/filter.o \
218 ../colservr/source.o \
219 ../colservr/browsefilter.o \
220 ../colservr/queryfilter.o \
221 ../colservr/mggdbmsource.o \
222 ../colservr/phrasesearch.o \
223 ../colservr/phrasequeryfilter.o \
224 ../colservr/mgqueryfilter.o \
225 ../colservr/mgppsearch.o \
226 ../colservr/mgppqueryfilter.o \
227 ../colservr/collectset.o
228
229
230
231## z39.50 rules
232# Note! If USE_FASTCGI=1, yaz is still compiled and linked, but never
233# called by librarymain.cpp.
234$(YAZDIR)/client/yaz_zclient.o: $(YAZDIR)/lib/libyaz.a
235 cd $(YAZDIR)/client && $(MAKE) yaz_zclient.o
236
237# this should be done by the top level makefile...
238$(YAZDIR)/lib/libyaz.a:
239 cd $(YAZDIR) && $(MAKE) all
240
241# put a separate rule here, as it speeds up compilation of other objects
242# if they don't need to include all the yaz headers
243z3950%.o: z3950%.cpp
244 $(COMPILE) -I$(YAZDIR)/include $<
245
246zparse.tab.c: zparse.y
247 @YACC@ -b zparse -d zparse.y
248
249zparse.tab.h: zparse.tab.c
250
251parse.yy.c: parse.fl zparse.tab.h
252 flex -oparse.yy.c parse.fl
253
254
255
256# We'll keep the .c and .h files for those without lex/flex and yacc/bison.
257#PARSE_TMPFILES= zparse.tab.o zparse.tab.c zparse.tab.h parse.yy.o parse.yy.c
258PARSE_TMPFILE=zparse.tab.o parse.yy.o
259
260distclean:
261 rm -f $(OBJECTS) $(EXEC) $(PARSE_TMPFILES) Makefile
262
263clean:
264 rm -f $(OBJECTS) $(EXEC) $(PARSE_TMPFILES)
265
266install:
267 $(INSTALL) -m 755 -s library ../../cgi-bin
268
269depend:
270 makedepend -Y -- $(DEFS) $(INCLUDES) $(CCFLAGS) -- $(SOURCES)
271
272# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
273ifeq ($(USE_FASTCGI), 1)
274 FASTCGI_OBJS = ../../packages/fcgi/libfcgi/libfcgi.a
275else
276 FASTCGI_OBJS =
277endif
278
279RECPT_OBJS = $(COMMONOBJECTS) $(RECPTOBJECTS) \
280 ../../lib/gsdllib.a \
281 ../../packages/mg/src/text/libtextin.a \
282 ../../packages/mg/lib/libmg.a \
283 $(FASTCGI_OBJS) \
284 ../mgpp/text/libtextin.a \
285 ../mgpp/lib/libmg.a
286
287recpt: $(RECPT_OBJS)
288 $(CPPLINK) $(RECPT_OBJS) $(LIBS)
289
290# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
291ifeq ($(USE_Z3950), 1)
292Z_LIBYAZ_A=$(YAZDIR)/lib/libyaz.a
293else
294Z_LIBYAZ_A=
295endif
296
297
298LIBRARY_OBJS = $(COMMONOBJECTS) $(LIBRARYOBJECTS) $(COLSERVROBJECTS) \
299 ../../lib/gsdllib.a \
300 ../../packages/mg/src/text/libtextin.a \
301 ../../packages/mg/lib/libmg.a \
302 $(FASTCGI_OBJS) $(Z_LIBYAZ_A) \
303 ../mgpp/text/libtextin.a \
304 ../mgpp/lib/libmg.a
305
306library: $(LIBRARY_OBJS)
307 $(CPPLINK) $(LIBRARY_OBJS) $(LIBS)
308
309# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
310
311RECPTLIB_OBJECTS = nullproto.o corbaproto.o \
312 ../../lib/corbatext_t.o ../../lib/corbaconv_text_t.o \
313 ../../lib/corbaiface.o ../../lib/corbaiface_skel.o
314
315RLIBRARY_OBJS = $(COMMONOBJECTS) $(RECPTLIB_OBJECTS) $(COLSERVROBJECTS) \
316 ../../lib/gsdllib.a \
317 ../../packages/mg/src/text/libtextin.a \
318 ../../packages/mg/lib/libmg.a \
319 $(FASTCGI_OBJS) $(Z_LIBOBJS) $(Z_LIBYAZ_A) \
320 ../mgpp/text/libtextin.a \
321 ../mgpp/lib/libmg.a
322
323RECPTLIB_OBJS = $(RLIBRARY_OBJS) ../colservr/corbaServer.o
324
325corbaserver: $(RECPTLIB_OBJS)
326 @echo -e building corbaserver
327 $(MLINK) $(RECPTLIB_OBJS) $(MLIBS)
328# stripping symbols was a cunning plan, but caused difficulties when
329# it came to debugging ...
330# non GNU strips might not like these options - check autoconf?
331# strip --strip-all --discard-all corbaserver
332# strip corbaserver
333# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
334
335CORBARECPT_OBJECTS = nullproto.o corbaproto.o corbaclient.o
336
337CORBARECPT_OBJS = $(COMMONOBJECTS) $(CORBARECPT_OBJECTS) $(COLSERVROBJECTS) \
338 ../../lib/corbaiface.o \
339 ../../lib/corbaiface_skel.o \
340 ../../lib/corbaconv_text_t.o \
341 ../../lib/corbatext_t.o \
342 ../../lib/gsdllib.a \
343 ../../packages/mg/src/text/libtextin.a \
344 ../../packages/mg/lib/libmg.a \
345 $(FASTCGI_OBJS) \
346 ../mgpp/text/libtextin.a \
347 ../mgpp/lib/libmg.a
348
349
350corbarecptldd: $(CORBARECPT_OBJS)
351 @echo -e building corbarecptldd:
352 $(MLINK) $(CORBARECPT_OBJS) $(MLIBS)
353
354test:
355
Note: See TracBrowser for help on using the repository browser.