source: trunk/gsdl/packages/mg/src/text/WIN32.MAK@ 11253

Last change on this file since 11253 was 11253, checked in by mdewsnip, 18 years ago

Added "-nologo" to all cc and lib calls (to prevent a two line message from Microsoft for each file), and added "-D_CRT_SECURE_NO_DEPRECATE" to prevent lots of warnings when compiling with Visual Studio 2005.

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