[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 |
|
---|
| 27 | AR = ar
|
---|
| 28 | CC = @CC@
|
---|
[1283] | 29 | #CCFLAGS = @CFLAGS@ -Wall -Wunused -pedantic -W -Woverloaded-virtual
|
---|
| 30 | CCFLAGS = @CFLAGS@
|
---|
[568] | 31 |
|
---|
[1347] | 32 | # YAZ kit for z39.50
|
---|
| 33 | YAZDIR=../../packages/yaz
|
---|
| 34 |
|
---|
[568] | 35 | USE_FASTCGI = @USE_FASTCGI@
|
---|
| 36 | ifneq ($(USE_FASTCGI), 1)
|
---|
[989] | 37 | DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER \
|
---|
| 38 | -DGSDLUSAGELOG @DEFS@
|
---|
| 39 |
|
---|
[558] | 40 | INCLUDES = -I../../lib -I. -I../colservr -I../../packages/mg \
|
---|
[1331] | 41 | -I../../packages/mg/lib -I../../packages/mg/src/text \
|
---|
[1347] | 42 | -I../mgpp/lib -I../mgpp/text -I$(YAZDIR)/include
|
---|
[568] | 43 | else
|
---|
[989] | 44 | DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER \
|
---|
| 45 | -DGSDLUSAGELOG -DUSE_FASTCGI @DEFS@
|
---|
| 46 |
|
---|
[568] | 47 | INCLUDES = -I../../lib -I. -I../colservr -I../../packages/mg \
|
---|
| 48 | -I../../packages/mg/lib -I../../packages/mg/src/text \
|
---|
[1331] | 49 | -I../../packages/fcgi/include -I../mgpp/lib \
|
---|
| 50 | -I../mgpp/text
|
---|
[556] | 51 | endif
|
---|
[568] | 52 |
|
---|
[552] | 53 | RANLIB = @RANLIB@
|
---|
| 54 | LDFLAGS = @LDFLAGS@
|
---|
[985] | 55 | LIBS = @LIBS@
|
---|
[552] | 56 |
|
---|
[558] | 57 | GSDLOS = @gsdlos@
|
---|
[552] | 58 |
|
---|
| 59 |
|
---|
| 60 | COMPILE = $(CC) -c $(CCFLAGS) $(DEFS) $(INCLUDES)
|
---|
| 61 | LINK = $(CC) $(LDFLAGS) -o $@
|
---|
| 62 |
|
---|
| 63 | .SUFFIXES:
|
---|
| 64 | .SUFFIXES: .c .o
|
---|
| 65 | .c.o:
|
---|
| 66 | $(COMPILE) $<
|
---|
| 67 |
|
---|
| 68 | .SUFFIXES: .cpp .o
|
---|
| 69 | .cpp.o:
|
---|
| 70 | $(COMPILE) $<
|
---|
| 71 |
|
---|
[675] | 72 | COMMONHEADERS = receptionist.h cgiwrapper.h cgiargs.h action.h browserclass.h \
|
---|
[552] | 73 | converter.h recptconfig.h cgiutils.h OIDtools.h browsetools.h htmlgen.h \
|
---|
| 74 | statusaction.h pageaction.h comtypes.h recptproto.h \
|
---|
[722] | 75 | pingaction.h queryaction.h documentaction.h \
|
---|
| 76 | extlinkaction.h buildaction.h htmlutils.h \
|
---|
[552] | 77 | querytools.h formattools.h tipaction.h authenaction.h infodbclass.h \
|
---|
[675] | 78 | userdb.h usersaction.h vlistbrowserclass.h hlistbrowserclass.h \
|
---|
[713] | 79 | datelistbrowserclass.h invbrowserclass.h pagedbrowserclass.h \
|
---|
[951] | 80 | htmlbrowserclass.h delhistoryaction.h historydb.h
|
---|
[552] | 81 |
|
---|
| 82 | RECEPTHEADERS =
|
---|
| 83 |
|
---|
[1347] | 84 | LIBRARYHEADERS = nullproto.h z3950proto.h z3950server.h
|
---|
[552] | 85 |
|
---|
| 86 | HEADERS = $(COMMONHEADERS) $(RECPTHEADERS) $(LIBRARYHEADERS)
|
---|
| 87 |
|
---|
| 88 |
|
---|
[675] | 89 | COMMONSOURCES = receptionist.cpp cgiwrapper.cpp cgiargs.cpp action.cpp browserclass.cpp \
|
---|
[552] | 90 | converter.cpp recptconfig.cpp cgiutils.cpp OIDtools.cpp browsetools.cpp \
|
---|
| 91 | htmlgen.cpp statusaction.cpp pageaction.cpp comtypes.cpp \
|
---|
| 92 | recptproto.cpp pingaction.cpp queryaction.cpp documentaction.cpp \
|
---|
[722] | 93 | extlinkaction.cpp buildaction.cpp htmlutils.cpp querytools.cpp formattools.cpp \
|
---|
| 94 | tipaction.cpp authenaction.cpp infodbclass.cpp userdb.cpp usersaction.cpp \
|
---|
| 95 | vlistbrowserclass.cpp hlistbrowserclass.cpp datelistbrowserclass.cpp \
|
---|
[951] | 96 | invbrowserclass.cpp pagedbrowserclass.cpp htmlbrowserclass.cpp \
|
---|
[974] | 97 | delhistoryaction.cpp historydb.cpp
|
---|
[552] | 98 |
|
---|
[722] | 99 |
|
---|
[552] | 100 | RECPTSOURCES = recptmain.cpp
|
---|
| 101 |
|
---|
[1347] | 102 | LIBRARYSOURCES = nullproto.cpp z3950proto.cpp z3950server.cpp librarymain.cpp \
|
---|
| 103 | zparse.tab.c parse.yy.c $(YAZDIR)/client/yaz_zclient.c
|
---|
[552] | 104 |
|
---|
| 105 | SOURCES = $(COMMONSOURCES) $(RECPTSOURCES) $(LIBRARYSOURCES)
|
---|
| 106 |
|
---|
| 107 |
|
---|
[675] | 108 | COMMONOBJECTS = receptionist.o cgiwrapper.o cgiargs.o action.o browserclass.o \
|
---|
[552] | 109 | converter.o recptconfig.o cgiutils.o OIDtools.o browsetools.o \
|
---|
| 110 | htmlgen.o statusaction.o pageaction.o comtypes.o \
|
---|
| 111 | recptproto.o pingaction.o queryaction.o documentaction.o \
|
---|
[722] | 112 | extlinkaction.o buildaction.o htmlutils.o querytools.o \
|
---|
| 113 | formattools.o tipaction.o authenaction.o \
|
---|
[675] | 114 | infodbclass.o userdb.o usersaction.o vlistbrowserclass.o \
|
---|
| 115 | hlistbrowserclass.o datelistbrowserclass.o invbrowserclass.o \
|
---|
[974] | 116 | pagedbrowserclass.o htmlbrowserclass.o delhistoryaction.o \
|
---|
[1347] | 117 | historydb.o parse.yy.o
|
---|
[552] | 118 |
|
---|
| 119 | RECPTOBJECTS = recptmain.o
|
---|
| 120 |
|
---|
[1347] | 121 | LIBRARYOBJECTS = nullproto.o z3950proto.o z3950server.o librarymain.o \
|
---|
| 122 | zparse.tab.o $(YAZDIR)/client/yaz_zclient.o
|
---|
[552] | 123 |
|
---|
| 124 | OBJECTS = $(COMMONOBJECTS) $(RECPTOBJECTS) $(LIBRARYOBJECTS)
|
---|
| 125 |
|
---|
| 126 |
|
---|
[558] | 127 | COLSERVROBJECTS = ../colservr/mgq.o \
|
---|
[1331] | 128 | ../colservr/search.o \
|
---|
[558] | 129 | ../colservr/mgsearch.o \
|
---|
| 130 | ../colservr/querycache.o \
|
---|
| 131 | ../colservr/queryinfo.o \
|
---|
| 132 | ../colservr/collectserver.o \
|
---|
| 133 | ../colservr/colservrconfig.o \
|
---|
| 134 | ../colservr/maptools.o \
|
---|
| 135 | ../colservr/filter.o \
|
---|
| 136 | ../colservr/source.o \
|
---|
| 137 | ../colservr/browsefilter.o \
|
---|
| 138 | ../colservr/queryfilter.o \
|
---|
| 139 | ../colservr/mggdbmsource.o \
|
---|
| 140 | ../colservr/phrasesearch.o \
|
---|
[1331] | 141 | ../colservr/phrasequeryfilter.o \
|
---|
| 142 | ../colservr/mgqueryfilter.o \
|
---|
| 143 | ../colservr/mgppsearch.o \
|
---|
| 144 | ../colservr/mgppqueryfilter.o
|
---|
[558] | 145 |
|
---|
[1347] | 146 | #EXEC = recpt library
|
---|
| 147 | EXEC = library
|
---|
[558] | 148 |
|
---|
| 149 | all: $(EXEC)
|
---|
[552] | 150 |
|
---|
[1347] | 151 | ## z39.50 stuff
|
---|
[1348] | 152 | $(YAZDIR)/client/yaz_zclient.o: $(YAZDIR)/lib/libyaz.a
|
---|
[1347] | 153 | cd $(YAZDIR)/client && make yaz_zclient.o
|
---|
| 154 |
|
---|
| 155 | $(YAZDIR)/lib/libyaz.a:
|
---|
| 156 | cd $(YAZDIR) && ./configure && make all
|
---|
| 157 |
|
---|
| 158 | zparse.tab.c: zparse.y
|
---|
[1351] | 159 | @YACC@ -b zparse -d zparse.y
|
---|
[1347] | 160 |
|
---|
[1355] | 161 | zparse.tab.h: zparse.tab.c
|
---|
| 162 |
|
---|
[1347] | 163 | parse.yy.c: parse.fl
|
---|
| 164 | flex -oparse.yy.c parse.fl
|
---|
| 165 |
|
---|
| 166 | PARSE_TMPFILES= zparse.tab.o zparse.tab.c zparse.tab.h parse.yy.o parse.yy.c
|
---|
| 167 |
|
---|
[992] | 168 | distclean:
|
---|
[1347] | 169 | rm -f $(OBJECTS) $(EXEC) $(PARSE_TMPFILES) Makefile
|
---|
[992] | 170 |
|
---|
[552] | 171 | clean:
|
---|
[1347] | 172 | rm -f $(OBJECTS) $(EXEC) $(PARSE_TMPFILES)
|
---|
[552] | 173 |
|
---|
| 174 | install:
|
---|
[1004] | 175 | install -m 755 -s library ../../cgi-bin/library
|
---|
[552] | 176 |
|
---|
| 177 | depend:
|
---|
| 178 | makedepend -Y -- $(DEFS) $(INCLUDES) $(CCFLAGS) -- $(SOURCES)
|
---|
| 179 |
|
---|
| 180 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
| 181 |
|
---|
[568] | 182 | ifneq ($(USE_FASTCGI), 1)
|
---|
[552] | 183 | RECPT_OBJS = $(COMMONOBJECTS) $(RECPTOBJECTS) \
|
---|
| 184 | ../../lib/gsdllib.a \
|
---|
| 185 | ../../packages/mg/src/text/libtextin.a \
|
---|
[1331] | 186 | ../../packages/mg/lib/libmg.a \
|
---|
| 187 | ../mgpp/text/libtextin.a \
|
---|
| 188 | ../mgpp/lib/libmg.a
|
---|
[568] | 189 | else
|
---|
| 190 | RECPT_OBJS = $(COMMONOBJECTS) $(RECPTOBJECTS) \
|
---|
| 191 | ../../lib/gsdllib.a \
|
---|
| 192 | ../../packages/mg/src/text/libtextin.a \
|
---|
| 193 | ../../packages/mg/lib/libmg.a \
|
---|
[1331] | 194 | ../../packages/fcgi/libfcgi/libfcgi.a \
|
---|
| 195 | ../mgpp/text/libtextin.a \
|
---|
| 196 | ../mgpp/lib/libmg.a
|
---|
[556] | 197 | endif
|
---|
[552] | 198 |
|
---|
| 199 | recpt: $(RECPT_OBJS)
|
---|
| 200 | $(LINK) $(RECPT_OBJS) $(LIBS)
|
---|
| 201 |
|
---|
| 202 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
| 203 |
|
---|
[568] | 204 | ifneq ($(USE_FASTCGI), 1)
|
---|
[558] | 205 | LIBRARY_OBJS = $(COMMONOBJECTS) $(LIBRARYOBJECTS) $(COLSERVROBJECTS) \
|
---|
[552] | 206 | ../../lib/gsdllib.a \
|
---|
| 207 | ../../packages/mg/src/text/libtextin.a \
|
---|
[1331] | 208 | ../../packages/mg/lib/libmg.a \
|
---|
[1347] | 209 | $(YAZDIR)/lib/libyaz.a \
|
---|
[1331] | 210 | ../mgpp/text/libtextin.a \
|
---|
| 211 | ../mgpp/lib/libmg.a
|
---|
[568] | 212 | else
|
---|
| 213 | LIBRARY_OBJS = $(COMMONOBJECTS) $(LIBRARYOBJECTS) $(COLSERVROBJECTS) \
|
---|
| 214 | ../../lib/gsdllib.a \
|
---|
| 215 | ../../packages/mg/src/text/libtextin.a \
|
---|
| 216 | ../../packages/mg/lib/libmg.a \
|
---|
[1331] | 217 | ../../packages/fcgi/libfcgi/libfcgi.a \
|
---|
| 218 | ../mgpp/text/libtextin.a \
|
---|
| 219 | ../mgpp/lib/libmg.a
|
---|
[556] | 220 | endif
|
---|
[552] | 221 |
|
---|
| 222 | library: $(LIBRARY_OBJS)
|
---|
| 223 | $(LINK) $(LIBRARY_OBJS) $(LIBS)
|
---|
[1331] | 224 |
|
---|
| 225 |
|
---|
| 226 |
|
---|
| 227 |
|
---|
| 228 |
|
---|