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 |
|
---|
27 | AR = ar
|
---|
28 | CC = @CC@
|
---|
29 | #CCFLAGS = @CFLAGS@ -Wall -Wunused -pedantic -W -Woverloaded-virtual
|
---|
30 | CCFLAGS = @CFLAGS@
|
---|
31 |
|
---|
32 | # YAZ kit for z39.50
|
---|
33 | YAZDIR=../../packages/yaz
|
---|
34 |
|
---|
35 | USE_FASTCGI = @USE_FASTCGI@
|
---|
36 | ifneq ($(USE_FASTCGI), 1)
|
---|
37 | DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER \
|
---|
38 | -DGSDLUSAGELOG @DEFS@
|
---|
39 |
|
---|
40 | INCLUDES = -I../../lib -I. -I../colservr -I../../packages/mg \
|
---|
41 | -I../../packages/mg/lib -I../../packages/mg/src/text \
|
---|
42 | -I../mgpp/lib -I../mgpp/text -I$(YAZDIR)/include
|
---|
43 | else
|
---|
44 | DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER \
|
---|
45 | -DGSDLUSAGELOG -DUSE_FASTCGI @DEFS@
|
---|
46 |
|
---|
47 | INCLUDES = -I../../lib -I. -I../colservr -I../../packages/mg \
|
---|
48 | -I../../packages/mg/lib -I../../packages/mg/src/text \
|
---|
49 | -I../../packages/fcgi/include -I../mgpp/lib \
|
---|
50 | -I../mgpp/text -I$(YAZDIR)/include
|
---|
51 | endif
|
---|
52 |
|
---|
53 | RANLIB = @RANLIB@
|
---|
54 | LDFLAGS = @LDFLAGS@
|
---|
55 | LIBS = @LIBS@
|
---|
56 |
|
---|
57 | GSDLOS = @gsdlos@
|
---|
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 |
|
---|
72 | COMMONHEADERS = receptionist.h cgiwrapper.h cgiargs.h action.h browserclass.h \
|
---|
73 | converter.h recptconfig.h cgiutils.h OIDtools.h browsetools.h htmlgen.h \
|
---|
74 | statusaction.h pageaction.h comtypes.h recptproto.h \
|
---|
75 | pingaction.h queryaction.h documentaction.h \
|
---|
76 | extlinkaction.h buildaction.h htmlutils.h \
|
---|
77 | querytools.h formattools.h tipaction.h authenaction.h infodbclass.h \
|
---|
78 | userdb.h usersaction.h vlistbrowserclass.h hlistbrowserclass.h \
|
---|
79 | datelistbrowserclass.h invbrowserclass.h pagedbrowserclass.h \
|
---|
80 | htmlbrowserclass.h delhistoryaction.h historydb.h
|
---|
81 |
|
---|
82 | RECEPTHEADERS =
|
---|
83 |
|
---|
84 | LIBRARYHEADERS = nullproto.h z3950proto.h z3950server.h
|
---|
85 |
|
---|
86 | HEADERS = $(COMMONHEADERS) $(RECPTHEADERS) $(LIBRARYHEADERS)
|
---|
87 |
|
---|
88 |
|
---|
89 | COMMONSOURCES = receptionist.cpp cgiwrapper.cpp cgiargs.cpp action.cpp browserclass.cpp \
|
---|
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 \
|
---|
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 \
|
---|
96 | invbrowserclass.cpp pagedbrowserclass.cpp htmlbrowserclass.cpp \
|
---|
97 | delhistoryaction.cpp historydb.cpp
|
---|
98 |
|
---|
99 |
|
---|
100 | RECPTSOURCES = recptmain.cpp
|
---|
101 |
|
---|
102 | LIBRARYSOURCES = nullproto.cpp z3950proto.cpp z3950server.cpp librarymain.cpp \
|
---|
103 | zparse.tab.c parse.yy.c $(YAZDIR)/client/yaz_zclient.c
|
---|
104 |
|
---|
105 | SOURCES = $(COMMONSOURCES) $(RECPTSOURCES) $(LIBRARYSOURCES)
|
---|
106 |
|
---|
107 |
|
---|
108 | COMMONOBJECTS = receptionist.o cgiwrapper.o cgiargs.o action.o browserclass.o \
|
---|
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 \
|
---|
112 | extlinkaction.o buildaction.o htmlutils.o querytools.o \
|
---|
113 | formattools.o tipaction.o authenaction.o \
|
---|
114 | infodbclass.o userdb.o usersaction.o vlistbrowserclass.o \
|
---|
115 | hlistbrowserclass.o datelistbrowserclass.o invbrowserclass.o \
|
---|
116 | pagedbrowserclass.o htmlbrowserclass.o delhistoryaction.o \
|
---|
117 | historydb.o parse.yy.o
|
---|
118 |
|
---|
119 | RECPTOBJECTS = recptmain.o
|
---|
120 |
|
---|
121 | LIBRARYOBJECTS = nullproto.o z3950proto.o z3950server.o librarymain.o \
|
---|
122 | zparse.tab.o $(YAZDIR)/client/yaz_zclient.o
|
---|
123 |
|
---|
124 | OBJECTS = $(COMMONOBJECTS) $(RECPTOBJECTS) $(LIBRARYOBJECTS)
|
---|
125 |
|
---|
126 |
|
---|
127 | COLSERVROBJECTS = ../colservr/mgq.o \
|
---|
128 | ../colservr/search.o \
|
---|
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 \
|
---|
141 | ../colservr/phrasequeryfilter.o \
|
---|
142 | ../colservr/mgqueryfilter.o \
|
---|
143 | ../colservr/mgppsearch.o \
|
---|
144 | ../colservr/mgppqueryfilter.o
|
---|
145 |
|
---|
146 | #EXEC = recpt library
|
---|
147 | EXEC = library
|
---|
148 |
|
---|
149 | all: $(EXEC)
|
---|
150 |
|
---|
151 | ## z39.50 stuff
|
---|
152 | $(YAZDIR)/client/yaz_zclient.o: $(YAZDIR)/lib/libyaz.a
|
---|
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
|
---|
159 | @YACC@ -b zparse -d zparse.y
|
---|
160 |
|
---|
161 | zparse.tab.h: zparse.tab.c
|
---|
162 |
|
---|
163 | parse.yy.c: parse.fl zparse.tab.h
|
---|
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 |
|
---|
168 | distclean:
|
---|
169 | rm -f $(OBJECTS) $(EXEC) $(PARSE_TMPFILES) Makefile
|
---|
170 |
|
---|
171 | clean:
|
---|
172 | rm -f $(OBJECTS) $(EXEC) $(PARSE_TMPFILES)
|
---|
173 |
|
---|
174 | install:
|
---|
175 | install -m 755 -s library ../../cgi-bin/library
|
---|
176 |
|
---|
177 | depend:
|
---|
178 | makedepend -Y -- $(DEFS) $(INCLUDES) $(CCFLAGS) -- $(SOURCES)
|
---|
179 |
|
---|
180 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
181 |
|
---|
182 | ifneq ($(USE_FASTCGI), 1)
|
---|
183 | RECPT_OBJS = $(COMMONOBJECTS) $(RECPTOBJECTS) \
|
---|
184 | ../../lib/gsdllib.a \
|
---|
185 | ../../packages/mg/src/text/libtextin.a \
|
---|
186 | ../../packages/mg/lib/libmg.a \
|
---|
187 | ../mgpp/text/libtextin.a \
|
---|
188 | ../mgpp/lib/libmg.a
|
---|
189 | else
|
---|
190 | RECPT_OBJS = $(COMMONOBJECTS) $(RECPTOBJECTS) \
|
---|
191 | ../../lib/gsdllib.a \
|
---|
192 | ../../packages/mg/src/text/libtextin.a \
|
---|
193 | ../../packages/mg/lib/libmg.a \
|
---|
194 | ../../packages/fcgi/libfcgi/libfcgi.a \
|
---|
195 | ../mgpp/text/libtextin.a \
|
---|
196 | ../mgpp/lib/libmg.a
|
---|
197 | endif
|
---|
198 |
|
---|
199 | recpt: $(RECPT_OBJS)
|
---|
200 | $(LINK) $(RECPT_OBJS) $(LIBS)
|
---|
201 |
|
---|
202 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
203 |
|
---|
204 | ifneq ($(USE_FASTCGI), 1)
|
---|
205 | LIBRARY_OBJS = $(COMMONOBJECTS) $(LIBRARYOBJECTS) $(COLSERVROBJECTS) \
|
---|
206 | ../../lib/gsdllib.a \
|
---|
207 | ../../packages/mg/src/text/libtextin.a \
|
---|
208 | ../../packages/mg/lib/libmg.a \
|
---|
209 | $(YAZDIR)/lib/libyaz.a \
|
---|
210 | ../mgpp/text/libtextin.a \
|
---|
211 | ../mgpp/lib/libmg.a
|
---|
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 \
|
---|
217 | ../../packages/fcgi/libfcgi/libfcgi.a \
|
---|
218 | ../mgpp/text/libtextin.a \
|
---|
219 | ../mgpp/lib/libmg.a
|
---|
220 | endif
|
---|
221 |
|
---|
222 | library: $(LIBRARY_OBJS)
|
---|
223 | $(LINK) $(LIBRARY_OBJS) $(LIBS)
|
---|
224 |
|
---|
225 |
|
---|
226 |
|
---|
227 |
|
---|
228 |
|
---|