source: main/trunk/greenstone2/runtime-src/src/z3950/Makefile.in@ 30920

Last change on this file since 30920 was 30920, checked in by ak19, 5 years ago

Dr Bainbridge got the z3950 server compiled up again against the recent changes from dynamically linked gnome-lib .so to static .a files: z3950 needed lz (libz/zlib). Another change was to teach it were mgpp's mglong.h lived by including the mgpp/lib in the list of includes.

File size: 4.9 KB
Line 
1###########################################################################
2#
3# Makefile -- runtime-src/src/z3950
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
31GSDLOS = @gsdlos@
32GSDLARCH = @gsdlarch@
33
34INDEXERS_DIR = $(COMMON_DIR)/indexers
35COMMON_PACKAGES_DIR = $(COMMON_DIR)/packages
36RUNTIME_PACKAGES_DIR = $(RUNTIME_DIR)/packages
37COLSERVR_DIR = $(RUNTIME_DIR)/src/colservr
38PROTOCOL_DIR = $(RUNTIME_DIR)/src/protocol
39
40
41ENABLE_ACCENTFOLD = @ENABLE_ACCENTFOLD@
42ifeq ($(ENABLE_ACCENTFOLD), 1)
43ifeq ($(GSDLOS),darwin)
44ACCENTFOLD_LIBS = $(INDEXERS_DIR)/packages/unac/libunac.a -liconv
45else
46ACCENTFOLD_LIBS = $(INDEXERS_DIR)/packages/unac/libunac.a $(COMMON_PACKAGES_DIR)/iconv/lib/libiconv.a
47endif
48else
49ACCENTFOLD_LIBS =
50endif
51
52
53ENABLE_MG = @ENABLE_MG@
54ifeq ($(ENABLE_MG), 1)
55MG_INDEXERS_LIBS = $(INDEXERS_DIR)/mg/src/text/libmgtext.a \
56 $(INDEXERS_DIR)/mg/lib/libmglib.a
57else
58MG_INDEXERS_LIBS =
59endif
60
61ENABLE_MGPP = @ENABLE_MGPP@
62ifeq ($(ENABLE_MGPP), 1)
63MGPP_INDEXERS_LIBS = $(INDEXERS_DIR)/mgpp/text/libmgpptext.a \
64 $(INDEXERS_DIR)/mgpp/lib/libmgpplib.a
65MGPP_INCLUDES = -I$(INDEXERS_DIR)/mgpp/text -I$(INDEXERS_DIR)/mgpp/lib
66else
67MGPP_INDEXERS_LIBS =
68MGPP_INCLUDES =
69endif
70
71USE_GDBM = @USE_GDBM@
72ifeq ($(USE_GDBM), 1)
73GDBM_LIBS = $(COMMON_PACKAGES_DIR)/gdbm/lib/libgdbm.a
74GDBM_DEFINES = -DUSE_GDBM
75else
76GDBM_LIBS =
77GDBM_DEFINES =
78endif
79
80USE_JDBM = @USE_JDBM@
81ifeq ($(USE_JDBM), 1)
82JDBM_DEFINES = -DUSE_JDBM
83else
84JDBM_DEFINES =
85endif
86
87USE_SQLITE = @USE_SQLITE@
88ifeq ($(USE_SQLITE), 1)
89SQLITE_LIBS = $(COMMON_PACKAGES_DIR)/sqlite/lib/libsqlite3.a -ldl -lpthread
90SQLITE_DEFINES = -DUSE_SQLITE
91else
92SQLITE_LIBS =
93SQLITE_DEFINES =
94endif
95
96USE_Z3950 = @USE_Z3950@
97ifeq ($(USE_Z3950), 1)
98AR = ar
99CC = @CC@
100CPP = @CXX@
101CFLAGS = @CFLAGS@
102CPPFLAGS = @CXXFLAGS@
103DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES)
104GSDLOS = @gsdlos@
105# Do NOT add the "recpt" directory here: the z39.50 code should be independent of the receptionist!
106INCLUDES = -I. -I$(GSDL_DIR) -I$(COMMON_DIR)/src/lib -I$(COLSERVR_DIR) -I$(PROTOCOL_DIR) \
107 $(MGPP_INCLUDES) -I$(RUNTIME_PACKAGES_DIR)/yaz/yaz-2.1.4/include \
108 -I$(RUNTIME_PACKAGES_DIR)/yaz/yaz-2.1.4/client -I$(RUNTIME_PACKAGES_DIR)/d2m
109INSTALL = @INSTALL@
110LDFLAGS = @LDFLAGS@
111LIBS = @LIBS@ $(GDBM_LIBS) -L$(COMMON_PACKAGES_DIR)/expat/lib -lexpat \
112 $(ACCENTFOLD_LIBS) $(SQLITE_LIBS) \
113 $(RUNTIME_PACKAGES_DIR)/yaz/lib/libyaz.a $(RUNTIME_PACKAGES_DIR)/d2m/libd2m.a -lxml2 -lz
114RANLIB = @RANLIB@
115
116
117COMPILE = $(CC) -c $(CFLAGS) $(DEFS) $(INCLUDES)
118CPPCOMPILE = $(CPP) -c $(CPPFLAGS) $(DEFS) $(INCLUDES)
119CPPLINK = $(CPP) $(LDFLAGS) -o $@
120
121
122.SUFFIXES:
123.SUFFIXES: .c .o
124.c.o:
125 $(COMPILE) $<
126
127.SUFFIXES: .cpp .o
128.cpp.o:
129 $(CPPCOMPILE) $<
130
131
132LIBRARY_SOURCES = \
133 yaz_zclient.c \
134 z3950proto.cpp \
135 z3950proxy.cpp \
136 zparse.tab.c \
137 zparse.yy.c
138
139LIBRARY_OBJECTS = \
140 yaz_zclient.o \
141 z3950proto.o \
142 z3950proxy.o \
143 zparse.tab.o \
144 zparse.yy.o
145
146LIBRARY = gsdlz3950.a
147
148SOURCES = \
149 z3950explain.cpp \
150 z3950parser.cpp \
151 z3950server.cpp \
152 z3950_to_gsdl.cpp
153
154OBJECTS = \
155 z3950explain.o \
156 z3950parser.o \
157 z3950server.o \
158 z3950_to_gsdl.o
159
160GSDL_LIBS = \
161 gsdlz3950.a \
162 $(PROTOCOL_DIR)/gsdlprotocol.a \
163 $(COLSERVR_DIR)/gsdlcolservr.a \
164 $(MG_INDEXERS_LIBS) \
165 $(MGPP_INDEXERS_LIBS) \
166 $(COMMON_DIR)/src/lib/gsdllib.a
167
168EXECUTABLE_OBJECTS = \
169 $(OBJECTS) \
170 $(GSDL_LIBS)
171
172EXECUTABLE = z3950server
173
174
175# Default target: make both gsdlz3950.a and the z3950server executable
176all: $(LIBRARY) $(EXECUTABLE)
177
178gsdlz3950.a: $(LIBRARY_OBJECTS)
179 rm -f $(LIBRARY)
180 $(AR) cru $(LIBRARY) $(LIBRARY_OBJECTS) $(RUNTIME_PACKAGES_DIR)/yaz/yaz-2.1.4/client/tabcomplete.o
181 $(RANLIB) $(LIBRARY)
182
183z3950server: $(EXECUTABLE_OBJECTS)
184 $(CPPLINK) $(EXECUTABLE_OBJECTS) $(LIBS)
185
186install: $(EXECUTABLE)
187 $(INSTALL) -m 755 -s $(EXECUTABLE) $(GSDL_DIR)/bin/$(GSDLOS)
188
189clean:
190 rm -f $(OBJECTS) $(LIBRARY) $(EXECUTABLE)
191
192depend:
193 makedepend -Y -- $(DEFS) $(INCLUDES) $(CPPFLAGS) -- $(SOURCES)
194
195else
196all:
197install:
198clean:
199depend:
200endif
201
202distclean: clean
203 rm -f Makefile
204
Note: See TracBrowser for help on using the repository browser.