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