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 *
RevLine 
[15520]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
[16574]27GSDL_DIR = ..\..\..
28COMMON_DIR = $(GSDL_DIR)\common-src
29RUNTIME_DIR = $(GSDL_DIR)\runtime-src
[15520]30
[16574]31INDEXERS_DIR = $(COMMON_DIR)\indexers
[18048]32COMMON_PACKAGES_DIR = $(COMMON_DIR)\packages
[16574]33COLSERVR_DIR = $(RUNTIME_DIR)\src\colservr
[15520]34
[16574]35
[15520]36GSDL_VC4 = 0
[19521]37DEBUG = 0
[15520]38DLL = 0
39DLLDEBUG = 0
[22078]40USE_GDBM = 1
41USE_JDBM = 1
42USE_SQLITE = 1
43USE_MSSQL = 0
[21945]44ENABLE_MG = 1
[21324]45ENABLE_MGPP = 1
[21945]46ENABLE_LUCENE = 1
[15520]47
[19521]48!IF $(DEBUG)
49CXXFLAGS = -DEBUG -Z7 /errorReport:prompt
50!ELSE
51CXXFLAGS =
52!ENDIF
[15520]53
54!IF $(GSDL_VC4)
[19521]55CXXFLAGS = $(CXXFLAGS) -GX
[15520]56!ELSE
[19521]57CXXFLAGS = $(CXXFLAGS) -EHsc
[15520]58!ENDIF
59
60!IF $(DLL)
[19521]61CXXFLAGS = $(CXXFLAGS) -MD
[15520]62!ELSE
63!IF ($(DLLDEBUG))
[19521]64CXXFLAGS = $(CXXFLAGS) -MDd
[15520]65!ENDIF
66!ENDIF
67
[22078]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
[21945]94!IF $(ENABLE_MG)
95MG_DEFS = -DENABLE_MG
96!ELSE
97MG_DEFS=
98!ENDIF
99
[21435]100!IF $(ENABLE_MGPP)
[21945]101MGPP_DEFS = -DENABLE_MGPP
[21435]102MGPP_INCLUDES = -I"$(INDEXERS_DIR)\mgpp\text"
103!ELSE
[21945]104MGPP_DEFS =
[21324]105MGPP_INCLUDES =
106!ENDIF
[15520]107
[21945]108!IF $(ENABLE_LUCENE)
109LUCENE_DEFS = -DENABLE_LUCENE
110!ELSE
111LUCENE_DEFS=
112!ENDIF
113
[15520]114AR = lib
115CC = cl
[21945]116DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE \
[22078]117    $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES) $(MSSQL_DEFINES) \
[21945]118    $(MG_DEFS) $(MGPP_DEFS) $(LUCENE_DEFS)
[15520]119# Do NOT add the "recpt" directory here: the protocol should be independent of the receptionist!
[21324]120INCLUDES = -I"$(GSDL_DIR)" -I"$(COMMON_DIR)\src\lib" -I"$(COLSERVR_DIR)" $(MGPP_INCLUDES) \
[22078]121     $(GDBM_INCLUDES)
[15520]122
123!IF $(GSDL_VC4)
124DEFS=$(DEFS) -DGSDL_NAMESPACE_BROKEN -DGSDL_USE_IOS_H -D__STL_NO_NEW_IOSTREAMS
[18048]125INCLUDES = $(INCLUDES) -I"$(COMMON_PACKAGES_DIR)\windows\stlport\stlport"
[15520]126!ENDIF
127
128
[19521]129COMPILE = $(CC) -nologo -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
[15520]130
131
132.SUFFIXES:
133.SUFFIXES: .cpp .obj
134.cpp.obj:
135    $(COMPILE) $<
136
137
138SOURCES = \
139    nullproto.cpp \
[15572]140    recptproto.cpp \
141    recptprototools.cpp
[15520]142
143OBJECTS = \
144    nullproto.obj \
[15572]145    recptproto.obj \
146    recptprototools.obj
[15525]147
148LIBRARY = gsdlprotocol.lib 
[15520]149   
150
[15580]151# Default target: make gsdlprotocol.lib
152all: $(LIBRARY)
153
[15520]154gsdlprotocol.lib: $(OBJECTS)
[15580]155    if EXIST $(LIBRARY) del $(LIBRARY)
156    $(AR) -nologo /out:$(LIBRARY) $(OBJECTS)
[15520]157
[15580]158install:
[15525]159
[15520]160clean:
161    del *.obj
[15580]162    del $(LIBRARY)
Note: See TracBrowser for help on using the browser.