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

Last change on this file since 2900 was 2900, checked in by jrm21, 22 years ago

Modified Makefile.in files to use autodetected configure's install program
instead of hard-coding "install" program. (eg solaris uses ginstall).

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 10.6 KB
RevLine 
[552]1###########################################################################
2#
[558]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#
[552]8# Copyright (C) 1999 The New Zealand Digital Library Project
9#
10#
[558]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#
[552]25###########################################################################
26
[1937]27USE_Z3950 = @USE_Z3950@
28ifeq ($(USE_Z3950), 1)
29Z_CFLAGS=-DUSE_Z3950
30else
31Z_CFLAGS=
32endif
33
[2171]34USE_CORBA = @USE_CORBA@
35ifeq ($(USE_CORBA), 1)
36CORBA_CFLAGS=-DUSE_CORBA
37else
38CORBA_CFLAGS=
39endif
40
41
42
[552]43AR = ar
44CC = @CC@
[1860]45CPP = @CXX@
[1283]46#CCFLAGS = @CFLAGS@ -Wall -Wunused -pedantic -W -Woverloaded-virtual
[568]47
[2171]48CCFLAGS = $(Z_CFLAGS) $(CORBA_CFLAGS) @CFLAGS@
[1937]49
[1347]50# YAZ kit for z39.50
51YAZDIR=../../packages/yaz
52
[568]53USE_FASTCGI = @USE_FASTCGI@
54ifneq ($(USE_FASTCGI), 1)
[1776]55DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM @DEFS@
[558]56INCLUDES = -I../../lib -I. -I../colservr -I../../packages/mg \
[1331]57 -I../../packages/mg/lib -I../../packages/mg/src/text \
[2494]58 -I../mgpp/lib -I../mgpp/text -I../..
[568]59else
[1776]60DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DUSE_FASTCGI @DEFS@
[568]61INCLUDES = -I../../lib -I. -I../colservr -I../../packages/mg \
62 -I../../packages/mg/lib -I../../packages/mg/src/text \
[1331]63 -I../../packages/fcgi/include -I../mgpp/lib \
[2494]64 -I../mgpp/text -I../..
[556]65endif
[1860]66MICO_DIR = @MICO_DIR@
[2173]67MICO_VER = @MICO_VER@
[1860]68ifeq ($(MICO_DIR), yes)
69MICO_INC =
70MICO_LIB =
[2173]71MICO_PATH =
[1860]72else
73ifeq ($(MICO_DIR), default)
74MICO_DIR = ../../packages/mico/include
[2173]75MICO_PATH = ../../bin/linux/
[2385]76else
77MICO_PATH =
[1860]78endif
79MICO_INC = -I$(MICO_DIR)
80MICO_LIB = -L$(MICO_DIR)
81endif
82MINCLUDES = -I. -I../../lib -I../colservr $(MICO_INC)
[568]83
[552]84RANLIB = @RANLIB@
85LDFLAGS = @LDFLAGS@
[2371]86GDBM_LIBS=@GDBM_LIBPATH@ -lgdbm
87LIBS = $(GDBM_LIBS) @LIBS@
[558]88GSDLOS = @gsdlos@
[2900]89INSTALL = @INSTALL@
[552]90
91COMPILE = $(CC) -c $(CCFLAGS) $(DEFS) $(INCLUDES)
92LINK = $(CC) $(LDFLAGS) -o $@
93
[1860]94CPPCOMPILE = $(CPP) -c $(CCFLAGS) $(DEFS) $(INCLUDES)
95CPPLINK = $(CPP) $(LDFLAGS) -o $@
96
[2173]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)
[1860]100
[2371]101# in case gdbm.h/libgdbm.a are in a non-standard place...
[2590]102GDBM_OBJS=argdb.o authenaction.o collectoraction.o infodbclass.o userdb.o usersaction.o historydb.o librarymain.o nullproto.o queryaction.o z3950proto.o
[2371]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
[552]115.SUFFIXES:
116.SUFFIXES: .c .o
117.c.o:
118 $(COMPILE) $<
119
120.SUFFIXES: .cpp .o
121.cpp.o:
[1860]122 $(CPPCOMPILE) $<
[552]123
[2371]124$(GDBM_OBJS) :%.o :%.cpp
125 $(CPPCOMPILE) @GDBM_INCLUDE@ $<
126
[1860]127.SUFFIXES: .mpp .o
128.mpp.o:
[2385]129 $(MCOMPILE) $< -o $@
[1860]130
[675]131COMMONHEADERS = receptionist.h cgiwrapper.h cgiargs.h action.h browserclass.h \
[552]132 converter.h recptconfig.h cgiutils.h OIDtools.h browsetools.h htmlgen.h \
133 statusaction.h pageaction.h comtypes.h recptproto.h \
[2394]134 pingaction.h queryaction.h documentaction.h \
135 extlinkaction.h browseaction.h htmlutils.h argdb.h \
[2454]136 querytools.h browseactiontools.h formattools.h tipaction.h authenaction.h infodbclass.h \
[675]137 userdb.h usersaction.h vlistbrowserclass.h hlistbrowserclass.h \
[713]138 datelistbrowserclass.h invbrowserclass.h pagedbrowserclass.h \
[2491]139 htmlbrowserclass.h phindbrowserclass.h historydb.h collectoraction.h \
140 phindaction.h
[552]141
142RECEPTHEADERS =
143
[1860]144ifeq ($(USE_CORBA), 1)
145LIBRARYHEADERS = nullproto.h z3950proto.h z3950server.h corbaproto.h
146else
[1347]147LIBRARYHEADERS = nullproto.h z3950proto.h z3950server.h
[1860]148endif
[552]149
150HEADERS = $(COMMONHEADERS) $(RECPTHEADERS) $(LIBRARYHEADERS)
151
152
[675]153COMMONSOURCES = receptionist.cpp cgiwrapper.cpp cgiargs.cpp action.cpp browserclass.cpp \
[552]154 converter.cpp recptconfig.cpp cgiutils.cpp OIDtools.cpp browsetools.cpp \
[2394]155 htmlgen.cpp statusaction.cpp pageaction.cpp comtypes.cpp \
[552]156 recptproto.cpp pingaction.cpp queryaction.cpp documentaction.cpp \
[2491]157 extlinkaction.cpp browseaction.h htmlutils.cpp querytools.cpp \
[722]158 tipaction.cpp authenaction.cpp infodbclass.cpp userdb.cpp usersaction.cpp \
159 vlistbrowserclass.cpp hlistbrowserclass.cpp datelistbrowserclass.cpp \
[951]160 invbrowserclass.cpp pagedbrowserclass.cpp htmlbrowserclass.cpp \
[2491]161 phindbrowserclass.cpp historydb.cpp collectoraction.cpp argdb.cpp \
162 browseactiontools.h formattools.cpp phindaction.cpp
[552]163
[722]164
[552]165RECPTSOURCES = recptmain.cpp
166
[1937]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
[552]172
[1937]173LIBRARYSOURCES = nullproto.cpp librarymain.cpp $(Z_LIBSOURCES)
174
[552]175SOURCES = $(COMMONSOURCES) $(RECPTSOURCES) $(LIBRARYSOURCES)
176
177
[1937]178ifeq ($(USE_Z3950), 1)
179Z_COMOBJS=parse.yy.o
180else
181Z_COMOBJS=
182endif
183
[675]184COMMONOBJECTS = receptionist.o cgiwrapper.o cgiargs.o action.o browserclass.o \
[552]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 \
[2491]188 extlinkaction.o browseaction.o htmlutils.o querytools.o browseactiontools.o \
189 formattools.o tipaction.o authenaction.o argdb.o \
[675]190 infodbclass.o userdb.o usersaction.o vlistbrowserclass.o \
191 hlistbrowserclass.o datelistbrowserclass.o invbrowserclass.o \
[1643]192 pagedbrowserclass.o htmlbrowserclass.o phindbrowserclass.o \
[2491]193 historydb.o $(Z_COMOBJS) collectoraction.o phindaction.o
[552]194
195RECPTOBJECTS = recptmain.o
196
197
[1937]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
[552]206OBJECTS = $(COMMONOBJECTS) $(RECPTOBJECTS) $(LIBRARYOBJECTS)
207
208
[558]209COLSERVROBJECTS = ../colservr/mgq.o \
[1331]210 ../colservr/search.o \
[558]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 \
[1331]223 ../colservr/phrasequeryfilter.o \
224 ../colservr/mgqueryfilter.o \
225 ../colservr/mgppsearch.o \
[1860]226 ../colservr/mgppqueryfilter.o \
227 ../colservr/collectset.o
[558]228
229
[552]230
[1937]231## z39.50 rules
[1381]232# Note! If USE_FASTCGI=1, yaz is still compiled and linked, but never
233# called by librarymain.cpp.
[1348]234$(YAZDIR)/client/yaz_zclient.o: $(YAZDIR)/lib/libyaz.a
[2171]235 cd $(YAZDIR)/client && $(MAKE) yaz_zclient.o
[1347]236
[1715]237# this should be done by the top level makefile...
[1347]238$(YAZDIR)/lib/libyaz.a:
[2171]239 cd $(YAZDIR) && $(MAKE) all
[1347]240
[1519]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
[1347]246zparse.tab.c: zparse.y
[1351]247 @YACC@ -b zparse -d zparse.y
[1347]248
[1355]249zparse.tab.h: zparse.tab.c
250
[1365]251parse.yy.c: parse.fl zparse.tab.h
[1347]252 flex -oparse.yy.c parse.fl
253
[1519]254
255
[1385]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
[1347]259
[992]260distclean:
[1347]261 rm -f $(OBJECTS) $(EXEC) $(PARSE_TMPFILES) Makefile
[992]262
[552]263clean:
[1347]264 rm -f $(OBJECTS) $(EXEC) $(PARSE_TMPFILES)
[552]265
266install:
[2900]267 $(INSTALL) -m 755 -s library ../../cgi-bin
[552]268
269depend:
270 makedepend -Y -- $(DEFS) $(INCLUDES) $(CCFLAGS) -- $(SOURCES)
271
272# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
[2171]273ifeq ($(USE_FASTCGI), 1)
274 FASTCGI_OBJS = ../../packages/fcgi/libfcgi/libfcgi.a
275else
276 FASTCGI_OBJS =
277endif
[552]278
279RECPT_OBJS = $(COMMONOBJECTS) $(RECPTOBJECTS) \
280 ../../lib/gsdllib.a \
281 ../../packages/mg/src/text/libtextin.a \
[1331]282 ../../packages/mg/lib/libmg.a \
[2171]283 $(FASTCGI_OBJS) \
[1331]284 ../mgpp/text/libtextin.a \
285 ../mgpp/lib/libmg.a
[552]286
287recpt: $(RECPT_OBJS)
[1860]288 $(CPPLINK) $(RECPT_OBJS) $(LIBS)
[552]289
290# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
[1937]291ifeq ($(USE_Z3950), 1)
292Z_LIBYAZ_A=$(YAZDIR)/lib/libyaz.a
293else
294Z_LIBYAZ_A=
295endif
[552]296
[1937]297
[558]298LIBRARY_OBJS = $(COMMONOBJECTS) $(LIBRARYOBJECTS) $(COLSERVROBJECTS) \
[552]299 ../../lib/gsdllib.a \
300 ../../packages/mg/src/text/libtextin.a \
[1331]301 ../../packages/mg/lib/libmg.a \
[2171]302 $(FASTCGI_OBJS) $(Z_LIBYAZ_A) \
[1331]303 ../mgpp/text/libtextin.a \
[2171]304 ../mgpp/lib/libmg.a
[552]305
306library: $(LIBRARY_OBJS)
[1860]307 $(CPPLINK) $(LIBRARY_OBJS) $(LIBS)
[1331]308
[1860]309# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
[1331]310
[1860]311RECPTLIB_OBJECTS = nullproto.o corbaproto.o \
312 ../../lib/corbatext_t.o ../../lib/corbaconv_text_t.o \
[2126]313 ../../lib/corbaiface.o ../../lib/corbaiface_skel.o
[2171]314
[1860]315RLIBRARY_OBJS = $(COMMONOBJECTS) $(RECPTLIB_OBJECTS) $(COLSERVROBJECTS) \
316 ../../lib/gsdllib.a \
317 ../../packages/mg/src/text/libtextin.a \
318 ../../packages/mg/lib/libmg.a \
[2171]319 $(FASTCGI_OBJS) $(Z_LIBOBJS) $(Z_LIBYAZ_A) \
[1860]320 ../mgpp/text/libtextin.a \
321 ../mgpp/lib/libmg.a
[2171]322
[1860]323RECPTLIB_OBJS = $(RLIBRARY_OBJS) ../colservr/corbaServer.o
[1331]324
[1860]325corbaserver: $(RECPTLIB_OBJS)
[2171]326 @echo -e building corbaserver
[1860]327 $(MLINK) $(RECPTLIB_OBJS) $(MLIBS)
[2234]328# stripping symbols was a cunning plan, but caused difficulties when
329# it came to debugging ...
[2171]330# non GNU strips might not like these options - check autoconf?
331# strip --strip-all --discard-all corbaserver
[2234]332# strip corbaserver
[1860]333# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
[1331]334
[1860]335CORBARECPT_OBJECTS = nullproto.o corbaproto.o corbaclient.o
[2171]336
[1860]337CORBARECPT_OBJS = $(COMMONOBJECTS) $(CORBARECPT_OBJECTS) $(COLSERVROBJECTS) \
[2113]338 ../../lib/corbaiface.o \
[2126]339 ../../lib/corbaiface_skel.o \
[2113]340 ../../lib/corbaconv_text_t.o \
341 ../../lib/corbatext_t.o \
[1860]342 ../../lib/gsdllib.a \
343 ../../packages/mg/src/text/libtextin.a \
344 ../../packages/mg/lib/libmg.a \
[2171]345 $(FASTCGI_OBJS) \
[1860]346 ../mgpp/text/libtextin.a \
347 ../mgpp/lib/libmg.a
348
[2171]349
[1860]350corbarecptldd: $(CORBARECPT_OBJS)
[2171]351 @echo -e building corbarecptldd:
[2113]352 $(MLINK) $(CORBARECPT_OBJS) $(MLIBS)
[1860]353
354test:
[2724]355
Note: See TracBrowser for help on using the repository browser.