source: main/trunk/greenstone2/runtime-src/src/recpt/win32.mak@ 21324

Last change on this file since 21324 was 21324, checked in by ak19, 11 years ago

Changes to makefiles, configure files, and source code to work with the new configure flags that allow indexers to be individually compiled up by setting each indexer to be enabled or disabled (enable-mg, enable-mgpp, enable-lucene)

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 6.7 KB
Line 
1###########################################################################
2#
3# win32 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-2008 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
27GSDL_DIR = ..\..\..
28COMMON_DIR = $(GSDL_DIR)\common-src
29RUNTIME_DIR = $(GSDL_DIR)\runtime-src
30
31INDEXERS_DIR = $(COMMON_DIR)\indexers
32COMMON_PACKAGES_DIR = $(COMMON_DIR)\packages
33PACKAGES_DIR = $(RUNTIME_DIR)\packages
34COLSERVR_DIR = $(RUNTIME_DIR)\src\colservr
35PROTOCOL_DIR = $(RUNTIME_DIR)\src\protocol
36Z3950_DIR = $(RUNTIME_DIR)\src\z3950
37
38
39GSDL_VC4 = 0
40LOCAL_LIBRARY = 0
41USE_Z3950 = 0
42DEBUG = 0
43DLL = 0
44DLLDEBUG = 0
45ENABLE_ACCENTFOLD = 1
46USE_SQLITE = 1
47ENABLE_MG = 1
48ENABLE_MGPP = 1
49ENABLE_LUCENE = 1
50
51!IF $(DEBUG)
52CXXFLAGS = -DEBUG -Z7 /errorReport:prompt
53!ELSE
54CXXFLAGS =
55!ENDIF
56
57!IF $(GSDL_VC4)
58CXXFLAGS = $(CXXFLAGS) -GX
59!ELSE
60CXXFLAGS = $(CXXFLAGS) -EHsc
61!ENDIF
62
63!IF $(DLL)
64CXXFLAGS = $(CXXFLAGS) -MD
65!ELSE
66!IF ($(DLLDEBUG))
67CXXFLAGS = $(CXXFLAGS) -MDd
68!ENDIF
69!ENDIF
70
71!IF $(ENABLE_ACCENTFOLD)
72ACCENTFOLD_LIBS = "$(INDEXERS_DIR)\packages\unac\libunac.lib" "$(INDEXERS_DIR)\packages\windows\iconv\iconv\lib\iconv.lib"
73!ELSE
74ACCENTFOLD_LIBS =
75!ENDIF
76
77!IF "$(USE_SQLITE)" == "0"
78SQLITE_LIBS =
79!ELSE
80SQLITE_LIBS = "$(COMMON_PACKAGES_DIR)\sqlite\lib\sqlite3.lib"
81!ENDIF
82
83!IF $(USE_Z3950)
84Z3950_DEFS = -DUSE_Z3950
85Z3950_INCLUDES = -I$(Z3950_DIR)
86Z3950_LIBS = $(Z3950_DIR)\gsdlz3950.lib $(PACKAGES_DIR)\yaz\yaz-2.1.4\lib\yaz.lib
87!ELSE
88Z3950_DEFS =
89Z3950_INCLUDES =
90Z3950_LIBS =
91!ENDIF
92
93!IF "$(ENABLE_MG)" == "0"
94MG_DEFS =
95MG_LIBS =
96MG_INCLUDES =
97!ELSE
98MG_DEFS = -DENABLE_MG
99MG_LIBS = "$(INDEXERS_DIR)\mg\src\text\libmgtext.lib" \
100 "$(INDEXERS_DIR)\mg\lib\libmglib.lib"
101MG_INCLUDES = -I"$(INDEXERS_DIR)\mg" -I"$(INDEXERS_DIR)\mg\lib"
102!ENDIF
103
104!IF "$(ENABLE_MGPP)" == "0"
105MGPP_DEFS =
106MGPP_SOURCES =
107MGPP_OBJECTS =
108MGPP_LIBS =
109MGPP_INCLUDES =
110!ELSE
111MGPP_DEFS = -DENABLE_MGPP
112MGPP_SOURCES = phindaction.cpp
113MGPP_OBJECTS = phindaction.obj
114MGPP_LIBS = "$(INDEXERS_DIR)\mgpp\text\libmgpptext.lib" \
115 "$(INDEXERS_DIR)\mgpp\lib\libmgpplib.lib"
116MGPP_INCLUDES = -I"$(INDEXERS_DIR)\mgpp\text"
117!ENDIF
118
119AR = lib
120CC = cl
121DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE \
122 -DGSDL_NOCACHE $(Z3950_DEFS) $(MG_DEFS) $(MGPP_DEFS)
123INCLUDES = -I. -I"$(GSDL_DIR)" -I"$(COMMON_DIR)\src\lib" -I"$(COLSERVR_DIR)" -I"$(PROTOCOL_DIR)" \
124 $(MG_INCLUDES) $(MGPP_INCLUDES) \
125 -I"$(COMMON_PACKAGES_DIR)\windows\crypt\crypt" -I"$(COMMON_PACKAGES_DIR)\windows\expat\expat" \
126 -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3" -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3\windows" \
127 $(Z3950_INCLUDES)
128LDFLAGS =
129LIBS = "$(COMMON_PACKAGES_DIR)\windows\crypt\crypt\crypt.lib" "$(COMMON_PACKAGES_DIR)\windows\expat\expat\libexpat.lib" \
130 "$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3\gdbm.lib" $(ACCENTFOLD_LIBS) $(SQLITE_LIBS) $(Z3950_LIBS)
131
132!IF $(GSDL_VC4)
133DEFS = $(DEFS) -DGSDL_NAMESPACE_BROKEN -DGSDL_USE_IOS_H -D__STL_NO_NEW_IOSTREAMS
134INCLUDES = $(INCLUDES) -I"$(COMMON_PACKAGES_DIR)\windows\stlport\stlport"
135!ENDIF
136!IF $(LOCAL_LIBRARY)
137DEFS = $(DEFS) -DGSDL_LOCAL_LIBRARY
138!ENDIF
139
140
141COMPILE = $(CC) -nologo -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
142LINK = $(CC) -nologo -Fe"$@" $(LDFLAGS)
143
144
145.SUFFIXES:
146.SUFFIXES: .cpp .obj
147.cpp.obj:
148 $(COMPILE) $<
149
150
151SOURCES = \
152 action.cpp \
153 argdb.cpp \
154 authenaction.cpp \
155 browseaction.cpp \
156 browseactiontools.cpp \
157 browserclass.cpp \
158 browsetoolsclass.cpp \
159 cgiargs.cpp \
160 cgiutils.cpp \
161 cgiwrapper.cpp \
162 collectoraction.cpp \
163 configaction.cpp \
164 converter.cpp \
165 datelistbrowserclass.cpp \
166 depositoraction.cpp \
167 documentaction.cpp \
168 dynamicclassifieraction.cpp \
169 extlinkaction.cpp \
170 formattools.cpp \
171 gtiaction.cpp \
172 highlighttext.cpp \
173 historydb.cpp \
174 hlistbrowserclass.cpp \
175 htmlbrowserclass.cpp \
176 htmlutils.cpp \
177 invbrowserclass.cpp \
178 librarymain.cpp \
179 maincfg.cpp \
180 pageaction.cpp \
181 pagedbrowserclass.cpp \
182 $(MGPP_SOURCES) \
183 phindbrowserclass.cpp \
184 pingaction.cpp \
185 queryaction.cpp \
186 querytools.cpp \
187 receptionist.cpp \
188 statusaction.cpp \
189 summarise.cpp \
190 tipaction.cpp \
191 userdb.cpp \
192 usersaction.cpp \
193 vlistbrowserclass.cpp \
194 wizardaction.cpp
195
196OBJECTS = \
197 action.obj \
198 argdb.obj \
199 authenaction.obj \
200 browseaction.obj \
201 browseactiontools.obj \
202 browserclass.obj \
203 browsetoolsclass.obj \
204 cgiargs.obj \
205 cgiutils.obj \
206 cgiwrapper.obj \
207 collectoraction.obj \
208 configaction.obj \
209 converter.obj \
210 datelistbrowserclass.obj \
211 depositoraction.obj \
212 documentaction.obj \
213 dynamicclassifieraction.obj \
214 extlinkaction.obj \
215 formattools.obj \
216 gtiaction.obj \
217 highlighttext.obj \
218 historydb.obj \
219 hlistbrowserclass.obj \
220 htmlbrowserclass.obj \
221 htmlutils.obj \
222 invbrowserclass.obj \
223 librarymain.obj \
224 maincfg.obj \
225 pageaction.obj \
226 pagedbrowserclass.obj \
227 $(MGPP_OBJECTS) \
228 phindbrowserclass.obj \
229 pingaction.obj \
230 queryaction.obj \
231 querytools.obj \
232 receptionist.obj \
233 statusaction.obj \
234 summarise.obj \
235 tipaction.obj \
236 userdb.obj \
237 usersaction.obj \
238 vlistbrowserclass.obj \
239 wizardaction.obj
240
241LIBRARY = gsdlrecpt.lib
242
243GSDL_LIBS = \
244 "$(PROTOCOL_DIR)\gsdlprotocol.lib" \
245 "$(COLSERVR_DIR)\gsdlcolservr.lib" \
246 $(MG_LIBS) \
247 $(MGPP_LIBS) \
248 "$(COMMON_DIR)\src\lib\gsdllib.lib"
249
250EXECUTABLE_OBJECTS = \
251 $(OBJECTS) \
252 $(GSDL_LIBS)
253
254EXECUTABLE = library.cgi
255
256
257# Default target: make gsdlrecpt.lib if LOCAL_LIBRARY is set, otherwise both gsdlrecpt.lib and library.exe
258!IF $(LOCAL_LIBRARY)
259all: $(LIBRARY)
260!ELSE
261all: $(LIBRARY) $(EXECUTABLE)
262!ENDIF
263
264gsdlrecpt.lib: $(OBJECTS)
265 if EXIST $(LIBRARY) del $(LIBRARY)
266 $(AR) -nologo /out:$(LIBRARY) $(OBJECTS)
267
268library.cgi: $(EXECUTABLE_OBJECTS)
269 $(LINK) $(EXECUTABLE_OBJECTS) $(LIBS)
270
271!IF $(LOCAL_LIBRARY)
272install:
273!ELSE
274install: $(EXECUTABLE)
275 copy $(EXECUTABLE) "$(GSDL_DIR)\cgi-bin"
276!ENDIF
277
278clean:
279 del *.obj
280 del $(LIBRARY)
281 del $(EXECUTABLE)
282
283
284# Always recompile configaction and statusaction in case GSDL_LOCAL_LIBRARY has changed
285statusaction.obj: FORCE
286configaction.obj: FORCE
287
288FORCE:
Note: See TracBrowser for help on using the repository browser.