source: main/trunk/greenstone2/runtime-src/src/oaiservr/win32.mak@ 21931

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

Matches the win32.mak of recpt: doesn't compile up oaserver.cgi for LOCAL_LIBRARY.

  • Property svn:keywords set to Author Date Id Revision
File size: 5.0 KB
Line 
1###########################################################################
2#
3# win32 makefile -- src/oaiserver
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
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
41LOCAL_LIBRARY = 0
42DLL = 0
43DLLDEBUG = 0
44ENABLE_ACCENTFOLD = 1
45USE_SQLITE = 1
46ENABLE_MG = 1
47ENABLE_MGPP = 1
48ENABLE_LUCENE = 1
49
50!IF $(DEBUG)
51CXXFLAGS = -DEBUG -Z7 /errorReport:prompt
52!ELSE
53CXXFLAGS =
54!ENDIF
55
56!IF $(GSDL_VC4)
57CXXFLAGS = $(CXXFLAGS) -GX
58!ELSE
59CXXFLAGS = $(CXXFLAGS) -EHsc
60!ENDIF
61
62!IF $(DLL)
63CXXFLAGS = $(CXXFLAGS) -MD
64!ELSE
65!IF ($(DLLDEBUG))
66CXXFLAGS = $(CXXFLAGS) -MDd
67!ENDIF
68!ENDIF
69
70!IF $(ENABLE_ACCENTFOLD)
71ACCENTFOLD_LIBS = "$(INDEXERS_DIR)\packages\unac\libunac.lib" "$(INDEXERS_DIR)\packages\windows\iconv\iconv\lib\iconv.lib"
72!ELSE
73ACCENTFOLD_LIBS =
74!ENDIF
75
76!IF $(USE_SQLITE)
77SQLITE_LIBS = "$(COMMON_PACKAGES_DIR)\sqlite\lib\sqlite3.lib"
78!ELSE
79SQLITE_LIBS =
80!ENDIF
81
82!IF $(ENABLE_MG)
83MG_LIBS = "$(INDEXERS_DIR)\mg\src\text\libmgtext.lib" \
84 "$(INDEXERS_DIR)\mg\lib\libmglib.lib"
85!ELSE
86MG_LIBS =
87!ENDIF
88
89!IF $(ENABLE_MGPP)
90MGPP_LIBS = "$(INDEXERS_DIR)\mgpp\text\libmgpptext.lib" \
91 "$(INDEXERS_DIR)\mgpp\lib\libmgpplib.lib"
92MGPP_INCLUDES = -I"$(INDEXERS_DIR)\mgpp\text"
93!ELSE
94MGPP_LIBS =
95MGPP_INCLUDES =
96!ENDIF
97
98
99AR = lib
100CC = cl
101DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE \
102 -DGSDL_NOCACHE
103INCLUDES = -I"$(COMMON_DIR)\src\lib" -I"$(COLSERVR_DIR)" -I"$(PROTOCOL_DIR)" -I"$(RECPT_DIR)" \
104 $(MGPP_INCLUDES) -I"$(COMMON_PACKAGES_DIR)\windows\crypt\crypt" \
105 -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3" -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3\windows" \
106 -I"$(COMMON_PACKAGES_DIR)\windows\expat\expat"
107LDFLAGS =
108LIBS = "$(COMMON_PACKAGES_DIR)\windows\crypt\crypt\crypt.lib" "$(COMMON_PACKAGES_DIR)\windows\expat\expat\libexpat.lib" \
109 "$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3\gdbm.lib" $(ACCENTFOLD_LIBS) $(SQLITE_LIBS)
110
111!IF $(GSDL_VC4)
112DEFS = $(DEFS) -DGSDL_NAMESPACE_BROKEN -DGSDL_USE_IOS_H -D__STL_NO_NEW_IOSTREAMS
113INCLUDES = $(INCLUDES) -I"$(COMMON_PACKAGES_DIR)\windows\stlport\stlport"
114!ENDIF
115!IF $(LOCAL_LIBRARY)
116DEFS = $(DEFS) -DGSDL_LOCAL_LIBRARY
117!ENDIF
118
119
120COMPILE = $(CC) -nologo -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
121LINK = $(CC) -nologo -Fe"$@"
122
123
124.SUFFIXES:
125.SUFFIXES: .cpp .obj
126.cpp.obj:
127 $(COMPILE) $<
128
129
130RECPT_OBJECTS = \
131 "$(RECPT_DIR)\cgiargs.obj" \
132 "$(RECPT_DIR)\cgiutils.obj" \
133 "$(RECPT_DIR)\htmlutils.obj"
134
135SOURCES = \
136 abstractlistaction.cpp \
137 dublincore.cpp \
138 qualified_dublincore.cpp \
139 identifyaction.cpp \
140 listidsaction.cpp \
141 listrecsaction.cpp \
142 listsetsaction.cpp \
143 metaformat.cpp \
144 metaformatsaction.cpp \
145 oaiaction.cpp \
146 oaiargs.cpp \
147 oaiconfig.cpp \
148 oaidispatcher.cpp \
149 oaimain.cpp \
150 oaitools.cpp \
151 recordaction.cpp \
152 resumptiontoken.cpp \
153 rfc1807.cpp
154
155OBJECTS = \
156 abstractlistaction.obj \
157 dublincore.obj \
158 qualified_dublincore.obj \
159 identifyaction.obj \
160 listidsaction.obj \
161 listrecsaction.obj \
162 listsetsaction.obj \
163 metaformat.obj \
164 metaformatsaction.obj \
165 oaiaction.obj \
166 oaiargs.obj \
167 oaiconfig.obj \
168 oaidispatcher.obj \
169 oaimain.obj \
170 oaitools.obj \
171 recordaction.obj \
172 resumptiontoken.obj \
173 rfc1807.obj
174
175GSDL_LIBS = \
176 "$(PROTOCOL_DIR)\gsdlprotocol.lib" \
177 "$(COLSERVR_DIR)\gsdlcolservr.lib" \
178 $(MG_LIBS) \
179 $(MGPP_LIBS) \
180 "$(COMMON_DIR)\src\lib\gsdllib.lib"
181
182EXECUTABLE_OBJECTS = \
183 $(OBJECTS) \
184 $(RECPT_OBJECTS) \
185 $(GSDL_LIBS)
186
187EXECUTABLE = oaiserver.cgi
188
189
190# Default target: compile up .obj files only if LOCAL_LIBRARY is set, otherwise both obj files and oaiserver.cgi
191!IF $(LOCAL_LIBRARY)
192all: $(EXECUTABLE_OBJECTS)
193!ELSE
194all: $(EXECUTABLE)
195!ENDIF
196
197oaiserver.cgi: $(EXECUTABLE_OBJECTS)
198 $(LINK) $(EXECUTABLE_OBJECTS) $(LIBS)
199
200!IF $(LOCAL_LIBRARY)
201install:
202!ELSE
203install: $(EXECUTABLE)
204 copy $(EXECUTABLE) "$(GSDL_DIR)\cgi-bin"
205!ENDIF
206
207clean:
208 del *.obj
209 del $(EXECUTABLE)
Note: See TracBrowser for help on using the repository browser.