root/main/trunk/greenstone2/runtime-src/src/w32server/win32.mak @ 22078

Revision 22078, 6.1 KB (checked in by ak19, 10 years ago)

1. Missing conditional LIBS or INCLUDES or DIR declaration for when USE_GDBM is switched on. Previously it used to always put these in the includes/libs, not it only does so on USE_GDBM.

  • Property svn:keywords set to Author Date Id Revision
Line 
1###########################################################################
2#
3# win32 makefile -- src/w32server
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
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
36RECPT_DIR    = $(RUNTIME_DIR)\src\recpt
37
38
39GSDL_VC4 = 0
40DEBUG = 0
41ENABLE_ACCENTFOLD = 1
42USE_GDBM = 1
43USE_JDBM = 1
44USE_SQLITE = 1
45USE_MSSQL = 0
46ENABLE_MG = 1
47ENABLE_MGPP = 1
48ENABLE_LUCENE = 1
49
50!IF $(DEBUG)
51CXXFLAGS = -DEBUG -Z7 /errorReport:prompt
52LDFLAGS = -DEBUG -Z7 /errorReport:prompt
53!ELSE
54CXXFLAGS =
55LDFLAGS =
56!ENDIF
57
58
59!IF $(GSDL_VC4)
60CXXFLAGS = $(CXXFLAGS) -GX
61!ELSE
62CXXFLAGS = $(CXXFLAGS) -EHsc
63!ENDIF
64
65!IF $(ENABLE_ACCENTFOLD)
66ACCENTFOLD_LIBS = "$(INDEXERS_DIR)\packages\unac\libunac.lib" "$(INDEXERS_DIR)\packages\windows\iconv\iconv\lib\iconv.lib"
67!ELSE
68ACCENTFOLD_LIBS =
69!ENDIF
70
71!IF $(USE_GDBM)
72GDBM_INCLUDES = -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3" \
73    -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3\windows"
74GDBM_LIBS = "$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3\gdbm.lib"
75GDBM_DEFINES = -DUSE_GDBM
76!ELSE
77GDBM_INCLUDES =
78GDBM_LIBS =
79GDBM_DEFINES =
80!ENDIF
81
82!IF $(USE_JDBM)
83JDBM_DEFINES = -DUSE_JDBM
84!ELSE
85JDBM_DEFINES =
86!ENDIF
87
88!IF $(USE_SQLITE)
89SQLITE_LIBS = "$(COMMON_PACKAGES_DIR)\sqlite\lib\sqlite3.lib"
90SQLITE_DEFINES = -DUSE_SQLITE
91!ELSE
92SQLITE_LIBS =
93SQLITE_DEFINES =
94!ENDIF
95
96!IF $(USE_MSSQL)
97MSSQL_DEFINES = -DUSE_MSSQL
98!ELSE
99MSSQL_DEFINES =
100!ENDIF
101
102!IF $(ENABLE_MG)
103MG_DEFS = -DENABLE_MG
104MG_LIBS = "$(INDEXERS_DIR)\mg\src\text\libmgtext.lib" \
105    "$(INDEXERS_DIR)\mg\lib\libmglib.lib"
106MG_INCLUDES = -I"$(INDEXERS_DIR)\mg" -I"$(INDEXERS_DIR)\mg\lib" -I"$(INDEXERS_DIR)\mg\src\text"
107!ELSE
108MG_DEFS =
109MG_LIBS =
110MG_INCLUDES =
111!ENDIF
112
113!IF $(ENABLE_MGPP)
114MGPP_DEFS = -DENABLE_MGPP
115MGPP_LIBS = "$(INDEXERS_DIR)\mgpp\text\libmgpptext.lib" \
116    "$(INDEXERS_DIR)\mgpp\lib\libmgpplib.lib"
117MGPP_INCLUDES = -I"$(INDEXERS_DIR)\mgpp\lib" -I"$(INDEXERS_DIR)\mgpp\text"
118!ELSE
119MGPP_DEFS =
120MGPP_LIBS =
121MGPP_INCLUDES =
122!ENDIF
123
124!IF $(ENABLE_LUCENE)
125LUCENE_DEFS = -DENABLE_LUCENE
126!ELSE
127LUCENE_DEFS=
128!ENDIF
129
130AR = lib
131CC = cl
132DEFS = -D__WIN32__ -DHAVE_CONFIG_H -D_LITTLE_ENDIAN -DPARADOCNUM -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE \
133    $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES) $(MSSQL_DEFINES) \
134    $(MG_DEFS) $(MGPP_DEFS) $(LUCENE_DEFS)
135INCLUDES = -I"$(GSDL_DIR)" -I"$(COMMON_DIR)\src\lib" -I"$(COLSERVR_DIR)" -I"$(PROTOCOL_DIR)" -I"$(RECPT_DIR)" \
136    $(GDBM_INCLUDES) \ 
137    -I"$(COLSERVR_DIR)" \
138    $(MG_INCLUDES) \
139        $(MGPP_INCLUDES)
140
141LIBS = "$(COMMON_PACKAGES_DIR)\windows\crypt\crypt\crypt.lib" "$(COMMON_PACKAGES_DIR)\windows\expat\expat\libexpat.lib" \
142        $(GDBM_LIBS) $(ACCENTFOLD_LIBS) $(SQLITE_LIBS)
143RSC = rc
144WINLIBS = kernel32.lib user32.lib gdi32.lib winspool.lib \
145          comdlg32.lib advapi32.lib shell32.lib ole32.lib \
146          oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
147#wsock32.lib
148
149
150!IF $(GSDL_VC4)
151DEFS = $(DEFS) -DGSDL_NAMESPACE_BROKEN -DGSDL_USE_IOS_H -D__STL_NO_NEW_IOSTREAMS
152INCLUDES = $(INCLUDES) -I"$(COMMON_PACKAGES_DIR)\windows\stlport\stlport"
153!ENDIF
154
155
156COMPILE = $(CC) -nologo -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
157LINK = $(CC) -nologo $(LDFLAGS) -Fe"$@"
158
159
160.SUFFIXES:
161.SUFFIXES: .cpp .obj
162.cpp.obj:
163    $(COMPILE) $<
164
165
166SOURCES = \
167    cgiwrapper.cpp \
168    conftools.cpp \
169    d_winsock.cpp \
170    fnord.cpp \
171    httpreq.cpp \
172    httpsend.cpp \
173        httpsrv.cpp \
174    locate.cpp \
175    netio.cpp \
176    parse.cpp \
177    settings.cpp \
178    startbrowser.cpp \
179    wincgiutils.cpp
180
181OBJECTS = \
182    cgiwrapper.obj \
183    conftools.obj \
184    d_winsock.obj \
185    fnord.obj \
186    httpreq.obj \
187    httpsend.obj \
188        httpsrv.obj \
189    locate.obj \
190    netio.obj \
191    parse.obj \
192    settings.obj \
193    startbrowser.obj \
194    wincgiutils.obj
195
196RESOURCES = \
197    server.res
198
199GSDL_LIBS = \
200    "$(RECPT_DIR)\gsdlrecpt.lib" \
201    "$(PROTOCOL_DIR)\gsdlprotocol.lib" \
202    "$(COLSERVR_DIR)\gsdlcolservr.lib" \
203    $(MG_LIBS) \
204    $(MGPP_LIBS) \
205    "$(COMMON_DIR)\src\lib\gsdllib.lib"
206
207EXECUTABLE_OBJECTS = \
208    $(OBJECTS) \
209    $(RESOURCES) \
210    $(GSDL_LIBS)
211
212EXECUTABLE = server.exe
213
214
215# Default target: make the local library executable
216all: $(EXECUTABLE)
217
218server.exe: $(EXECUTABLE_OBJECTS)
219    $(LINK) $(EXECUTABLE_OBJECTS) $(LIBS) $(WINLIBS)
220install:
221    copy $(EXECUTABLE) "$(GSDL_DIR)"
222
223clean:
224    del *.obj
225    del $(EXECUTABLE)
226    if exist *.pdb del *.pdb
227
228# Resources stuff
229SOURCE = "$(RUNTIME_DIR)\src\w32server\newgsdl.bmp"
230SOURCE = "$(RUNTIME_DIR)\src\w32server\resource.h"
231SOURCE = "$(RUNTIME_DIR)\src\w32server\server.ico"
232SOURCE = "$(RUNTIME_DIR)\src\w32server\gsdlcol.bmp"
233SOURCE = "$(RUNTIME_DIR)\src\w32server\server.rc"
234DEP_RSC_SERVE=\
235    "$(RUNTIME_DIR)\src\w32server\gsdlcol.bmp"\
236    "$(RUNTIME_DIR)\src\w32server\newgsdl.bmp"\
237    "$(RUNTIME_DIR)\src\w32server\server.ico"
238
239server.res : $(SOURCE) $(DEP_RSC_SERVE) "$(RUNTIME_DIR)\src\w32server"
240   $(RSC) /l 0x409 /fo"$(RUNTIME_DIR)\src\w32server\server.res" /i "$(RUNTIME_DIR)\src\w32server" \
241 /i "$(VCINSTALLDIR)/include/mfc" /d "NDEBUG" $(SOURCE)
242
243"$(RUNTIME_DIR)\src\w32server\server.res" : $(SOURCE) $(DEP_RSC_SERVE) "$(RUNTIME_DIR)\src\w32server"
244   $(RSC) /l 0x409 /fo"$(RUNTIME_DIR)\src\w32server\server.res" /i "$(RUNTIME_DIR)\src\w32server" \
245 /d "NDEBUG" $(SOURCE)
Note: See TracBrowser for help on using the browser.