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

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

Included CORBA branch for first time

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 10.2 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 cp recpt /home/nzdl/nzdl-1.2/cgi-bin/recpt; \
224 cp library /home/nzdl/nzdl-1.2/cgi-bin/library
225# cp $(EXEC) /home/nzdl/nzdl-1.2/cgi-bin
226
227depend:
228 makedepend -Y -- $(DEFS) $(INCLUDES) $(CCFLAGS) -- $(SOURCES)
229
230# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
231
232ifneq ($(USE_FASTCGI), 1)
233RECPT_OBJS = $(COMMONOBJECTS) $(RECPTOBJECTS) \
234 ../../lib/gsdllib.a \
235 ../../packages/mg/src/text/libtextin.a \
236 ../../packages/mg/lib/libmg.a \
237 ../mgpp/text/libtextin.a \
238 ../mgpp/lib/libmg.a
239else
240RECPT_OBJS = $(COMMONOBJECTS) $(RECPTOBJECTS) \
241 ../../lib/gsdllib.a \
242 ../../packages/mg/src/text/libtextin.a \
243 ../../packages/mg/lib/libmg.a \
244 ../../packages/fcgi/libfcgi/libfcgi.a \
245 ../mgpp/text/libtextin.a \
246 ../mgpp/lib/libmg.a
247endif
248
249recpt: $(RECPT_OBJS)
250 $(CPPLINK) $(RECPT_OBJS) $(LIBS)
251
252# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
253
254ifneq ($(USE_FASTCGI), 1)
255LIBRARY_OBJS = $(COMMONOBJECTS) $(LIBRARYOBJECTS) $(COLSERVROBJECTS) \
256 ../../lib/gsdllib.a \
257 ../../packages/mg/src/text/libtextin.a \
258 ../../packages/mg/lib/libmg.a \
259 $(YAZDIR)/lib/libyaz.a \
260 ../mgpp/text/libtextin.a \
261 ../mgpp/lib/libmg.a
262else
263LIBRARY_OBJS = $(COMMONOBJECTS) $(LIBRARYOBJECTS) $(COLSERVROBJECTS) \
264 ../../lib/gsdllib.a \
265 ../../packages/mg/src/text/libtextin.a \
266 ../../packages/mg/lib/libmg.a \
267 ../../packages/fcgi/libfcgi/libfcgi.a \
268 ../mgpp/text/libtextin.a \
269 ../mgpp/lib/libmg.a \
270 $(YAZDIR)/lib/libyaz.a
271endif
272
273library: $(LIBRARY_OBJS)
274 $(CPPLINK) $(LIBRARY_OBJS) $(LIBS)
275
276# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
277
278RECPTLIB_OBJECTS = nullproto.o corbaproto.o \
279 ../../lib/corbatext_t.o ../../lib/corbaconv_text_t.o \
280 ../../lib/corbaiface.o
281ifneq ($(USE_FASTCGI), 1)
282RLIBRARY_OBJS = $(COMMONOBJECTS) $(RECPTLIB_OBJECTS) $(COLSERVROBJECTS) \
283 ../../lib/gsdllib.a \
284 ../../packages/mg/src/text/libtextin.a \
285 ../../packages/mg/lib/libmg.a \
286 ../mgpp/text/libtextin.a \
287 ../mgpp/lib/libmg.a
288else
289RLIBRARY_OBJS = $(COMMONOBJECTS) $(RECPTLIB_OBJECTS) $(COLSERVROBJECTS) \
290 ../../lib/gsdllib.a \
291 ../../packages/mg/src/text/libtextin.a \
292 ../../packages/mg/lib/libmg.a \
293 ../../packages/fcgi/libfcgi/libfcgi.a \
294 ../mgpp/text/libtextin.a \
295 ../mgpp/lib/libmg.a
296endif
297RECPTLIB_OBJS = $(RLIBRARY_OBJS) ../colservr/corbaServer.o
298
299corbaserver: $(RECPTLIB_OBJS)
300 $(MLINK) $(RECPTLIB_OBJS) $(MLIBS)
301
302# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
303
304CORBARECPT_OBJECTS = nullproto.o corbaproto.o corbaclient.o
305ifneq ($(USE_FASTCGI), 1)
306CORBARECPT_OBJS = $(COMMONOBJECTS) $(CORBARECPT_OBJECTS) $(COLSERVROBJECTS) \
307 ../../lib/gsdllib.a \
308 ../../packages/mg/src/text/libtextin.a \
309 ../../packages/mg/lib/libmg.a \
310 ../mgpp/text/libtextin.a \
311 ../mgpp/lib/libmg.a
312else
313CORBARECPT_OBJS = $(COMMONOBJECTS) $(CORBARECPT_OBJECTS) $(COLSERVROBJECTS) \
314 ../../lib/gsdllib.a \
315 ../../packages/mg/src/text/libtextin.a \
316 ../../packages/mg/lib/libmg.a \
317 ../../packages/fcgi/libfcgi/libfcgi.a \
318 ../mgpp/text/libtextin.a \
319 ../mgpp/lib/libmg.a
320endif
321
322corbarecptldd: $(CORBARECPT_OBJS)
323 $(MLINK) $(CORBARECPT_OBJS) $(MLIBS)
324
325test:
Note: See TracBrowser for help on using the repository browser.