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

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

Windows makefiles to work with USE_GDBM and USE_JDBM: 1. Added winMake.bat to both gs-jdbm-1.0.tar.gz and common-src's jdbmedit so that jdbm java files can now get compiled up. 2. These new winMake bat files are then called from the updated windows makefiles in common-src and common-src's src-lib folder. 3. Changed win32.mak files to work with USE_GDBM and USE_JDBM: these set their USE_DBDEFINES flag when on to prevent memory errors due to makefiles' inconsistent setting of USE_DEFINES between folders. Also certain gdbm related lib, includes and dir statements are moved out of the general part of the windows makefiles into the USE_GDBM section of the makefiles.

  • Property svn:executable set to *
File size: 3.4 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
40USE_GDBM = 1
41USE_JDBM = 1
42USE_SQLITE = 1
43USE_MSSQL = 0
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 $(USE_GDBM)
69GDBM_DEFINES = -DUSE_GDBM
70GDBM_INCLUDES = -I"$(COMMON_PACKAGES_DIR)\packages\gdbm\gdbm-1.8.3\windows"
71!ELSE
72GDBM_DEFINES =
73GDBM_INCLUDES =
74!ENDIF
75
76!IF $(USE_JDBM)
77JDBM_DEFINES = -DUSE_JDBM
78!ELSE
79JDBM_DEFINES =
80!ENDIF
81
82!IF $(USE_SQLITE)
83SQLITE_DEFINES = -DUSE_SQLITE
84!ELSE
85SQLITE_DEFINES =
86!ENDIF
87
88!IF $(USE_MSSQL)
89MSSQL_DEFINES = -DUSE_MSSQL
90!ELSE
91MSSQL_DEFINES =
92!ENDIF
93
94!IF $(ENABLE_MG)
95MG_DEFS = -DENABLE_MG
96!ELSE
97MG_DEFS=
98!ENDIF
99
100!IF $(ENABLE_MGPP)
101MGPP_DEFS = -DENABLE_MGPP
102MGPP_INCLUDES = -I"$(INDEXERS_DIR)\mgpp\text"
103!ELSE
104MGPP_DEFS =
105MGPP_INCLUDES =
106!ENDIF
107
108!IF $(ENABLE_LUCENE)
109LUCENE_DEFS = -DENABLE_LUCENE
110!ELSE
111LUCENE_DEFS=
112!ENDIF
113
114AR = lib
115CC = cl
116DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE \
117 $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES) $(MSSQL_DEFINES) \
118 $(MG_DEFS) $(MGPP_DEFS) $(LUCENE_DEFS)
119# Do NOT add the "recpt" directory here: the protocol should be independent of the receptionist!
120INCLUDES = -I"$(GSDL_DIR)" -I"$(COMMON_DIR)\src\lib" -I"$(COLSERVR_DIR)" $(MGPP_INCLUDES) \
121 $(GDBM_INCLUDES)
122
123!IF $(GSDL_VC4)
124DEFS=$(DEFS) -DGSDL_NAMESPACE_BROKEN -DGSDL_USE_IOS_H -D__STL_NO_NEW_IOSTREAMS
125INCLUDES = $(INCLUDES) -I"$(COMMON_PACKAGES_DIR)\windows\stlport\stlport"
126!ENDIF
127
128
129COMPILE = $(CC) -nologo -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
130
131
132.SUFFIXES:
133.SUFFIXES: .cpp .obj
134.cpp.obj:
135 $(COMPILE) $<
136
137
138SOURCES = \
139 nullproto.cpp \
140 recptproto.cpp \
141 recptprototools.cpp
142
143OBJECTS = \
144 nullproto.obj \
145 recptproto.obj \
146 recptprototools.obj
147
148LIBRARY = gsdlprotocol.lib
149
150
151# Default target: make gsdlprotocol.lib
152all: $(LIBRARY)
153
154gsdlprotocol.lib: $(OBJECTS)
155 if EXIST $(LIBRARY) del $(LIBRARY)
156 $(AR) -nologo /out:$(LIBRARY) $(OBJECTS)
157
158install:
159
160clean:
161 del *.obj
162 del $(LIBRARY)
Note: See TracBrowser for help on using the repository browser.