source: main/trunk/greenstone2/runtime-src/src/colservr/win32.mak@ 21435

Last change on this file since 21435 was 21435, checked in by ak19, 11 years ago

Better way of setting the ENABLE_indexer and USE_SQLITE and ENABLE_JNI variables in the windows makefiles.

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