source: gsdl/trunk/src/z3950/Makefile.in@ 15503

Last change on this file since 15503 was 15503, checked in by mdewsnip, 16 years ago

Some fixes to avoid errors when the Z39.50 stuff ISN'T enabled.

File size: 3.6 KB
RevLine 
[15492]1###########################################################################
2#
3# Makefile -- 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 = ../..
28INDEXERS_DIR = $(GSDL_DIR)/indexers
29COLSERVR_DIR = $(GSDL_DIR)/src/colservr
30PROTOCOL_DIR = $(GSDL_DIR)/src/protocol
31
32
[15498]33ENABLE_ACCENTFOLD = @ENABLE_ACCENTFOLD@
34ifeq ($(ENABLE_ACCENTFOLD), 1)
35ACCENTFOLD_LIBS = $(INDEXERS_DIR)/packages/unac/libunac.a
36else
37ACCENTFOLD_LIBS =
38endif
39
[15495]40USE_Z3950 = @USE_Z3950@
41ifeq ($(USE_Z3950), 1)
[15492]42AR = ar
[15495]43CC = @CC@
[15492]44CPP = @CXX@
[15495]45CFLAGS = @CFLAGS@
[15492]46CPPFLAGS = @CXXFLAGS@
47DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER
[15498]48GSDLOS = @GSDLOS@
[15492]49# Do NOT add the "recpt" directory here: the z39.50 code should be independent of the receptionist!
[15495]50INCLUDES = -I. -I$(GSDL_DIR) -I$(GSDL_DIR)/lib -I$(COLSERVR_DIR) -I$(PROTOCOL_DIR) \
[15503]51 -I$(INDEXERS_DIR)/mgpp/text -I$(GSDL_DIR)/packages/yaz/yaz-2.1.4/include \
52 -I$(GSDL_DIR)/packages/yaz/yaz-2.1.4/client -I$(GSDL_DIR)/packages/d2m
[15501]53INSTALL = @INSTALL@
[15498]54LDFLAGS = @LDFLAGS@
[15503]55LIBS = @LIBS@ @GDBM_LIBPATH@ -lgdbm -L$(GSDL_DIR)/packages/expat/lib -lexpat $(ACCENTFOLD_LIBS) \
56 $(GSDL_DIR)/packages/yaz/lib/libyaz.a $(GSDL_DIR)/packages/d2m/libd2m.a -lxml2
[15492]57RANLIB = @RANLIB@
58
59
[15495]60COMPILE = $(CC) -c $(CFLAGS) $(DEFS) $(INCLUDES)
[15492]61CPPCOMPILE = $(CPP) -c $(CPPFLAGS) $(DEFS) $(INCLUDES)
[15498]62CPPLINK = $(CPP) $(LDFLAGS) -o $@
[15492]63
64
65.SUFFIXES:
[15495]66.SUFFIXES: .c .o
67.c.o:
68 $(COMPILE) $<
69
[15492]70.SUFFIXES: .cpp .o
71.cpp.o:
72 $(CPPCOMPILE) $<
73
74
[15498]75LIBRARY_SOURCES = \
[15495]76 yaz_zclient.c \
[15492]77 z3950proto.cpp \
[15495]78 z3950proxy.cpp \
79 zparse.tab.c \
80 zparse.yy.c
[15492]81
[15498]82LIBRARY_OBJECTS = \
[15495]83 yaz_zclient.o \
[15492]84 z3950proto.o \
[15495]85 z3950proxy.o \
86 zparse.tab.o \
87 zparse.yy.o
[15492]88
89LIBRARY = gsdlz3950.a
90
[15498]91gsdlz3950.a: $(LIBRARY_OBJECTS)
[15492]92 rm -f gsdlz3950.a
[15498]93 $(AR) cru gsdlz3950.a $(LIBRARY_OBJECTS) $(GSDL_DIR)/packages/yaz/yaz-2.1.4/client/tabcomplete.o
[15492]94 $(RANLIB) gsdlz3950.a
95
96
[15498]97SOURCES = \
98 z3950explain.cpp \
99 z3950parser.cpp \
100 z3950server.cpp \
101 z3950_to_gsdl.cpp
[15492]102
[15498]103OBJECTS = \
104 z3950explain.o \
105 z3950parser.o \
106 z3950server.o \
107 z3950_to_gsdl.o
108
109GSDL_LIBS = \
110 gsdlz3950.a \
111 $(PROTOCOL_DIR)/gsdlprotocol.a \
112 $(COLSERVR_DIR)/gsdlcolservr.a \
113 $(INDEXERS_DIR)/mg/src/text/libmgtext.a \
114 $(INDEXERS_DIR)/mg/lib/libmglib.a \
115 $(INDEXERS_DIR)/mgpp/text/libmgpptext.a \
116 $(INDEXERS_DIR)/mgpp/lib/libmgpplib.a \
117 $(GSDL_DIR)/lib/gsdllib.a
118
119EXECUTABLE_OBJECTS = \
120 $(OBJECTS) \
121 $(GSDL_LIBS)
122
123EXECUTABLE = z3950server
124
125
126z3950server: $(OBJECTS)
127 $(CPPLINK) $(EXECUTABLE_OBJECTS) $(LIBS)
128
129all: $(LIBRARY) $(EXECUTABLE)
130
131install: $(LIBRARY) $(EXECUTABLE)
132 $(INSTALL) -m 755 -s $(EXECUTABLE) $(GSDL_DIR)/bin/$(GSDLOS)
133
[15492]134clean:
135 rm -f $(OBJECTS)
136
137distclean:
138 rm -f $(OBJECTS) Makefile
139
140depend:
141 makedepend -Y -- $(DEFS) $(INCLUDES) $(CPPFLAGS) -- $(SOURCES)
[15503]142
143else
144all:
145endif
Note: See TracBrowser for help on using the repository browser.