source: gsdl/trunk/src/recpt/win32.mak@ 15568

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

A couple of fixes to Windows compilation of the Z39.50 client (part of the receptionist).

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