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