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

Last change on this file since 1887 was 1887, checked in by sjboddie, 23 years ago

* empty log message *

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