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

Last change on this file since 12990 was 12990, checked in by kjdon, 16 years ago

added accent folding support into makefiles

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 7.5 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 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
27GSDLHOME = ..\..
28GSDL_VC4 = 0
29LOCAL_LIBRARY = 0
30USE_Z3950 = 0
31DLL = 0
32DLLDEBUG = 0
33ENABLE_ACCENTFOLD = 1
34
35STLPATH = "$(GSDLHOME)\packages\windows\stlport\stlport"
36
37# YAZ kit for z39.50
38YAZDIR=$(GSDLHOME)\packages\yaz\yaz-2.1.4
39
40AR = lib
41CC = cl
42
43!IF $(GSDL_VC4)
44CPPFLAGS = -GX
45!ELSE
46CPPFLAGS = -EHsc
47!ENDIF
48
49!IF $(DLL)
50CPPFLAGS = $(CPPFLAGS) -MD
51!ELSE
52!IF ($(DLLDEBUG))
53CPPFLAGS = $(CPPFLAGS) -MDd
54!ENDIF
55!ENDIF
56
57LDFLAGS =
58
59DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE -DGSDL_NOCACHE
60INCLUDES = -I"$(GSDLHOME)\src\recpt" -I"$(GSDLHOME)\lib" -I"$(GSDLHOME)\src\colservr" \
61 -I"$(GSDLHOME)\packages\mg" -I"$(GSDLHOME)\packages\mg\lib" \
62 -I"$(GSDLHOME)\packages\mg\src\text" -I"$(GSDLHOME)\packages\windows\gdbm\gdbm" \
63 -I"$(GSDLHOME)\packages\windows\crypt\crypt" -I"$(GSDLHOME)\src\mgpp\lib" \
64 -I"$(GSDLHOME)\src\mgpp\text" -I"$(GSDLHOME)"
65!IF $(GSDL_VC4)
66DEFS = $(DEFS) -DGSDL_NAMESPACE_BROKEN -DGSDL_USE_IOS_H -D__STL_NO_NEW_IOSTREAMS
67INCLUDES = $(INCLUDES) -I$(STLPATH)
68!ENDIF
69!IF $(LOCAL_LIBRARY)
70DEFS = $(DEFS) -DGSDL_LOCAL_LIBRARY
71!ENDIF
72
73!IF $(ENABLE_ACCENTFOLD)
74AFLIBS = "$(GSDLHOME)\packages\unac\libunac.lib" "$(GSDLHOME)\packages\unac\iconv.lib"
75DEFS = $(DEFS) -DENABLE_ACCENTFOLD
76!ELSE
77AFLIBS =
78!ENDIF
79
80LIBS = "$(GSDLHOME)\packages\windows\gdbm\gdbm\gdbm.lib" \
81 "$(GSDLHOME)\packages\windows\crypt\crypt\crypt.lib" \
82 "$(GSDLHOME)\src\colservr\gsdlcolservr.lib" \
83 "$(GSDLHOME)\lib\gsdllib.lib" \
84 "$(GSDLHOME)\packages\mg\src\text\libtextin.lib" \
85 "$(GSDLHOME)\packages\mg\lib\libmg.lib" \
86 "$(GSDLHOME)\src\mgpp\text\libtextin.lib" \
87 "$(GSDLHOME)\src\mgpp\lib\libmg.lib" \
88 "$(GSDLHOME)\packages\windows\expat\expat\libexpat.lib" \
89 $(AFLIBS)
90
91!IF $(USE_Z3950)
92DEFS = $(DEFS) -DUSE_Z3950
93Z3950EXEC = z3950server.exe
94Z3950OBJS = z3950proto.obj z3950proxy.obj yaz_zclient.obj zparse.tab.obj zparse.yy.obj
95Z_CLIENTOBJS = "$(YAZDIR)\win\obj\tabcomplete.obj"
96Z_LIBYAZ = "$(YAZDIR)\lib\yaz.lib"
97LDFLAGS = $(LDFLAGS) /link /NOD:msvcrt.lib
98!ELSE
99Z3950EXEC =
100Z3950OBJS =
101Z_CLIENTOBJS =
102Z_LIBYAZ =
103!ENDIF
104
105COMPILE = $(CC) -nologo -c $(CPPFLAGS) $(DEFS) $(INCLUDES)
106LINK = $(CC) -nologo -Fe"$@"
107
108.SUFFIXES:
109.SUFFIXES: .c .obj
110.c.obj:
111 $(COMPILE) $<
112
113.SUFFIXES: .cpp .obj
114.cpp.obj:
115 $(COMPILE) $<
116
117
118COMMONHEADERS = receptionist.h cgiargs.h action.h browserclass.h \
119 converter.h recptconfig.h cgiutils.h OIDtools.h browsetoolsclass.h \
120 statusaction.h pageaction.h comtypes.h recptproto.h pingaction.h \
121 queryaction.h documentaction.h extlinkaction.h htmlutils.h \
122 querytools.h formattools.h tipaction.h authenaction.h infodbclass.h \
123 userdb.h usersaction.h vlistbrowserclass.h hlistbrowserclass.h \
124 datelistbrowserclass.h invbrowserclass.h pagedbrowserclass.h \
125 htmlbrowserclass.h historydb.h phindbrowserclass.h collectoraction.h \
126 nullproto.h argdb.h browseaction.h browseactiontools.h phindaction.h \
127 summarise.h highlighttext.h configaction.h wizardaction.h depositoraction.h
128
129CGIHEADERS = cgiwrapper.h
130
131HEADERS = $(COMMONHEADERS) $(CGIHEADERS)
132
133
134COMMONSOURCES = receptionist.cpp cgiargs.cpp action.cpp browserclass.cpp \
135 converter.cpp recptconfig.cpp cgiutils.cpp OIDtools.cpp browsetoolsclass.cpp \
136 statusaction.cpp pageaction.cpp comtypes.cpp \
137 recptproto.cpp pingaction.cpp queryaction.cpp documentaction.cpp \
138 extlinkaction.cpp htmlutils.cpp querytools.cpp formattools.cpp \
139 tipaction.cpp authenaction.cpp infodbclass.cpp userdb.cpp usersaction.cpp \
140 vlistbrowserclass.cpp hlistbrowserclass.cpp datelistbrowserclass.cpp \
141 invbrowserclass.cpp pagedbrowserclass.cpp htmlbrowserclass.cpp \
142 historydb.cpp phindbrowserclass.cpp collectoraction.cpp nullproto.cpp \
143 argdb.cpp browseaction.cpp browseactiontools.cpp phindaction.cpp \
144 summarise.cpp highlighttext.cpp configaction.cpp wizardaction.cpp \
145 depositoraction.cpp
146
147CGISOURCES = librarymain.cpp cgiwrapper.cpp
148
149SOURCES = $(COMMONSOURCES) $(CGISOURCES)
150
151
152COMMONOBJECTS = receptionist.obj cgiargs.obj action.obj browserclass.obj \
153 converter.obj recptconfig.obj cgiutils.obj OIDtools.obj browsetoolsclass.obj \
154 statusaction.obj pageaction.obj comtypes.obj recptproto.obj \
155 pingaction.obj queryaction.obj documentaction.obj extlinkaction.obj \
156 htmlutils.obj querytools.obj formattools.obj tipaction.obj \
157 authenaction.obj infodbclass.obj userdb.obj usersaction.obj \
158 vlistbrowserclass.obj hlistbrowserclass.obj datelistbrowserclass.obj \
159 invbrowserclass.obj pagedbrowserclass.obj htmlbrowserclass.obj \
160 historydb.obj phindbrowserclass.obj collectoraction.obj nullproto.obj \
161 argdb.obj browseaction.obj browseactiontools.obj phindaction.obj \
162 summarise.obj highlighttext.obj configaction.obj wizardaction.obj \
163 depositoraction.obj $(Z3950OBJS)
164
165CGIOBJECTS = librarymain.obj cgiwrapper.obj
166
167
168OBJECTS = $(COMMONOBJECTS) $(CGIOBJECTS)
169
170EXEC = library.exe $(Z3950EXEC)
171
172!IF $(LOCAL_LIBRARY)
173all: gsdlrecpt.lib $(Z3950EXEC)
174!ELSE
175all: $(EXEC)
176!ENDIF
177
178gsdlrecpt.lib : $(COMMONOBJECTS) $(Z_CLIENTOBJS)
179 if EXIST gsdlrecpt.lib del gsdlrecpt.lib
180 $(AR) -nologo /out:gsdlrecpt.lib $(COMMONOBJECTS) $(Z_CLIENTOBJS)
181
182clean:
183 del *.obj
184 del library.exe
185 del z3950server.exe
186!IF $(LOCAL_LIBRARY)
187install:
188!ELSE
189install:
190 copy library.exe "$(GSDLHOME)\cgi-bin"
191!ENDIF
192!IF $(USE_Z3950)
193 copy z3950server.exe "$(GSDLHOME)\cgi-bin"
194!ENDIF
195
196
197yaz_zclient.obj: yaz_zclient.c
198 $(COMPILE) -I"$(YAZDIR)\include" -I"$(YAZDIR)\client" yaz_zclient.c
199
200library.exe: $(OBJECTS) $(Z_CLIENTOBJS)
201 $(LINK) $(OBJECTS) $(LIBS) $(Z_LIBYAZ) $(Z_CLIENTOBJS) $(LDFLAGS)
202
203Z3950_OBJS_OLD = $(COMMONOBJECTS) $(COLSERVROBJECTS)\
204 ../colservr/z3950parser.o ../colservr/z3950explain.o \
205 ../colservr/z3950_to_gsdl.o \
206 ../colservr/z3950server.o ../colservr/read-grs.o nullproto.o \
207 ../../lib/gsdllib.a \
208 ../../packages/mg/src/text/libtextin.a \
209 ../../packages/mg/lib/libmg.a \
210 $(FASTCGI_OBJS) \
211 ../mgpp/text/libtextin.a \
212 ../mgpp/lib/libmg.a ../../packages/yaz/lib/libyaz.a ../../packages/d2m/libd2m.a
213
214Z3950_OBJS = "$(GSDLHOME)\src\colservr\gsdlz3950.lib" \
215 "$(YAZDIR)\lib\yaz.lib" \
216 "$(GSDLHOME)\packages\d2m\libd2m.lib" \
217 zparse.yy.obj comtypes.obj infodbclass.obj \
218 OIDtools.obj recptconfig.obj recptproto.obj \
219 nullproto.obj
220
221z3950server.exe: $(Z3950_OBJS)
222 @echo building z3950server
223 $(LINK) $(Z3950_OBJS) $(LIBS) $(LDFLAGS)
224
225# we want the following to always be compiled in case the status of
226# GSDL_LOCAL_LIBRARY has changed
227statusaction.obj: FORCE
228configaction.obj: FORCE
229
230FORCE:
231
Note: See TracBrowser for help on using the repository browser.