source: main/trunk/greenstone2/runtime-src/src/protocol/win32.mak@ 21945

Last change on this file since 21945 was 21945, checked in by ak19, 14 years ago

Fixed up win32.mak files in runtime-src that set DEFS for ANY of the indexers that can be ENABLEd/DISABLEd, such that DEFS for ALL the indexers are now set. Not doing so was causing memory overwrite problems (and consequently crashing) since different windows makefiles specified different indexers as specifically defined (leaving others unmentioned) whereas other makefiles would particularly pass on DEFS flags for all indexers. This made classes which were compiled which such makefiles and which contained references to these indexer objects a different size.

  • Property svn:executable set to *
File size: 3.0 KB
Line 
1###########################################################################
2#
3# win32 makefile -- src/protocol
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
33COLSERVR_DIR = $(RUNTIME_DIR)\src\colservr
34
35
36GSDL_VC4 = 0
37DEBUG = 0
38DLL = 0
39DLLDEBUG = 0
40ENABLE_MG = 1
41ENABLE_MGPP = 1
42ENABLE_LUCENE = 1
43
44!IF $(DEBUG)
45CXXFLAGS = -DEBUG -Z7 /errorReport:prompt
46!ELSE
47CXXFLAGS =
48!ENDIF
49
50!IF $(GSDL_VC4)
51CXXFLAGS = $(CXXFLAGS) -GX
52!ELSE
53CXXFLAGS = $(CXXFLAGS) -EHsc
54!ENDIF
55
56!IF $(DLL)
57CXXFLAGS = $(CXXFLAGS) -MD
58!ELSE
59!IF ($(DLLDEBUG))
60CXXFLAGS = $(CXXFLAGS) -MDd
61!ENDIF
62!ENDIF
63
64!IF $(ENABLE_MG)
65MG_DEFS = -DENABLE_MG
66!ELSE
67MG_DEFS=
68!ENDIF
69
70!IF $(ENABLE_MGPP)
71MGPP_DEFS = -DENABLE_MGPP
72MGPP_INCLUDES = -I"$(INDEXERS_DIR)\mgpp\text"
73!ELSE
74MGPP_DEFS =
75MGPP_INCLUDES =
76!ENDIF
77
78!IF $(ENABLE_LUCENE)
79LUCENE_DEFS = -DENABLE_LUCENE
80!ELSE
81LUCENE_DEFS=
82!ENDIF
83
84AR = lib
85CC = cl
86DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE \
87 $(MG_DEFS) $(MGPP_DEFS) $(LUCENE_DEFS)
88# Do NOT add the "recpt" directory here: the protocol should be independent of the receptionist!
89INCLUDES = -I"$(GSDL_DIR)" -I"$(COMMON_DIR)\src\lib" -I"$(COLSERVR_DIR)" $(MGPP_INCLUDES) \
90 -I"$(COMMON_PACKAGES_DIR)\windows\gdbm\gdbm"
91
92!IF $(GSDL_VC4)
93DEFS=$(DEFS) -DGSDL_NAMESPACE_BROKEN -DGSDL_USE_IOS_H -D__STL_NO_NEW_IOSTREAMS
94INCLUDES = $(INCLUDES) -I"$(COMMON_PACKAGES_DIR)\windows\stlport\stlport"
95!ENDIF
96
97
98COMPILE = $(CC) -nologo -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
99
100
101.SUFFIXES:
102.SUFFIXES: .cpp .obj
103.cpp.obj:
104 $(COMPILE) $<
105
106
107SOURCES = \
108 nullproto.cpp \
109 recptproto.cpp \
110 recptprototools.cpp
111
112OBJECTS = \
113 nullproto.obj \
114 recptproto.obj \
115 recptprototools.obj
116
117LIBRARY = gsdlprotocol.lib
118
119
120# Default target: make gsdlprotocol.lib
121all: $(LIBRARY)
122
123gsdlprotocol.lib: $(OBJECTS)
124 if EXIST $(LIBRARY) del $(LIBRARY)
125 $(AR) -nologo /out:$(LIBRARY) $(OBJECTS)
126
127install:
128
129clean:
130 del *.obj
131 del $(LIBRARY)
Note: See TracBrowser for help on using the repository browser.