root/main/trunk/greenstone2/runtime-src/src/recpt/win32.mak @ 22080

Revision 22080, 7.2 KB (checked in by ak19, 10 years ago)

Undoing partial commit: accidentally committed windows makefiles along with the Linux makefiles which were the only ones I wanted to commit. Undoing commit because the changes are untested and only some changed files were committed.

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