source: indexers/trunk/mgpp/text/win32.mak@ 17894

Last change on this file since 17894 was 17894, checked in by mdewsnip, 16 years ago

Added -DSILENT so these are compiled the same as on Linux.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 7.3 KB
Line 
1###########################################################################
2#
3# win32 makefile -- mgpp\lib
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
27MGPPHOME = ..
28
29UNAC_DIR = ../../packages/unac
30ICONV_DIR = ../../packages/windows/iconv/iconv
31
32GSDL_VC4 = 0
33ENABLE_ACCENTFOLD = 1
34
35!IF $(GSDL_VC4)
36CPPFLAGS = -GX
37!ELSE
38CPPFLAGS = -EHsc
39!ENDIF
40
41!IF $(ENABLE_ACCENTFOLD)
42AFLIBS = "$(UNAC_DIR)\libunac.lib" "$(ICONV_DIR)\lib\iconv.lib"
43AFINCLUDES = -I"$(UNAC_DIR)"
44AFDEFS = -DENABLE_ACCENTFOLD
45!ELSE
46AFLIBS =
47AFINCLUDES =
48AFDEFS =
49!ENDIF
50
51# for now put executables in indexers/bin
52INSTALLDIR = ..\..\bin
53AR = lib
54CC = cl
55LINK = cl
56
57DEFS = -DQUIET -DHAVE_CONFIG_H -D__WIN32__ -DSILENT -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE \
58 -D__STDC__ -D__GNU_LIBRARY__ -D__MSDOS__ $(AFDEFS)
59INCLUDES = -I"." -I"$(MGPPHOME)" -I"$(MGPPHOME)\lib" $(AFINCLUDES)
60LIBS = $(MGPPHOME)\lib\libmgpplib.lib $(AFLIBS)
61
62COMPILE = $(CC) -c $(CPPFLAGS) $(DEFS) $(INCLUDES)
63
64.SUFFIXES:
65.SUFFIXES: .c .cpp .obj
66.c.obj:
67 $(COMPILE) $<
68.cpp.obj:
69 $(COMPILE) $<
70
71ANSI2KNR =
72o = .obj
73e = .exe
74
75HEADERS = \
76 FIvfLevelInfo.h TextEl.h hash.h stemmer.h \
77 FText.h TextGet.h invf.h text.h \
78 FileBuf.h UCArray.h locallib.h words.h \
79 FragLevelConvert.h WordData.h mg.h \
80 IndexData.h build.h mg_errors.h \
81 TagInfo.h comp_dict.h mg_files.h Weights.h \
82 MGQuery.h Terms.h QueryLex.h QueryParser.h \
83 GSDLQueryLex.h GSDLQueryParser.h
84
85
86SOURCES = \
87 FIvfLevelInfo.cpp ivf.pass1.cpp mgpp_invf_dump.cpp \
88 FText.cpp ivf.pass2.cpp mgpp_passes.cpp \
89 FileBuf.cpp locallib.cpp mgpp_perf_hash_build.cpp \
90 FragLevelConvert.cpp mg.special.cpp mgpp_stem_idx.cpp \
91 IndexData.cpp mgpp_compression_dict.cpp mgpp_weights_build.cpp \
92 TagInfo.cpp mgpp_decompress_text.cpp stemmer.cpp \
93 TextEl.cpp mg_errors.cpp text.cpp \
94 TextGet.cpp mgpp_fast_comp_dict.cpp text.pass1.cpp \
95 UCArray.cpp mg_files.cpp text.pass2.cpp \
96 comp_dict.cpp mgpp_invf_dict.cpp words.cpp \
97 invf.cpp mgpp_invf_dict_dump.cpp Weights.cpp \
98 MGQuery.cpp Terms.cpp QueryTester.cpp \
99 QueryLex.cpp QueryParser.cpp \
100 GSDLQueryLex.cpp GSDLQueryParser.cpp Queryer.cpp
101
102
103EXEC = mgpp_passes$e mgpp_decompress_text$e mgpp_perf_hash_build$e \
104 mgpp_invf_dump$e mgpp_weights_build$e mgpp_invf_dict$e \
105 mgpp_stem_idx$e mgpp_invf_dict_dump$e mgpp_compression_dict$e \
106 mgpp_fast_comp_dict$e QueryTester$e Queryer$e
107
108DISTFILES = Makefile.in $(HEADERS) $(SOURCES)
109
110all : $(EXEC) libmgpptext.lib libmgpppass.lib
111
112
113PASSES_OBJS = \
114 mgpp_passes$o text.pass1$o comp_dict$o \
115 text.pass2$o locallib$o \
116 ivf.pass1$o ivf.pass2$o mg.special$o mg_files$o \
117 words$o invf$o FileBuf$o TextEl$o UCArray$o TagInfo$o \
118 FText$o text$o FIvfLevelInfo$o
119
120mgpp_passes$e: $(PASSES_OBJS)
121 $(LINK) $(PASSES_OBJS) $(LIBS)
122
123QUERYER_OBJS = Queryer$o mg_files$o mg_errors$o locallib$o invf$o UCArray$o \
124 FIvfLevelInfo$o FragLevelConvert$o Terms$o MGQuery$o \
125 IndexData$o stemmer$o Weights$o TextGet$o text$o FText$o \
126 GSDLQueryParser$o GSDLQueryLex$o words$o
127
128Queryer$e: $(QUERYER_OBJS)
129 $(LINK) $(QUERYER_OBJS) $(LIBS)
130
131QUERY_TESTER_OBJS = QueryTester$o mg_files$o invf$o UCArray$o \
132 FIvfLevelInfo$o FragLevelConvert$o Terms$o MGQuery$o \
133 IndexData$o stemmer$o Weights$o
134
135QueryTester$e: $(QUERY_TESTER_OBJS)
136 $(LINK) $(QUERY_TESTER_OBJS) $(LIBS)
137
138WEIGHTS_BUILD_OBJS = mgpp_weights_build$o mg_files$o invf$o UCArray$o \
139 FIvfLevelInfo$o FragLevelConvert$o
140
141mgpp_weights_build$e: $(WEIGHTS_BUILD_OBJS)
142 $(LINK) $(WEIGHTS_BUILD_OBJS) $(LIBS)
143
144COMP_DICT_OBJS = mgpp_compression_dict$o mg_files$o locallib$o
145
146mgpp_compression_dict$e: $(COMP_DICT_OBJS)
147 $(LINK) $(COMP_DICT_OBJS) $(LIBS)
148
149FAST_COMP_OBJS = mgpp_fast_comp_dict$o mg_files$o locallib$o
150
151mgpp_fast_comp_dict$e: $(FAST_COMP_OBJS)
152 $(LINK) $(FAST_COMP_OBJS) $(LIBS)
153
154INVF_DUMP_OBJS = mgpp_invf_dump$o locallib$o mg_files$o invf$o UCArray$o
155
156mgpp_invf_dump$e: $(INVF_DUMP_OBJS)
157 $(LINK) $(INVF_DUMP_OBJS) $(LIBS)
158
159INVF_DICT_OBJS = mgpp_invf_dict$o mg_files$o invf$o UCArray$o
160
161mgpp_invf_dict$e: $(INVF_DICT_OBJS)
162 $(LINK) $(INVF_DICT_OBJS) $(LIBS)
163
164INVF_DICT_DUMP_OBJS = mgpp_invf_dict_dump$o mg_files$o invf$o UCArray$o
165
166mgpp_invf_dict_dump$e: $(INVF_DICT_DUMP_OBJS)
167 $(LINK) $(INVF_DICT_DUMP_OBJS) $(LIBS)
168
169PERF_HASH_OBJS = mgpp_perf_hash_build$o mg_files$o invf$o UCArray$o
170
171mgpp_perf_hash_build$e: $(PERF_HASH_OBJS)
172 $(LINK) $(PERF_HASH_OBJS) $(LIBS)
173
174STEM_IDX_OBJS = mgpp_stem_idx$o mg_files$o stemmer$o \
175 invf$o UCArray$o
176
177mgpp_stem_idx$e: $(STEM_IDX_OBJS)
178 $(LINK) $(STEM_IDX_OBJS) $(LIBS)
179#/link /NODEFAULTLIB:libc
180
181DECOMPRESS_TEXT_OBJS = \
182 mgpp_decompress_text$o mg_files$o mg_errors$o \
183 locallib$o text$o UCArray$o TextGet$o FText$o
184
185mgpp_decompress_text$e: $(DECOMPRESS_TEXT_OBJS)
186 $(LINK) $(DECOMPRESS_TEXT_OBJS) $(LIBS)
187
188
189LIB_OBJS = mg_files$o mg_errors$o locallib$o invf$o UCArray$o \
190 FIvfLevelInfo$o FragLevelConvert$o Terms$o MGQuery$o \
191 IndexData$o stemmer$o Weights$o TextGet$o text$o FText$o \
192 GSDLQueryParser$o GSDLQueryLex$o words$o
193
194libmgpptext.lib: $(LIB_OBJS)
195 if exist libmgpptext.lib del libmgpptext.lib
196 $(AR) /out:libmgpptext.lib $(LIB_OBJS)
197
198JNI_LIB_OBJS = \
199 mgpp_passes_4jni$o text.pass1$o comp_dict$o \
200 text.pass2$o locallib$o \
201 ivf.pass1$o ivf.pass2$o mg.special$o mg_files$o \
202 words$o invf$o FileBuf$o TextEl$o UCArray$o TagInfo$o \
203 FText$o text$o FIvfLevelInfo$o
204
205libmgpppass.lib: $(JNI_LIB_OBJS)
206 if exist libmgpppass.lib del libmgpppass.lib
207 $(AR) /out:libmgpppass.lib $(JNI_LIB_OBJS)
208
209install:
210 if not exist "$(INSTALLDIR)" mkdir "$(INSTALLDIR)"
211 for %%i in ($(EXEC)) do \
212 copy %%i "$(INSTALLDIR)"
213
214clean:
215 if exist *$o del *$o
216 if exist *$e del *$e
217 if exist libmgpptext.lib del libmgpptext.lib
218 if exist libmgpppass.lib del libmgpppass.lib
219
Note: See TracBrowser for help on using the repository browser.