[15450] | 1 | ###########################################################################
|
---|
| 2 | #
|
---|
[18224] | 3 | # Makefile -- runtime-src/src/protocol
|
---|
[15450] | 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 |
|
---|
[16563] | 27 | GSDL_DIR = ../../..
|
---|
[16572] | 28 | COMMON_DIR = $(GSDL_DIR)/common-src
|
---|
[18224] | 29 | RUNTIME_DIR = $(GSDL_DIR)/runtime-src
|
---|
[15450] | 30 |
|
---|
[16563] | 31 | INDEXERS_DIR = $(COMMON_DIR)/indexers
|
---|
[18224] | 32 | COMMON_PACKAGES_DIR = $(COMMON_DIR)/packages
|
---|
| 33 | COLSERVR_DIR = $(RUNTIME_DIR)/src/colservr
|
---|
[15475] | 34 |
|
---|
[21324] | 35 | ENABLE_MGPP = @ENABLE_MGPP@
|
---|
| 36 | ifeq ($(ENABLE_MGPP), 1)
|
---|
[25149] | 37 | MGPP_INCLUDES = -I$(INDEXERS_DIR)/mgpp/text -I$(INDEXERS_DIR)/mgpp/lib
|
---|
[21324] | 38 | else
|
---|
| 39 | MGPP_INCLUDES =
|
---|
| 40 | endif
|
---|
[16563] | 41 |
|
---|
[22058] | 42 | USE_GDBM = @USE_GDBM@
|
---|
| 43 | ifeq ($(USE_GDBM), 1)
|
---|
| 44 | GDBM_DEFINES = -DUSE_GDBM
|
---|
[22078] | 45 | GDBM_INCLUDES = -I$(COMMON_PACKAGES_DIR)/gdbm/include
|
---|
[22058] | 46 | else
|
---|
| 47 | GDBM_DEFINES =
|
---|
[22078] | 48 | GDBM_INCLUDES =
|
---|
[22058] | 49 | endif
|
---|
| 50 |
|
---|
| 51 | USE_JDBM = @USE_JDBM@
|
---|
| 52 | ifeq ($(USE_JDBM), 1)
|
---|
| 53 | JDBM_DEFINES = -DUSE_JDBM
|
---|
| 54 | else
|
---|
| 55 | JDBM_DEFINES =
|
---|
| 56 | endif
|
---|
| 57 |
|
---|
| 58 | USE_SQLITE = @USE_SQLITE@
|
---|
| 59 | ifeq ($(USE_SQLITE), 1)
|
---|
| 60 | SQLITE_DEFINES = -DUSE_SQLITE
|
---|
| 61 | else
|
---|
| 62 | SQLITE_DEFINES =
|
---|
| 63 | endif
|
---|
| 64 |
|
---|
| 65 |
|
---|
[15479] | 66 | AR = ar
|
---|
[15556] | 67 | CXX = @CXX@
|
---|
[25149] | 68 | CXXFLAGS = @CXXFLAGS@ @ARCH_DEP_FLAGS@
|
---|
[22058] | 69 | DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES)
|
---|
[15450] | 70 | # Do NOT add the "recpt" directory here: the protocol should be independent of the receptionist!
|
---|
[22078] | 71 | INCLUDES = -I. -I$(GSDL_DIR) -I$(COMMON_DIR)/src/lib $(GDBM_INCLUDES) \
|
---|
[21324] | 72 | -I$(COLSERVR_DIR) $(MGPP_INCLUDES)
|
---|
[15479] | 73 | RANLIB = @RANLIB@
|
---|
[15450] | 74 |
|
---|
| 75 |
|
---|
[15556] | 76 | CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
|
---|
[15450] | 77 |
|
---|
[15470] | 78 |
|
---|
[15450] | 79 | .SUFFIXES:
|
---|
| 80 | .SUFFIXES: .cpp .o
|
---|
| 81 | .cpp.o:
|
---|
[15556] | 82 | $(CXXCOMPILE) $<
|
---|
[15450] | 83 |
|
---|
| 84 |
|
---|
[15470] | 85 | SOURCES = \
|
---|
| 86 | nullproto.cpp \
|
---|
[15572] | 87 | recptproto.cpp \
|
---|
| 88 | recptprototools.cpp
|
---|
[15450] | 89 |
|
---|
[15470] | 90 | OBJECTS = \
|
---|
| 91 | nullproto.o \
|
---|
[15572] | 92 | recptproto.o \
|
---|
| 93 | recptprototools.o
|
---|
[15450] | 94 |
|
---|
[15479] | 95 | LIBRARY = gsdlprotocol.a
|
---|
[15450] | 96 |
|
---|
| 97 |
|
---|
[15579] | 98 | # Default target: make gsdlprotocol.a
|
---|
| 99 | all: $(LIBRARY)
|
---|
| 100 |
|
---|
[15479] | 101 | gsdlprotocol.a: $(OBJECTS)
|
---|
[15579] | 102 | rm -f $(LIBRARY)
|
---|
| 103 | $(AR) cru $(LIBRARY) $(OBJECTS)
|
---|
| 104 | $(RANLIB) $(LIBRARY)
|
---|
[15470] | 105 |
|
---|
[15580] | 106 | install:
|
---|
[15479] | 107 |
|
---|
[15450] | 108 | clean:
|
---|
[15579] | 109 | rm -f $(OBJECTS) $(LIBRARY)
|
---|
[15450] | 110 |
|
---|
[15470] | 111 | distclean:
|
---|
[15579] | 112 | rm -f $(OBJECTS) $(LIBRARY) Makefile
|
---|
[15450] | 113 |
|
---|
| 114 | depend:
|
---|
[15556] | 115 | makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
|
---|