source: gsdl/trunk/runtime-src/src/oaiservr/win32.mak@ 18613

Last change on this file since 18613 was 18613, checked in by davidb, 12 years ago

Switched to compiling oaiserver.cgi rather than oaiserver

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