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

Revision 21336, 6.7 KB (checked in by ak19, 10 years ago)

Missing include when compiling MGPP on its own (when ENABLE_MG is off)

  • 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_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    -I"$(INDEXERS_DIR)\mgpp\lib"
118!ENDIF
119
120AR = lib
121CC = cl
122DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE \
123        -DGSDL_NOCACHE $(Z3950_DEFS) $(MG_DEFS) $(MGPP_DEFS)
124INCLUDES = -I. -I"$(GSDL_DIR)" -I"$(COMMON_DIR)\src\lib" -I"$(COLSERVR_DIR)" -I"$(PROTOCOL_DIR)" \
125    $(MG_INCLUDES) $(MGPP_INCLUDES) \
126    -I"$(COMMON_PACKAGES_DIR)\windows\crypt\crypt" -I"$(COMMON_PACKAGES_DIR)\windows\expat\expat" \
127    -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3" -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3\windows" \
128    $(Z3950_INCLUDES)
129LDFLAGS =
130LIBS = "$(COMMON_PACKAGES_DIR)\windows\crypt\crypt\crypt.lib" "$(COMMON_PACKAGES_DIR)\windows\expat\expat\libexpat.lib" \
131        "$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3\gdbm.lib" $(ACCENTFOLD_LIBS) $(SQLITE_LIBS) $(Z3950_LIBS)
132
133!IF $(GSDL_VC4)
134DEFS = $(DEFS) -DGSDL_NAMESPACE_BROKEN -DGSDL_USE_IOS_H -D__STL_NO_NEW_IOSTREAMS
135INCLUDES = $(INCLUDES) -I"$(COMMON_PACKAGES_DIR)\windows\stlport\stlport"
136!ENDIF
137!IF $(LOCAL_LIBRARY)
138DEFS = $(DEFS) -DGSDL_LOCAL_LIBRARY
139!ENDIF
140
141
142COMPILE = $(CC) -nologo -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
143LINK = $(CC) -nologo -Fe"$@" $(LDFLAGS)
144
145
146.SUFFIXES:
147.SUFFIXES: .cpp .obj
148.cpp.obj:
149    $(COMPILE) $<
150
151
152SOURCES = \
153    action.cpp \
154    argdb.cpp \
155    authenaction.cpp \
156    browseaction.cpp \
157    browseactiontools.cpp \
158    browserclass.cpp \
159    browsetoolsclass.cpp \
160    cgiargs.cpp \
161    cgiutils.cpp \
162    cgiwrapper.cpp \
163    collectoraction.cpp \
164    configaction.cpp \
165        converter.cpp \
166    datelistbrowserclass.cpp \
167    depositoraction.cpp \
168    documentaction.cpp \
169    dynamicclassifieraction.cpp \
170    extlinkaction.cpp \
171    formattools.cpp \
172    gtiaction.cpp \
173    highlighttext.cpp \
174    historydb.cpp \
175    hlistbrowserclass.cpp \
176    htmlbrowserclass.cpp \
177    htmlutils.cpp \
178    invbrowserclass.cpp \
179    librarymain.cpp \
180    maincfg.cpp \
181    pageaction.cpp \
182    pagedbrowserclass.cpp \
183    $(MGPP_SOURCES) \
184    phindbrowserclass.cpp \
185    pingaction.cpp \
186    queryaction.cpp \
187    querytools.cpp \
188    receptionist.cpp \
189    statusaction.cpp \
190    summarise.cpp \
191    tipaction.cpp \
192    userdb.cpp \
193    usersaction.cpp \
194    vlistbrowserclass.cpp \
195    wizardaction.cpp
196
197OBJECTS = \
198    action.obj \
199    argdb.obj \
200    authenaction.obj \
201    browseaction.obj \
202    browseactiontools.obj \
203    browserclass.obj \
204    browsetoolsclass.obj \
205    cgiargs.obj \
206    cgiutils.obj \
207    cgiwrapper.obj \
208    collectoraction.obj \
209    configaction.obj \
210        converter.obj \
211    datelistbrowserclass.obj \
212    depositoraction.obj \
213    documentaction.obj \
214    dynamicclassifieraction.obj \
215    extlinkaction.obj \
216    formattools.obj \
217    gtiaction.obj \
218    highlighttext.obj \
219    historydb.obj \
220    hlistbrowserclass.obj \
221    htmlbrowserclass.obj \
222    htmlutils.obj \
223    invbrowserclass.obj \
224    librarymain.obj \
225    maincfg.obj \
226    pageaction.obj \
227    pagedbrowserclass.obj \
228    $(MGPP_OBJECTS) \
229    phindbrowserclass.obj \
230    pingaction.obj \
231    queryaction.obj \
232    querytools.obj \
233    receptionist.obj \
234    statusaction.obj \
235    summarise.obj \
236    tipaction.obj \
237    userdb.obj \
238    usersaction.obj \
239    vlistbrowserclass.obj \
240    wizardaction.obj
241
242LIBRARY = gsdlrecpt.lib
243
244GSDL_LIBS = \
245    "$(PROTOCOL_DIR)\gsdlprotocol.lib" \
246    "$(COLSERVR_DIR)\gsdlcolservr.lib" \
247    $(MG_LIBS) \
248    $(MGPP_LIBS) \
249    "$(COMMON_DIR)\src\lib\gsdllib.lib"
250
251EXECUTABLE_OBJECTS = \
252    $(OBJECTS) \
253    $(GSDL_LIBS)
254
255EXECUTABLE = library.cgi
256
257
258# Default target: make gsdlrecpt.lib if LOCAL_LIBRARY is set, otherwise both gsdlrecpt.lib and library.exe
259!IF $(LOCAL_LIBRARY)
260all: $(LIBRARY)
261!ELSE
262all: $(LIBRARY) $(EXECUTABLE)
263!ENDIF
264
265gsdlrecpt.lib: $(OBJECTS)
266    if EXIST $(LIBRARY) del $(LIBRARY)
267    $(AR) -nologo /out:$(LIBRARY) $(OBJECTS)
268
269library.cgi: $(EXECUTABLE_OBJECTS)
270    $(LINK) $(EXECUTABLE_OBJECTS) $(LIBS)
271
272!IF $(LOCAL_LIBRARY)
273install:
274!ELSE
275install: $(EXECUTABLE)
276    copy $(EXECUTABLE) "$(GSDL_DIR)\cgi-bin"
277!ENDIF
278
279clean:
280    del *.obj
281    del $(LIBRARY)
282    del $(EXECUTABLE)
283
284
285# Always recompile configaction and statusaction in case GSDL_LOCAL_LIBRARY has changed
286statusaction.obj: FORCE
287configaction.obj: FORCE
288
289FORCE:
Note: See TracBrowser for help on using the browser.