########################################################################### # # Makefile -- src/recpt # A component of the Greenstone digital library software # from the New Zealand Digital Library Project at the # University of Waikato, New Zealand. # # Copyright (C) 1999 The New Zealand Digital Library Project # # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # ########################################################################### AR = ar CC = @CC@ CPP = @CXX@ #CCFLAGS = @CFLAGS@ -Wall -Wunused -pedantic -W -Woverloaded-virtual CCFLAGS = @CFLAGS@ # YAZ kit for z39.50 YAZDIR=../../packages/yaz USE_FASTCGI = @USE_FASTCGI@ ifneq ($(USE_FASTCGI), 1) DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM @DEFS@ INCLUDES = -I../../lib -I. -I../colservr -I../../packages/mg \ -I../../packages/mg/lib -I../../packages/mg/src/text \ -I../mgpp/lib -I../mgpp/text else DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DUSE_FASTCGI @DEFS@ INCLUDES = -I../../lib -I. -I../colservr -I../../packages/mg \ -I../../packages/mg/lib -I../../packages/mg/src/text \ -I../../packages/fcgi/include -I../mgpp/lib \ -I../mgpp/text endif MICO_DIR = @MICO_DIR@ ifeq ($(MICO_DIR), yes) MICO_INC = MICO_LIB = else ifeq ($(MICO_DIR), default) MICO_DIR = ../../packages/mico/include endif MICO_INC = -I$(MICO_DIR) MICO_LIB = -L$(MICO_DIR) endif MINCLUDES = -I. -I../../lib -I../colservr $(MICO_INC) USE_CORBA = @USE_CORBA@ RANLIB = @RANLIB@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ GSDLOS = @gsdlos@ COMPILE = $(CC) -c $(CCFLAGS) $(DEFS) $(INCLUDES) LINK = $(CC) $(LDFLAGS) -o $@ CPPCOMPILE = $(CPP) -c $(CCFLAGS) $(DEFS) $(INCLUDES) CPPLINK = $(CPP) $(LDFLAGS) -o $@ MCOMPILE = mico-c++ -x c++ $(MCFLAGS) $(DEFS) $(MINCLUDES) -c MLINK = mico-ld -static $(LDFLAGS) $(MICO_LIB) -o $@ MLIBS = $(LIBS) -lmico2.2.7 .SUFFIXES: .SUFFIXES: .c .o .c.o: $(COMPILE) $< .SUFFIXES: .cpp .o .cpp.o: $(CPPCOMPILE) $< .SUFFIXES: .mpp .o .mpp.o: $(MCOMPILE) $< COMMONHEADERS = receptionist.h cgiwrapper.h cgiargs.h action.h browserclass.h \ converter.h recptconfig.h cgiutils.h OIDtools.h browsetools.h htmlgen.h \ statusaction.h pageaction.h comtypes.h recptproto.h \ pingaction.h queryaction.h documentaction.h \ extlinkaction.h htmlutils.h \ querytools.h formattools.h tipaction.h authenaction.h infodbclass.h \ userdb.h usersaction.h vlistbrowserclass.h hlistbrowserclass.h \ datelistbrowserclass.h invbrowserclass.h pagedbrowserclass.h \ htmlbrowserclass.h phindbrowserclass.h \ historydb.h collectoraction.h RECEPTHEADERS = ifeq ($(USE_CORBA), 1) LIBRARYHEADERS = nullproto.h z3950proto.h z3950server.h corbaproto.h else LIBRARYHEADERS = nullproto.h z3950proto.h z3950server.h endif HEADERS = $(COMMONHEADERS) $(RECPTHEADERS) $(LIBRARYHEADERS) COMMONSOURCES = receptionist.cpp cgiwrapper.cpp cgiargs.cpp action.cpp browserclass.cpp \ converter.cpp recptconfig.cpp cgiutils.cpp OIDtools.cpp browsetools.cpp \ htmlgen.cpp statusaction.cpp pageaction.cpp comtypes.cpp \ recptproto.cpp pingaction.cpp queryaction.cpp documentaction.cpp \ extlinkaction.cpp htmlutils.cpp querytools.cpp formattools.cpp \ tipaction.cpp authenaction.cpp infodbclass.cpp userdb.cpp usersaction.cpp \ vlistbrowserclass.cpp hlistbrowserclass.cpp datelistbrowserclass.cpp \ invbrowserclass.cpp pagedbrowserclass.cpp htmlbrowserclass.cpp \ phindbrowserclass.cpp historydb.cpp collectoraction.cpp RECPTSOURCES = recptmain.cpp LIBRARYSOURCES = nullproto.cpp z3950proto.cpp z3950server.cpp librarymain.cpp \ zparse.tab.c parse.yy.c $(YAZDIR)/client/yaz_zclient.c SOURCES = $(COMMONSOURCES) $(RECPTSOURCES) $(LIBRARYSOURCES) COMMONOBJECTS = receptionist.o cgiwrapper.o cgiargs.o action.o browserclass.o \ converter.o recptconfig.o cgiutils.o OIDtools.o browsetools.o \ htmlgen.o statusaction.o pageaction.o comtypes.o \ recptproto.o pingaction.o queryaction.o documentaction.o \ extlinkaction.o htmlutils.o querytools.o \ formattools.o tipaction.o authenaction.o \ infodbclass.o userdb.o usersaction.o vlistbrowserclass.o \ hlistbrowserclass.o datelistbrowserclass.o invbrowserclass.o \ pagedbrowserclass.o htmlbrowserclass.o phindbrowserclass.o \ historydb.o parse.yy.o collectoraction.o RECPTOBJECTS = recptmain.o LIBRARYOBJECTS = nullproto.o z3950proto.o z3950server.o librarymain.o \ zparse.tab.o $(YAZDIR)/client/yaz_zclient.o OBJECTS = $(COMMONOBJECTS) $(RECPTOBJECTS) $(LIBRARYOBJECTS) COLSERVROBJECTS = ../colservr/mgq.o \ ../colservr/search.o \ ../colservr/mgsearch.o \ ../colservr/querycache.o \ ../colservr/queryinfo.o \ ../colservr/collectserver.o \ ../colservr/colservrconfig.o \ ../colservr/maptools.o \ ../colservr/filter.o \ ../colservr/source.o \ ../colservr/browsefilter.o \ ../colservr/queryfilter.o \ ../colservr/mggdbmsource.o \ ../colservr/phrasesearch.o \ ../colservr/phrasequeryfilter.o \ ../colservr/mgqueryfilter.o \ ../colservr/mgppsearch.o \ ../colservr/mgppqueryfilter.o \ ../colservr/collectset.o ifeq ($(USE_CORBA), 1) #EXEC = recpt library corbaserver corbarecptldd EXEC = library corbaserver corbarecptldd else #EXEC = recpt library EXEC = library endif all: $(EXEC) ## z39.50 stuff # Note! If USE_FASTCGI=1, yaz is still compiled and linked, but never # called by librarymain.cpp. $(YAZDIR)/client/yaz_zclient.o: $(YAZDIR)/lib/libyaz.a cd $(YAZDIR)/client && make yaz_zclient.o # this should be done by the top level makefile... $(YAZDIR)/lib/libyaz.a: cd $(YAZDIR) && make all # put a separate rule here, as it speeds up compilation of other objects # if they don't need to include all the yaz headers z3950%.o: z3950%.cpp $(COMPILE) -I$(YAZDIR)/include $< zparse.tab.c: zparse.y @YACC@ -b zparse -d zparse.y zparse.tab.h: zparse.tab.c parse.yy.c: parse.fl zparse.tab.h flex -oparse.yy.c parse.fl # We'll keep the .c and .h files for those without lex/flex and yacc/bison. #PARSE_TMPFILES= zparse.tab.o zparse.tab.c zparse.tab.h parse.yy.o parse.yy.c PARSE_TMPFILE=zparse.tab.o parse.yy.o distclean: rm -f $(OBJECTS) $(EXEC) $(PARSE_TMPFILES) Makefile clean: rm -f $(OBJECTS) $(EXEC) $(PARSE_TMPFILES) install: install -m 755 -s library ../../cgi-bin depend: makedepend -Y -- $(DEFS) $(INCLUDES) $(CCFLAGS) -- $(SOURCES) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ifneq ($(USE_FASTCGI), 1) RECPT_OBJS = $(COMMONOBJECTS) $(RECPTOBJECTS) \ ../../lib/gsdllib.a \ ../../packages/mg/src/text/libtextin.a \ ../../packages/mg/lib/libmg.a \ ../mgpp/text/libtextin.a \ ../mgpp/lib/libmg.a else RECPT_OBJS = $(COMMONOBJECTS) $(RECPTOBJECTS) \ ../../lib/gsdllib.a \ ../../packages/mg/src/text/libtextin.a \ ../../packages/mg/lib/libmg.a \ ../../packages/fcgi/libfcgi/libfcgi.a \ ../mgpp/text/libtextin.a \ ../mgpp/lib/libmg.a endif recpt: $(RECPT_OBJS) $(CPPLINK) $(RECPT_OBJS) $(LIBS) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ifneq ($(USE_FASTCGI), 1) LIBRARY_OBJS = $(COMMONOBJECTS) $(LIBRARYOBJECTS) $(COLSERVROBJECTS) \ ../../lib/gsdllib.a \ ../../packages/mg/src/text/libtextin.a \ ../../packages/mg/lib/libmg.a \ $(YAZDIR)/lib/libyaz.a \ ../mgpp/text/libtextin.a \ ../mgpp/lib/libmg.a else LIBRARY_OBJS = $(COMMONOBJECTS) $(LIBRARYOBJECTS) $(COLSERVROBJECTS) \ ../../lib/gsdllib.a \ ../../packages/mg/src/text/libtextin.a \ ../../packages/mg/lib/libmg.a \ ../../packages/fcgi/libfcgi/libfcgi.a \ ../mgpp/text/libtextin.a \ ../mgpp/lib/libmg.a \ $(YAZDIR)/lib/libyaz.a endif library: $(LIBRARY_OBJS) $(CPPLINK) $(LIBRARY_OBJS) $(LIBS) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # RECPTLIB_OBJECTS = nullproto.o corbaproto.o \ ../../lib/corbatext_t.o ../../lib/corbaconv_text_t.o \ ../../lib/corbaiface.o ifneq ($(USE_FASTCGI), 1) RLIBRARY_OBJS = $(COMMONOBJECTS) $(RECPTLIB_OBJECTS) $(COLSERVROBJECTS) \ ../../lib/gsdllib.a \ ../../packages/mg/src/text/libtextin.a \ ../../packages/mg/lib/libmg.a \ ../mgpp/text/libtextin.a \ ../mgpp/lib/libmg.a else RLIBRARY_OBJS = $(COMMONOBJECTS) $(RECPTLIB_OBJECTS) $(COLSERVROBJECTS) \ ../../lib/gsdllib.a \ ../../packages/mg/src/text/libtextin.a \ ../../packages/mg/lib/libmg.a \ ../../packages/fcgi/libfcgi/libfcgi.a \ ../mgpp/text/libtextin.a \ ../mgpp/lib/libmg.a endif RECPTLIB_OBJS = $(RLIBRARY_OBJS) ../colservr/corbaServer.o corbaserver: $(RECPTLIB_OBJS) $(MLINK) $(RECPTLIB_OBJS) $(MLIBS) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # CORBARECPT_OBJECTS = nullproto.o corbaproto.o corbaclient.o ifneq ($(USE_FASTCGI), 1) CORBARECPT_OBJS = $(COMMONOBJECTS) $(CORBARECPT_OBJECTS) $(COLSERVROBJECTS) \ ../../lib/gsdllib.a \ ../../packages/mg/src/text/libtextin.a \ ../../packages/mg/lib/libmg.a \ ../mgpp/text/libtextin.a \ ../mgpp/lib/libmg.a else CORBARECPT_OBJS = $(COMMONOBJECTS) $(CORBARECPT_OBJECTS) $(COLSERVROBJECTS) \ ../../lib/gsdllib.a \ ../../packages/mg/src/text/libtextin.a \ ../../packages/mg/lib/libmg.a \ ../../packages/fcgi/libfcgi/libfcgi.a \ ../mgpp/text/libtextin.a \ ../mgpp/lib/libmg.a endif corbarecptldd: $(CORBARECPT_OBJS) $(MLINK) $(CORBARECPT_OBJS) $(MLIBS) test: