1 | ###########################################################################
|
---|
2 | #
|
---|
3 | # Makefile.in -- Makefile for the MG system
|
---|
4 | # Copyright (C) 1994 Neil Sharman; 1995 Tim Shimmin
|
---|
5 | #
|
---|
6 | # This program is free software; you can redistribute it and/or modify
|
---|
7 | # it under the terms of the GNU General Public License as published by
|
---|
8 | # the Free Software Foundation; either version 2 of the License, or
|
---|
9 | # (at your option) any later version.
|
---|
10 | #
|
---|
11 | # This program is distributed in the hope that it will be useful,
|
---|
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
14 | # GNU General Public License for more details.
|
---|
15 | #
|
---|
16 | # You should have received a copy of the GNU General Public License
|
---|
17 | # along with this program; if not, write to the Free Software
|
---|
18 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
19 | #
|
---|
20 | # @(#)Makefile.in 1.10 22 Mar 1994
|
---|
21 | #
|
---|
22 | ###########################################################################
|
---|
23 |
|
---|
24 | PACKAGE = @PACKAGE@
|
---|
25 | VERSION = @VERSION@
|
---|
26 |
|
---|
27 | SHELL = /bin/sh
|
---|
28 | VPATH = @srcdir@
|
---|
29 | exec_prefix = @exec_prefix@
|
---|
30 | prefix = @prefix@
|
---|
31 | srcdir = @srcdir@
|
---|
32 | subdir = text
|
---|
33 | top_srcdir = @top_srcdir@
|
---|
34 | transform = @program_transform_name@
|
---|
35 |
|
---|
36 | AR = ar
|
---|
37 | CC = @CC@
|
---|
38 | CPP = @CXX@
|
---|
39 | ifneq ($(NZDL),1)
|
---|
40 | CFLAGS = @CFLAGS@ -ansi -g -Wall -Wunused -pedantic -W -Woverloaded-virtual
|
---|
41 | CPPFLAGS = @CPPFLAGS@ -ansi -g -Wall -Wunused -pedantic -W -Woverloaded-virtual
|
---|
42 | else
|
---|
43 | CFLAGS = @CFLAGS@ -ansi -Wall -Wunused -pedantic -W -Woverloaded-virtual -g -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM
|
---|
44 | CPPFLAGS = @CPPFLAGS@ -ansi -Wall -Wunused -pedantic -W -Woverloaded-virtual -g -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM
|
---|
45 | endif
|
---|
46 | DEFS = @DEFS@
|
---|
47 | RANLIB = @RANLIB@
|
---|
48 | INSTALL = @INSTALL@
|
---|
49 | INSTALL_DATA = @INSTALL_DATA@
|
---|
50 | INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
---|
51 | LDFLAGS = @LDFLAGS@
|
---|
52 | LIBS = ../lib/libmg.a -lstdc++ @LIBS@
|
---|
53 | TOUCH = echo timestamp >
|
---|
54 | AWK = @AWK@
|
---|
55 |
|
---|
56 | ##########################################
|
---|
57 | # George Buchanan - August 1999
|
---|
58 | #
|
---|
59 | # The below section is now irrelevant -
|
---|
60 | # see the ifndef on CFLAGS above; simply
|
---|
61 | # compiling with make NZDL=1 will auto-
|
---|
62 | # matically ensure that the NZDL compile
|
---|
63 | # mode is used
|
---|
64 | #
|
---|
65 | ##########################################
|
---|
66 | #
|
---|
67 | # Uncomment for compiling for the nzdl project
|
---|
68 | #
|
---|
69 | #CFLAGS = @CFLAGS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM
|
---|
70 | ##########################################
|
---|
71 |
|
---|
72 |
|
---|
73 | bindir = $(exec_prefix)/bin
|
---|
74 | datadir = $(prefix)/share
|
---|
75 | libexecdir = $(exec_prefix)/libexec
|
---|
76 | localedir = $(datadir)/locale
|
---|
77 | mandir = $(prefix)/man/man1
|
---|
78 |
|
---|
79 | COMPILE = $(CC) -c $(DEFS) $(TREC_MODE) $(READLINE) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
---|
80 | CPPCOMPILE = $(CPP) -c $(DEFS) $(TREC_MODE) $(READLINE) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
---|
81 | LINK = $(CC) $(LDFLAGS) -o $@
|
---|
82 |
|
---|
83 | .SUFFIXES:
|
---|
84 | .SUFFIXES: .c .o
|
---|
85 | .c.o:
|
---|
86 | $(COMPILE) $<
|
---|
87 |
|
---|
88 | .SUFFIXES: .cpp .o
|
---|
89 | .cpp.o:
|
---|
90 | $(CPPCOMPILE) -D__cplusplus $<
|
---|
91 |
|
---|
92 |
|
---|
93 | ANSI2KNR = @ANSI2KNR@
|
---|
94 | o = .@U@o
|
---|
95 |
|
---|
96 | .SUFFIXES: ._c ._o
|
---|
97 | .c._c:
|
---|
98 | ./ansi2knr $< > $*.tmp && mv $*.tmp $@
|
---|
99 | ._c._o:
|
---|
100 | @echo $(COMPILE) $<
|
---|
101 | @rm -f _$*.c
|
---|
102 | @ln $< _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c
|
---|
103 | .c._o:
|
---|
104 | ./ansi2knr $< > $*.tmp && mv $*.tmp $*._c
|
---|
105 | @echo $(COMPILE) $*._c
|
---|
106 | @rm -f _$*.c
|
---|
107 | @ln $*._c _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c
|
---|
108 |
|
---|
109 | INCLUDES = -I../ -I../lib -I.
|
---|
110 |
|
---|
111 | #############################################################################
|
---|
112 | #
|
---|
113 | # Uncomment (and possibly edit) the following lines if you wish
|
---|
114 | # to use the GNU readline library for the input in mgquery
|
---|
115 | #
|
---|
116 | #READLINE = -DGNU_READLINE -I/opt/gnu/include/readline -L/opt/gnu/lib
|
---|
117 | #READLINE_LIBS = -lreadline -ltermcap
|
---|
118 | #
|
---|
119 | #
|
---|
120 | #############################################################################
|
---|
121 |
|
---|
122 | SOURCES = \
|
---|
123 | FIvfLevelInfo.cpp ivf.pass1.cpp mg_invf_dump.cpp \
|
---|
124 | FText.cpp ivf.pass2.cpp mg_passes.cpp \
|
---|
125 | FileBuf.cpp locallib.cpp mg_perf_hash_build.cpp \
|
---|
126 | FragLevelConvert.cpp mg.special.cpp mg_stem_idx.cpp \
|
---|
127 | IndexData.cpp mg_compression_dict.cpp mg_weights_build.cpp \
|
---|
128 | TagInfo.cpp mg_decompress_text.cpp stemmer.cpp \
|
---|
129 | TextEl.cpp mg_errors.cpp text.cpp \
|
---|
130 | TextGet.cpp mg_fast_comp_dict.cpp text.pass1.cpp \
|
---|
131 | UCArray.cpp mg_files.cpp text.pass2.cpp \
|
---|
132 | comp_dict.cpp mg_invf_dict.cpp words.cpp \
|
---|
133 | invf.cpp mg_invf_dict_dump.cpp Weights.cpp \
|
---|
134 | MGQuery.cpp Terms.cpp QueryTester.cpp \
|
---|
135 | QueryLex.cpp QueryParser.cpp Queryer.cpp
|
---|
136 |
|
---|
137 |
|
---|
138 | HEADERS = \
|
---|
139 | FIvfLevelInfo.h TextEl.h hash.h stemmer.h \
|
---|
140 | FText.h TextGet.h invf.h text.h \
|
---|
141 | FileBuf.h UCArray.h locallib.h words.h \
|
---|
142 | FragLevelConvert.h WordData.h mg.h \
|
---|
143 | IndexData.h build.h mg_errors.h \
|
---|
144 | TagInfo.h comp_dict.h mg_files.h Weights.h \
|
---|
145 | MGQuery.h Terms.h QueryLex.h QueryParser.h
|
---|
146 |
|
---|
147 |
|
---|
148 | MISC = Makefile.in
|
---|
149 |
|
---|
150 | ALLFILES = $(SOURCES) $(HEADERS) $(MISC) $(MAN)
|
---|
151 |
|
---|
152 | DISTFILES = $(ALLFILES)
|
---|
153 |
|
---|
154 | EXEC = mg_passes mg_decompress_text mg_perf_hash_build \
|
---|
155 | mg_invf_dump mg_weights_build mg_invf_dict mg_stem_idx \
|
---|
156 | mg_invf_dict_dump mg_compression_dict mg_fast_comp_dict \
|
---|
157 | QueryTester Queryer
|
---|
158 |
|
---|
159 | MAN = mg_weights_build.1 mg_invf_dict.1 \
|
---|
160 | mg_passes.1 mg_perf_hash_build.1 \
|
---|
161 | mg_compression_dict.1 mg_fast_comp_dict.1 \
|
---|
162 | mg_stem_idx.1
|
---|
163 |
|
---|
164 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
165 |
|
---|
166 |
|
---|
167 | all: $(EXEC) libtextin.a
|
---|
168 |
|
---|
169 | depend:
|
---|
170 | makedepend -Y -- $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) -- $(SOURCES)
|
---|
171 |
|
---|
172 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
173 |
|
---|
174 |
|
---|
175 | PASSES_OBJS = \
|
---|
176 | mg_passes$o text.pass1$o comp_dict$o \
|
---|
177 | text.pass2$o locallib$o \
|
---|
178 | ivf.pass1$o ivf.pass2$o mg.special$o mg_files$o \
|
---|
179 | words$o invf$o FileBuf$o TextEl$o UCArray$o TagInfo$o \
|
---|
180 | FText$o text$o FIvfLevelInfo$o
|
---|
181 |
|
---|
182 | mg_passes: $(PASSES_OBJS)
|
---|
183 | $(LINK) $(PASSES_OBJS) $(LIBS)
|
---|
184 |
|
---|
185 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
186 |
|
---|
187 | QUERYER_OBJS = Queryer$o mg_files$o mg_errors$o locallib$o invf$o UCArray$o \
|
---|
188 | FIvfLevelInfo$o FragLevelConvert$o Terms$o MGQuery$o \
|
---|
189 | IndexData$o stemmer$o Weights$o TextGet$o text$o FText$o \
|
---|
190 | QueryParser$o QueryLex$o words$o
|
---|
191 |
|
---|
192 | Queryer: $(QUERYER_OBJS)
|
---|
193 | $(LINK) $(QUERYER_OBJS) $(LIBS)
|
---|
194 |
|
---|
195 | QUERY_TESTER_OBJS = QueryTester$o mg_files$o invf$o UCArray$o \
|
---|
196 | FIvfLevelInfo$o FragLevelConvert$o Terms$o MGQuery$o \
|
---|
197 | IndexData$o stemmer$o Weights$o
|
---|
198 |
|
---|
199 | QueryTester: $(QUERY_TESTER_OBJS)
|
---|
200 | $(LINK) $(QUERY_TESTER_OBJS) $(LIBS)
|
---|
201 |
|
---|
202 | WEIGHTS_BUILD_OBJS = mg_weights_build$o mg_files$o invf$o UCArray$o \
|
---|
203 | FIvfLevelInfo$o FragLevelConvert$o
|
---|
204 |
|
---|
205 | mg_weights_build: $(WEIGHTS_BUILD_OBJS)
|
---|
206 | $(LINK) $(WEIGHTS_BUILD_OBJS) $(LIBS)
|
---|
207 |
|
---|
208 | COMP_DICT_OBJS = mg_compression_dict$o mg_files$o locallib$o
|
---|
209 |
|
---|
210 | mg_compression_dict: $(COMP_DICT_OBJS)
|
---|
211 | $(LINK) $(COMP_DICT_OBJS) $(LIBS)
|
---|
212 |
|
---|
213 | FAST_COMP_OBJS = mg_fast_comp_dict$o mg_files$o locallib$o
|
---|
214 |
|
---|
215 | mg_fast_comp_dict: $(FAST_COMP_OBJS)
|
---|
216 | $(LINK) $(FAST_COMP_OBJS) $(LIBS)
|
---|
217 |
|
---|
218 | INVF_DUMP_OBJS = mg_invf_dump$o locallib$o mg_files$o invf$o UCArray$o
|
---|
219 |
|
---|
220 | mg_invf_dump: $(INVF_DUMP_OBJS)
|
---|
221 | $(LINK) $(INVF_DUMP_OBJS) $(LIBS)
|
---|
222 |
|
---|
223 | INVF_DICT_OBJS = mg_invf_dict$o mg_files$o invf$o UCArray$o
|
---|
224 |
|
---|
225 | mg_invf_dict: $(INVF_DICT_OBJS)
|
---|
226 | $(LINK) $(INVF_DICT_OBJS) $(LIBS)
|
---|
227 |
|
---|
228 | INVF_DICT_DUMP_OBJS = mg_invf_dict_dump$o mg_files$o invf$o UCArray$o
|
---|
229 |
|
---|
230 | mg_invf_dict_dump: $(INVF_DICT_DUMP_OBJS)
|
---|
231 | $(LINK) $(INVF_DICT_DUMP_OBJS) $(LIBS)
|
---|
232 |
|
---|
233 | PERF_HASH_OBJS = mg_perf_hash_build$o mg_files$o invf$o UCArray$o
|
---|
234 |
|
---|
235 | mg_perf_hash_build: $(PERF_HASH_OBJS)
|
---|
236 | $(LINK) $(PERF_HASH_OBJS) $(LIBS)
|
---|
237 |
|
---|
238 | STEM_IDX_OBJS = mg_stem_idx$o mg_files$o stemmer$o \
|
---|
239 | invf$o UCArray$o
|
---|
240 |
|
---|
241 | mg_stem_idx: $(STEM_IDX_OBJS)
|
---|
242 | $(LINK) $(STEM_IDX_OBJS) $(LIBS)
|
---|
243 |
|
---|
244 | DECOMPRESS_TEXT_OBJS = \
|
---|
245 | mg_decompress_text$o mg_files$o mg_errors$o \
|
---|
246 | locallib$o text$o UCArray$o TextGet$o FText$o
|
---|
247 |
|
---|
248 | mg_decompress_text: $(DECOMPRESS_TEXT_OBJS)
|
---|
249 | $(LINK) $(DECOMPRESS_TEXT_OBJS) $(LIBS)
|
---|
250 |
|
---|
251 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
252 |
|
---|
253 | ansi2knr: ansi2knr.o
|
---|
254 | $(LINK) ansi2knr.o $(LIBS)
|
---|
255 |
|
---|
256 | install: execinstall maninstall
|
---|
257 | uninstall: execuninstall manuninstall
|
---|
258 |
|
---|
259 | execinstall: $(EXEC)
|
---|
260 | $(top_srcdir)/mkinstalldirs $(bindir); \
|
---|
261 | for name in $(EXEC); do \
|
---|
262 | $(INSTALL_PROGRAM) $$name \
|
---|
263 | $(bindir)/`echo $$name | sed '$(transform)'`; \
|
---|
264 | done
|
---|
265 |
|
---|
266 | execuninstall:
|
---|
267 | for name in $(EXEC); do \
|
---|
268 | rm -f $(bindir)/`echo $$name | sed '$(transform)'`; \
|
---|
269 | done
|
---|
270 |
|
---|
271 | maninstall: $(MAN)
|
---|
272 | $(top_srcdir)/mkinstalldirs $(mandir); \
|
---|
273 | for f in $(MAN); do \
|
---|
274 | $(INSTALL_DATA) $$f $(mandir)/$$f ;\
|
---|
275 | done
|
---|
276 |
|
---|
277 | manuninstall: $(MAN)
|
---|
278 | for f in $(MAN); do \
|
---|
279 | rm -f $(mandir)/$$f ;\
|
---|
280 | done
|
---|
281 |
|
---|
282 |
|
---|
283 | LIB_OBJS = Queryer$o mg_files$o mg_errors$o locallib$o invf$o UCArray$o \
|
---|
284 | FIvfLevelInfo$o FragLevelConvert$o Terms$o MGQuery$o \
|
---|
285 | IndexData$o stemmer$o Weights$o TextGet$o text$o FText$o \
|
---|
286 | QueryParser$o QueryLex$o words$o
|
---|
287 |
|
---|
288 | libtextin.a: $(LIB_OBJS)
|
---|
289 | rm -f libtextin.a
|
---|
290 | $(AR) cru libtextin.a $(LIB_OBJS)
|
---|
291 | $(RANLIB) libtextin.a
|
---|
292 |
|
---|
293 |
|
---|
294 | mostlyclean:
|
---|
295 | rm -f *$o _*.c _*.o *._c *._o core core.*
|
---|
296 |
|
---|
297 | clean: mostlyclean
|
---|
298 | rm -f $(EXEC)
|
---|
299 |
|
---|
300 | distclean: clean
|
---|
301 | rm -f ansi2knr
|
---|
302 | rm -f Makefile
|
---|
303 |
|
---|
304 | maintainer-clean: distclean
|
---|
305 | @echo "This command is intended only for maintainers to use;"
|
---|
306 | @echo "rebuilding the deleted files may require special tools."
|
---|
307 |
|
---|
308 | dist: $(DISTFILES)
|
---|
309 | for file in $(DISTFILES); do \
|
---|
310 | ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|
---|
311 | || cp -p $(srcdir)/$$file $(distdir); \
|
---|
312 | done
|
---|
313 |
|
---|
314 | movclean:
|
---|
315 | for file in $(SOURCES); do \
|
---|
316 | test = $$file; \
|
---|
317 | echo $("test.c"##*.c); \
|
---|
318 | done
|
---|
319 |
|
---|
320 | Makefile: Makefile.in ../config.status
|
---|
321 | cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
|
---|
322 |
|
---|
323 | # Tell versions [3.59,3.63) of GNU make not to export all variables.
|
---|
324 | # Otherwise a system limit (for SysV at least) may be exc
|
---|
325 |
|
---|
326 |
|
---|