root/main/trunk/greenstone2/runtime-src/src/oaiservr/win32.mak @ 22080

Revision 22080, 5.2 KB (checked in by ak19, 10 years ago)

Undoing partial commit: accidentally committed windows makefiles along with the Linux makefiles which were the only ones I wanted to commit. Undoing commit because the changes are untested and only some changed files were committed.

  • Property svn:keywords set to Author Date Id Revision
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_DEFS = -DENABLE_MG
84MG_LIBS = "$(INDEXERS_DIR)\mg\src\text\libmgtext.lib" \
85    "$(INDEXERS_DIR)\mg\lib\libmglib.lib"   
86!ELSE
87MG_DEFS =
88MG_LIBS =
89!ENDIF
90
91!IF $(ENABLE_MGPP)
92MGPP_DEFS = -DENABLE_MGPP
93MGPP_LIBS = "$(INDEXERS_DIR)\mgpp\text\libmgpptext.lib" \
94    "$(INDEXERS_DIR)\mgpp\lib\libmgpplib.lib"
95MGPP_INCLUDES = -I"$(INDEXERS_DIR)\mgpp\text"
96!ELSE
97MGPP_DEFS =
98MGPP_LIBS =
99MGPP_INCLUDES =
100!ENDIF
101
102!IF $(ENABLE_LUCENE)
103LUCENE_DEFS = -DENABLE_LUCENE
104!ELSE
105LUCENE_DEFS=
106!ENDIF
107
108
109AR = lib
110CC = cl
111DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE \
112        -DGSDL_NOCACHE $(MG_DEFS) $(MGPP_DEFS) $(LUCENE_DEFS)
113INCLUDES = -I"$(COMMON_DIR)\src\lib" -I"$(COLSERVR_DIR)" -I"$(PROTOCOL_DIR)" -I"$(RECPT_DIR)" \
114        $(MGPP_INCLUDES) -I"$(COMMON_PACKAGES_DIR)\windows\crypt\crypt" \
115    -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3" -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3\windows" \
116    -I"$(COMMON_PACKAGES_DIR)\windows\expat\expat"
117LDFLAGS =
118LIBS = "$(COMMON_PACKAGES_DIR)\windows\crypt\crypt\crypt.lib" "$(COMMON_PACKAGES_DIR)\windows\expat\expat\libexpat.lib" \
119        "$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3\gdbm.lib" $(ACCENTFOLD_LIBS) $(SQLITE_LIBS)
120
121!IF $(GSDL_VC4)
122DEFS = $(DEFS) -DGSDL_NAMESPACE_BROKEN -DGSDL_USE_IOS_H -D__STL_NO_NEW_IOSTREAMS
123INCLUDES = $(INCLUDES) -I"$(COMMON_PACKAGES_DIR)\windows\stlport\stlport"
124!ENDIF
125!IF $(LOCAL_LIBRARY)
126DEFS = $(DEFS) -DGSDL_LOCAL_LIBRARY
127!ENDIF
128
129
130COMPILE = $(CC) -nologo -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
131LINK = $(CC) -nologo -Fe"$@"
132
133
134.SUFFIXES:
135.SUFFIXES: .cpp .obj
136.cpp.obj:
137    $(COMPILE) $<
138
139
140RECPT_OBJECTS = \
141    "$(RECPT_DIR)\cgiargs.obj" \
142    "$(RECPT_DIR)\cgiutils.obj" \
143    "$(RECPT_DIR)\htmlutils.obj"
144
145SOURCES = \
146    abstractlistaction.cpp \
147    dublincore.cpp \
148    qualified_dublincore.cpp \
149    identifyaction.cpp \
150    listidsaction.cpp \
151    listrecsaction.cpp \
152    listsetsaction.cpp \
153    metaformat.cpp \
154    metaformatsaction.cpp \
155    oaiaction.cpp \
156    oaiargs.cpp \
157    oaiconfig.cpp \
158    oaidispatcher.cpp \
159    oaimain.cpp \
160    oaitools.cpp \
161    recordaction.cpp \
162    resumptiontoken.cpp \
163    rfc1807.cpp
164
165OBJECTS = \
166    abstractlistaction.obj \
167    dublincore.obj \
168    qualified_dublincore.obj \
169    identifyaction.obj \
170    listidsaction.obj \
171    listrecsaction.obj \
172    listsetsaction.obj \
173    metaformat.obj \
174    metaformatsaction.obj \
175    oaiaction.obj \
176    oaiargs.obj \
177    oaiconfig.obj \
178    oaidispatcher.obj \
179    oaimain.obj \
180    oaitools.obj \
181    recordaction.obj \
182    resumptiontoken.obj \
183    rfc1807.obj
184
185GSDL_LIBS = \
186    "$(PROTOCOL_DIR)\gsdlprotocol.lib" \
187    "$(COLSERVR_DIR)\gsdlcolservr.lib" \
188    $(MG_LIBS) \
189    $(MGPP_LIBS) \
190    "$(COMMON_DIR)\src\lib\gsdllib.lib"
191
192EXECUTABLE_OBJECTS = \
193    $(OBJECTS) \
194    $(RECPT_OBJECTS) \
195    $(GSDL_LIBS)
196
197EXECUTABLE = oaiserver.cgi
198
199
200# Default target: compile up .obj files only if LOCAL_LIBRARY is set, otherwise both obj files and oaiserver.cgi
201!IF $(LOCAL_LIBRARY)
202all: $(EXECUTABLE_OBJECTS)
203!ELSE
204all: $(EXECUTABLE)
205!ENDIF
206
207oaiserver.cgi: $(EXECUTABLE_OBJECTS)
208    $(LINK) $(EXECUTABLE_OBJECTS) $(LIBS)
209
210!IF $(LOCAL_LIBRARY)
211install:
212!ELSE
213install: $(EXECUTABLE)
214    copy $(EXECUTABLE) "$(GSDL_DIR)\cgi-bin"
215!ENDIF
216
217clean:
218    del *.obj
219    del $(EXECUTABLE)
Note: See TracBrowser for help on using the browser.