root/main/trunk/greenstone2/runtime-src/src/protocol/win32.mak @ 22078

Revision 22078, 3.4 KB (checked in by ak19, 10 years ago)

1. Missing conditional LIBS or INCLUDES or DIR declaration for when USE_GDBM is switched on. Previously it used to always put these in the includes/libs, not it only does so on USE_GDBM.

  • Property svn:executable set to *
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)\windows\gdbm\gdbm
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 browser.