root/main/trunk/greenstone2/runtime-src/src/colservr/win32.mak @ 21472

Revision 21472, 4.9 KB (checked in by mdewsnip, 11 years ago)

Created USE_GDBM and USE_JDBM defines that work similar to USE_SQLITE and USE_MSSQL for controlling which infodb types are compiled in. Currently these are not configurable through the configure scripts and are always on.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1###########################################################################
2#
3# win32 makefile -- src/colservr
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
34
35GSDL_VC4 = 0
36DEBUG = 0
37DLL = 0
38DLLDEBUG = 0
39USE_GDBM = 1
40USE_JDBM = 1
41USE_SQLITE = 1
42USE_MSSQL = 0
43ENABLE_MG = 1
44ENABLE_MGPP = 1
45ENABLE_LUCENE = 1
46
47!IF $(DEBUG)
48CXXFLAGS = -DEBUG -Z7 /errorReport:prompt
49!ELSE
50CXXFLAGS =
51!ENDIF
52
53
54!IF $(GSDL_VC4)
55CXXFLAGS = $(CXXFLAGS) -GX
56!ELSE
57CXXFLAGS = $(CXXFLAGS) -EHsc
58!ENDIF
59
60!IF $(DLL)
61CXXFLAGS = $(CXXFLAGS) -MD
62!ELSE
63!IF ($(DLLDEBUG))
64CXXFLAGS = $(CXXFLAGS) -MDd
65!ENDIF
66!ENDIF
67
68!IF $(USE_GDBM)
69GDBM_DEFINES = -DUSE_GDBM
70GDBM_INCLUDES = -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3" -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3\windows"
71!ELSE
72GDBM_DEFINES =
73GDBM_INCLUDES =
74!ENDIF
75
76!IF $(USE_JDBM)
77JDBM_DEFINES = -DUSE_JDBM
78!ELSE
79JDBM_DEFINES =
80!ENDIF
81
82!IF $(USE_SQLITE)
83SQLITE_DEFINES = -DUSE_SQLITE
84SQLITE_INCLUDES = -I"$(COMMON_PACKAGES_DIR)\sqlite\include"
85!ELSE
86SQLITE_DEFINES =
87SQLITE_INCLUDES =
88!ENDIF
89
90!IF $(USE_MSSQL)
91MSSQL_DEFINES = -DUSE_MSSQL
92!ELSE
93MSSQL_DEFINES =
94!ENDIF
95
96!IF $(ENABLE_MG)
97MG_DEFS = -DENABLE_MG
98MG_SOURCES = mgq.c \
99    mgqueryfilter.cpp \
100    mgsearch.cpp \
101    phrasequeryfilter.cpp \
102    mgsource.cpp
103MG_OBJECTS = mgq.obj \
104    mgqueryfilter.obj \
105    mgsearch.obj \
106    phrasequeryfilter.obj \
107    mgsource.obj
108MG_INCLUDES = -I"$(INDEXERS_DIR)\mg" -I"$(INDEXERS_DIR)\mg\lib" -I"$(INDEXERS_DIR)\mg\src\text"
109!ELSE
110MG_DEFS =
111MG_SOURCES =
112MG_OBJECTS =
113MG_INCLUDES =
114!ENDIF
115
116!IF $(ENABLE_MGPP)
117MGPP_DEFS = -DENABLE_MGPP
118MGPP_SOURCES = mgppqueryfilter.cpp \
119    mgppsearch.cpp \
120    mgppsource.cpp
121MGPP_OBJECTS = mgppqueryfilter.obj \
122    mgppsearch.obj \
123    mgppsource.obj
124MGPP_INCLUDES = -I"$(INDEXERS_DIR)\mgpp\lib" -I"$(INDEXERS_DIR)\mgpp\text"
125!ELSE
126MGPP_DEFS =
127MGPP_SOURCES =
128MGPP_OBJECTS =
129MGPP_INCLUDES =
130!ENDIF
131
132!IF "$(ENABLE_LUCENE)" == "0"
133LUCENE_DEFS =
134!ELSE
135LUCENE_DEFS = -DENABLE_LUCENE
136!ENDIF
137
138
139AR = lib
140CC = cl
141DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE \
142        -DXML_STATIC $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES) $(MSSQL_DEFINES) \
143    $(MG_DEFS) $(MGPP_DEFS) $(LUCENE_DEFS)
144# Do NOT add the "recpt" directory here: the colserver should be independent of the receptionist!
145INCLUDES = -I"$(GSDL_DIR)" -I"$(COMMON_DIR)\src\lib" \
146    $(MG_INCLUDES) \
147    $(MGPP_INCLUDES) \
148    -I"$(COMMON_PACKAGES_DIR)\windows\expat\expat" $(GDBM_INCLUDES) $(SQLITE_INCLUDES)
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)
157
158
159.SUFFIXES:
160.SUFFIXES: .c .obj
161.c.obj:
162    $(COMPILE) $<
163
164.SUFFIXES: .cpp .obj
165.cpp.obj:
166    $(COMPILE) $<
167
168
169SOURCES = \
170        browsefilter.cpp \
171    collectserver.cpp \
172    collectset.cpp \
173        colservrconfig.cpp \
174    comtypes.cpp \
175    expat_document.cpp \
176    expat_resultset.cpp \
177    filter.cpp \
178    lucenequeryfilter.cpp \
179    lucenesearch.cpp \
180    lucenesource.cpp \
181    maptools.cpp \
182    $(MG_SOURCES) \
183    $(MGPP_SOURCES) \
184    phrasesearch.cpp \
185    querycache.cpp \
186    queryfilter.cpp \
187    queryinfo.cpp \
188    search.cpp \
189    source.cpp \
190    sqlbrowsefilter.cpp
191
192OBJECTS = \
193        browsefilter.obj \
194    collectserver.obj \
195    collectset.obj \
196        colservrconfig.obj \
197    comtypes.obj \
198    expat_document.obj \
199    expat_resultset.obj \
200    filter.obj \
201    lucenequeryfilter.obj \
202    lucenesearch.obj \
203    lucenesource.obj \
204    maptools.obj \
205    $(MG_OBJECTS) \
206    $(MGPP_OBJECTS) \
207    phrasesearch.obj \
208    querycache.obj \
209    queryfilter.obj \
210    queryinfo.obj \
211    search.obj \
212    source.obj \
213    sqlbrowsefilter.obj
214
215LIBRARY = gsdlcolservr.lib 
216
217
218# Default target: make gsdlcolservr.lib
219all: $(LIBRARY)
220
221gsdlcolservr.lib: $(OBJECTS)
222    if EXIST $(LIBRARY) del $(LIBRARY)
223    $(AR) -nologo /out:$(LIBRARY) $(OBJECTS)
224
225install:
226
227clean:
228    del *.obj
229    del $(LIBRARY)
Note: See TracBrowser for help on using the browser.