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

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

The "src/z3950" directory now contains all the z3950server files, and an updated Makefile to compile them.

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