source: main/tags/2.80/indexers/mg/src/text/win32.mak@ 24541

Last change on this file since 24541 was 13757, checked in by kjdon, 17 years ago

changed teh lib names to match mgpp. changed the windows install directory. other small changes

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 8.4 KB
Line 
1###########################################################################
2#
3# win32 makefile -- mg\src\text
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
27MGHOME = ..\..
28# for now put executables in indexers/bin
29INSTALLDIR = ..\..\..\bin
30
31AR = lib
32
33CC = cl
34CPPFLAGS =
35# DEFS = -DQUIET -D__WIN32__ -DSHORT_SUFFIX -DHAVE_STRING_H -DHAVE_FCNTL_H \
36# -DSTDC_HEADERS -DHAVE_CONFIG_H
37DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DHAVE_CONFIG_H \
38 -D__WIN32__ -D_LITTLE_ENDIAN
39INCLUDES = -I"." -I"$(MGHOME)" -I"$(MGHOME)\lib"
40COMPILE = $(CC) $(CPPFLAGS) -c $(DEFS) $(INCLUDES)
41
42LDFLAGS =
43LINK = $(CC) $(LDFLAGS)
44
45LIBS = "$(MGHOME)\lib\libmglib.lib"
46
47.SUFFIXES: .c .cpp .obj
48.c.obj:
49 $(COMPILE) $<
50.cpp.obj:
51 $(COMPILE) $<
52
53o = .obj
54e = .exe
55
56HEADERS = \
57 backend.h conditions.h locallib.h term_lists.h \
58 bool_optimiser.h environment.h mg.h text.h \
59 bool_parser.h globals.h mg_errors.h text_get.h \
60 bool_query.h hash.h mg_files.h warranty.h \
61 bool_tree.h help.mg.h mg_merge.h weights.h \
62 build.h invf.h read_line.h words.h \
63 commands.h invf_get.h stem_search.h \
64 comp_dict.h lists.h stemmer.h query_term_list.h
65
66SOURCES = \
67 backend.c locallib.c mg_weights_build.c \
68 bool_optimiser.c mg.special.c mgdictlist.c \
69 bool_parser.c mg_compression_dict.c mgquery.c \
70 bool_query.c mg_errors.c mgstat.c \
71 bool_tester.c mg_fast_comp_dict.c mg_decompress_text.c \
72 bool_tree.c mg_files.c query.docnums.c \
73 commands.c mg_hilite_words.c query.ranked.c \
74 comp_dict.c mg_invf_dict.c read_line.c \
75 environment.c mg_invf_dump.c stem_search.c \
76 mg_invf_merge.c stemmer.c mg_stem_idx.c \
77 mg_invf_rebuild.c term_lists.c mgstemidxlist.c \
78 invf_get.c mg_passes.c text.pass1.c \
79 ivf.pass1.c mg_perf_hash_build.c text.pass2.c \
80 ivf.pass2.c mg_text_estimate.c text_get.c \
81 lists.c mg_text_merge.c weights.c \
82 mgpass.c query_term_list.c words.c \
83 mg_passes_4jni.c
84
85EXEC = \
86 mgquery$e mg_weights_build$e mgstat$e \
87 mg_invf_dump$e mg_invf_dict$e \
88 mg_invf_rebuild$e mgdictlist$e \
89 mg_passes$e mg_perf_hash_build$e \
90 mg_compression_dict$e mg_text_estimate$e \
91 mg_fast_comp_dict$e \
92 mg_hilite_words$e mg_invf_merge$e \
93 mg_text_merge$e bool_tester$e mgpass$e \
94 mg_stem_idx$e mgstemidxlist$e \
95 mg_decompress_text$e
96
97all: $(EXEC) libmgtext.lib libmgpass.lib
98
99HILITE_OBJS = mg_hilite_words$o stemmer$o locallib$o words$o environment$o
100mg_hilite_words$e: $(HILITE_OBJS)
101 $(LINK) $(HILITE_OBJS) $(LIBS)
102
103BOOL_OBJS = bool_tester$o bool_tree$o bool_parser$o bool_optimiser$o \
104 term_lists$o stemmer$o stem_search$o mg_errors$o \
105 query_term_list$o words$o environment$o
106
107bool_tester$e: $(BOOL_OBJS)
108 $(LINK) $(BOOL_OBJS) $(LIBS)
109
110QUERY_OBJS = \
111 mgquery$o locallib$o lists$o \
112 query.ranked$o query.docnums$o stem_search$o \
113 environment$o commands$o weights$o text_get$o stemmer$o \
114 read_line$o mg_errors$o backend$o invf_get$o \
115 term_lists$o bool_tree$o bool_parser$o bool_optimiser$o bool_query$o \
116 query_term_list$o words$o
117mgquery$e: $(QUERY_OBJS)
118 $(LINK) $(READLINE) $(QUERY_OBJS) $(READLINE_LIBS) $(LIBS)
119
120commands$o : help.mg.h warranty.h conditions.h
121
122PASSES_OBJS = \
123 mg_passes$o text.pass1$o comp_dict$o stemmer$o \
124 text.pass2$o locallib$o \
125 ivf.pass1$o ivf.pass2$o mg.special$o mg_files$o \
126 words$o environment$o
127mg_passes$e: $(PASSES_OBJS)
128 $(LINK) $(PASSES_OBJS) $(LIBS)
129
130PASS_OBJS = \
131 mgpass$o words$o text.pass1$o comp_dict$o stemmer$o \
132 text.pass2$o locallib$o \
133 ivf.pass1$o ivf.pass2$o mg.special$o mg_files$o environment$o
134mgpass$e: $(PASS_OBJS)
135 $(LINK) $(PASS_OBJS) $(LIBS)
136
137LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
138 advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
139 odbccp32.lib
140
141BUILDER_OBJS = \
142 builder$o
143builder$e: $(BUILDER_OBJS)
144 $(LINK) $(BUILDER_OBJS) $(LIBS) $(LINK32_FLAGS)
145
146WEIGHTS_BUILD_OBJS = mg_weights_build$o mg_files$o
147mg_weights_build$e: $(WEIGHTS_BUILD_OBJS)
148 $(LINK) $(WEIGHTS_BUILD_OBJS) $(LIBS)
149
150COMP_DICT_OBJS = mg_compression_dict$o mg_files$o locallib$o
151mg_compression_dict$e: $(COMP_DICT_OBJS)
152 $(LINK) $(COMP_DICT_OBJS) $(LIBS)
153
154FAST_COMP_OBJS = mg_fast_comp_dict$o mg_files$o locallib$o
155mg_fast_comp_dict$e: $(FAST_COMP_OBJS)
156 $(LINK) $(FAST_COMP_OBJS) $(LIBS)
157
158TEXT_EST_OBJS = mg_text_estimate$o locallib$o comp_dict$o mg_files$o
159mg_text_estimate$e: $(TEXT_EST_OBJS)
160 $(LINK) $(TEXT_EST_OBJS) $(LIBS)
161
162STAT_OBJS = mgstat$o mg_files$o locallib$o
163mgstat$e: $(STAT_OBJS)
164 $(LINK) $(STAT_OBJS) $(LIBS)
165
166INVF_DUMP_OBJS = mg_invf_dump$o locallib$o mg_files$o
167mg_invf_dump$e: $(INVF_DUMP_OBJS)
168 $(LINK) $(INVF_DUMP_OBJS) $(LIBS)
169
170INVF_DICT_OBJS = mg_invf_dict$o mg_files$o locallib$o
171mg_invf_dict$e: $(INVF_DICT_OBJS)
172 $(LINK) $(INVF_DICT_OBJS) $(LIBS)
173
174INVF_REB_OBJS = mg_invf_rebuild$o locallib$o
175mg_invf_rebuild$e: $(INVF_REB_OBJS)
176 $(LINK) $(INVF_REB_OBJS) $(LIBS)
177
178DICTLIST_OBJS = mgdictlist$o locallib$o
179mgdictlist$e: $(DICTLIST_OBJS)
180 $(LINK) $(DICTLIST_OBJS) $(LIBS)
181
182PERF_HASH_OBJS = mg_perf_hash_build$o mg_files$o
183mg_perf_hash_build$e: $(PERF_HASH_OBJS)
184 $(LINK) $(PERF_HASH_OBJS) $(LIBS)
185
186STEM_IDX_OBJS = mg_stem_idx$o mg_files$o stemmer$o locallib$o \
187 mg_errors$o term_lists$o
188mg_stem_idx$e: $(STEM_IDX_OBJS)
189 $(LINK) $(STEM_IDX_OBJS) $(LIBS)
190
191STEM_IDX_LIST_OBJS = mgstemidxlist$o mg_files$o
192mgstemidxlist$e: $(STEM_IDX_LIST_OBJS)
193 $(LINK) $(STEM_IDX_LIST_OBJS) $(LIBS)
194
195DECOMPRESS_TEXT_OBJS = mg_decompress_text$o query_term_list$o mg_files$o \
196 mg_errors$o \
197 text_get$o locallib$o backend$o stem_search$o \
198 term_lists$o stemmer$o weights$o invf_get$o lists$o
199mg_decompress_text$e: $(DECOMPRESS_TEXT_OBJS)
200 $(LINK) $(DECOMPRESS_TEXT_OBJS) $(LIBS)
201
202TEXT_MERGE_OBJS = mg_text_merge$o mg_files$o locallib$o
203mg_text_merge$e: $(TEXT_MERGE_OBJS)
204 $(LINK) $(TEXT_MERGE_OBJS) $(LIBS)
205
206INVF_MERGE_OBJS = mg_invf_merge$o mg_files$o locallib$o
207mg_invf_merge$e: $(INVF_MERGE_OBJS)
208 $(LINK) $(INVF_MERGE_OBJS) $(LIBS)
209
210LIB_OBJS = \
211 query_term_list$o \
212 locallib$o lists$o \
213 query.ranked$o query.docnums$o stem_search$o \
214 environment$o commands$o weights$o text_get$o stemmer$o \
215 read_line$o mg_errors$o backend$o invf_get$o \
216 term_lists$o bool_tree$o bool_parser$o bool_optimiser$o \
217 bool_query$o words$o
218
219JNI_LIB_OBJS = \
220 mg_passes_4jni$o text.pass1$o comp_dict$o stemmer$o \
221 text.pass2$o locallib$o words$o environment$o \
222 ivf.pass1$o ivf.pass2$o mg.special$o mg_files$o
223
224
225DISTFILES = Makefile.in $(HEADERS) $(SOURCES)
226
227libmgtext.lib : $(LIB_OBJS)
228 if exist libmgtext.lib del libmgtext.lib
229 $(AR) /out:libmgtext.lib $(LIB_OBJS)
230
231libmgpass.lib : $(JNI_LIB_OBJS)
232 if exist libmgpass.lib del libmgpass.lib
233 $(AR) /out:libmgpass.lib $(JNI_LIB_OBJS)
234
235install:
236 if not exist "$(INSTALLDIR)" mkdir "$(INSTALLDIR)"
237 for %%i in ($(EXEC)) do \
238 copy %%i "$(INSTALLDIR)"
239
240clean:
241 if exist *$o del *$o
242 if exist *$e del *$e
243 if exist libmgtext.lib del libmgtext.lib
244 if exist libmgpass.lib del libmgpass.lib
Note: See TracBrowser for help on using the repository browser.