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

Revision 22080, 4.8 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:executable set to *
Line 
1###########################################################################
2#
3# win32 makefile -- src/z3950
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
36
37
38GSDL_VC4 = 0
39DEBUG = 0
40DLL = 0
41DLLDEBUG = 0
42ENABLE_ACCENTFOLD = 1
43USE_SQLITE = 1
44ENABLE_MG = 1
45ENABLE_MGPP = 1
46ENABLE_LUCENE = 1
47
48!IF $(DEBUG)
49CXXFLAGS = -DEBUG -Z7 /errorReport:prompt
50!ELSE
51CXXFLAGS =
52!ENDIF
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 $(ENABLE_ACCENTFOLD)
69ACCENTFOLD_LIBS = "$(INDEXERS_DIR)\packages\unac\libunac.lib" "$(INDEXERS_DIR)\packages\windows\iconv\iconv\lib\iconv.lib"
70!ELSE
71ACCENTFOLD_LIBS =
72!ENDIF
73
74!IF $(USE_SQLITE)
75SQLITE_LIBS = "$(COMMON_PACKAGES_DIR)\sqlite\lib\sqlite3.lib"
76!ELSE
77SQLITE_LIBS =
78!ENDIF
79
80!IF $(ENABLE_MG)
81MG_DEFS = -DENABLE_MG
82MG_LIBS = "$(INDEXERS_DIR)\mg\src\text\libmgtext.lib" \
83    "$(INDEXERS_DIR)\mg\lib\libmglib.lib"
84!ELSE
85MG_DEFS =
86MG_LIBS =
87!ENDIF
88
89!IF $(ENABLE_MGPP)
90MGPP_DEFS = -DENABLE_MGPP
91MGPP_LIBS = "$(INDEXERS_DIR)\mgpp\text\libmgpptext.lib" \
92    "$(INDEXERS_DIR)\mgpp\lib\libmgpplib.lib"
93MGPP_INCLUDES = -I"$(INDEXERS_DIR)\mgpp\text"
94!ELSE
95MGPP_DEFS =
96MGPP_LIBS =
97MGPP_INCLUDES =
98!ENDIF
99
100!IF $(ENABLE_LUCENE)
101LUCENE_DEFS = -DENABLE_LUCENE
102!ELSE
103LUCENE_DEFS=
104!ENDIF
105
106AR = lib
107CC = cl
108DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE \
109    $(MG_DEFS) $(MGPP_DEFS) $(LUCENE_DEFS)
110# Do NOT add the "recpt" directory here: the z39.50 code should be independent of the receptionist!
111INCLUDES = -I"$(GSDL_DIR)" -I"$(COMMON_DIR)\src\lib" -I"$(COLSERVR_DIR)" -I"$(PROTOCOL_DIR)" \
112    $(MGPP_INCLUDES) -I"$(PACKAGES_DIR)\yaz\yaz-2.1.4\include" \
113    -I"$(PACKAGES_DIR)\yaz\yaz-2.1.4\client" -I"$(PACKAGES_DIR)\d2m" \
114    -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3" -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3\windows"
115LDFLAGS =
116LIBS = "$(COMMON_PACKAGES_DIR)\windows\expat\expat\libexpat.lib" "$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3\gdbm.lib" \
117        "$(PACKAGES_DIR)\d2m\libd2m.lib" "$(PACKAGES_DIR)\yaz\yaz-2.1.4\lib\yaz.lib" $(ACCENTFOLD_LIBS) \
118    $(SQLITE_LIBS)
119
120!IF $(GSDL_VC4)
121DEFS=$(DEFS) -DGSDL_NAMESPACE_BROKEN -DGSDL_USE_IOS_H -D__STL_NO_NEW_IOSTREAMS
122INCLUDES = $(INCLUDES) -I"$(COMMON_PACKAGES_DIR)\windows\stlport\stlport"
123!ENDIF
124
125
126COMPILE = $(CC) -nologo -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
127LINK = $(CC) -nologo -Fe"$@" $(LDFLAGS)
128
129
130.SUFFIXES:
131.SUFFIXES: .c .obj
132.c.obj:
133    $(COMPILE) $<
134
135.SUFFIXES: .cpp .obj
136.cpp.obj:
137    $(COMPILE) $<
138
139
140LIBRARY_SOURCES = \
141    yaz_zclient.c \
142    z3950proto.cpp \
143    z3950proxy.cpp \
144    zparse.tab.c \
145    zparse.yy.c
146
147LIBRARY_OBJECTS = \
148    yaz_zclient.obj \
149    z3950proto.obj \
150    z3950proxy.obj \
151    zparse.tab.obj \
152    zparse.yy.obj
153
154LIBRARY = gsdlz3950.lib
155
156
157SOURCES = \
158    z3950explain.cpp \
159    z3950parser.cpp \
160    z3950server.cpp \
161    z3950_to_gsdl.cpp
162
163OBJECTS = \
164    z3950explain.obj \
165    z3950parser.obj \
166    z3950server.obj \
167    z3950_to_gsdl.obj
168
169GSDL_LIBS = \
170    gsdlz3950.lib \
171    $(PROTOCOL_DIR)\gsdlprotocol.lib \
172    $(COLSERVR_DIR)\gsdlcolservr.lib \
173    $(MG_LIBS) \
174    $(MGPP_LIBS) \
175    $(COMMON_DIR)\src\lib\gsdllib.lib
176
177EXECUTABLE_OBJECTS = \
178    $(OBJECTS) \
179    $(GSDL_LIBS)
180
181EXECUTABLE = z3950server.exe
182
183
184# Default target: make both gsdlz3950.lib and z3950server.exe
185all: $(LIBRARY) $(EXECUTABLE)
186
187gsdlz3950.lib: $(LIBRARY_OBJECTS)
188    if EXIST $(LIBRARY) del $(LIBRARY)
189    $(AR) -nologo /out:$(LIBRARY) $(LIBRARY_OBJECTS) $(PACKAGES_DIR)/yaz/yaz-2.1.4/win/obj/tabcomplete.obj
190
191z3950server.exe: $(EXECUTABLE_OBJECTS)
192    $(LINK) $(EXECUTABLE_OBJECTS) $(LIBS)
193
194install: $(EXECUTABLE)
195    copy $(EXECUTABLE) "$(GSDL_DIR)\bin\windows"
196
197clean:
198    del *.obj
199    del $(LIBRARY)
200    del $(EXECUTABLE)
Note: See TracBrowser for help on using the browser.