root/gsdl/trunk/src/z3950/Makefile.in @ 15501

Revision 15501, 3.7 KB (checked in by mdewsnip, 12 years ago)

Added missing "INSTALL" definition.

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)
61INSTALL = @INSTALL@
62LDFLAGS = @LDFLAGS@
63LIBS = @LIBS@ @GDBM_LIBPATH@ -lgdbm -L$(GSDL_DIR)/packages/expat/lib -lexpat $(ACCENTFOLD_LIBS) $(Z3950_LIBS)
64RANLIB = @RANLIB@
65
66
67COMPILE = $(CC) -c $(CFLAGS) $(DEFS) $(INCLUDES)
68CPPCOMPILE = $(CPP) -c $(CPPFLAGS) $(DEFS) $(INCLUDES)
69CPPLINK = $(CPP) $(LDFLAGS) -o $@
70
71
72.SUFFIXES:
73.SUFFIXES: .c .o
74.c.o:
75    $(COMPILE) $<
76
77.SUFFIXES: .cpp .o
78.cpp.o:
79    $(CPPCOMPILE) $<
80
81
82LIBRARY_SOURCES = \
83    yaz_zclient.c \
84    z3950proto.cpp \
85    z3950proxy.cpp \
86    zparse.tab.c \
87    zparse.yy.c
88
89LIBRARY_OBJECTS = \
90    yaz_zclient.o \
91    z3950proto.o \
92    z3950proxy.o \
93    zparse.tab.o \
94    zparse.yy.o
95
96LIBRARY = gsdlz3950.a
97
98gsdlz3950.a: $(LIBRARY_OBJECTS)
99    rm -f gsdlz3950.a
100    $(AR) cru gsdlz3950.a $(LIBRARY_OBJECTS) $(GSDL_DIR)/packages/yaz/yaz-2.1.4/client/tabcomplete.o
101    $(RANLIB) gsdlz3950.a
102
103
104SOURCES = \
105    z3950explain.cpp \
106    z3950parser.cpp \
107    z3950server.cpp \
108    z3950_to_gsdl.cpp
109
110OBJECTS = \
111    z3950explain.o \
112    z3950parser.o \
113    z3950server.o \
114    z3950_to_gsdl.o
115
116GSDL_LIBS = \
117    gsdlz3950.a \
118    $(PROTOCOL_DIR)/gsdlprotocol.a \
119    $(COLSERVR_DIR)/gsdlcolservr.a \
120    $(INDEXERS_DIR)/mg/src/text/libmgtext.a \
121    $(INDEXERS_DIR)/mg/lib/libmglib.a \
122    $(INDEXERS_DIR)/mgpp/text/libmgpptext.a \
123    $(INDEXERS_DIR)/mgpp/lib/libmgpplib.a \
124    $(GSDL_DIR)/lib/gsdllib.a
125
126EXECUTABLE_OBJECTS = \
127    $(OBJECTS) \
128    $(GSDL_LIBS)
129
130EXECUTABLE = z3950server
131
132
133z3950server: $(OBJECTS)
134    $(CPPLINK) $(EXECUTABLE_OBJECTS) $(LIBS)
135
136all: $(LIBRARY) $(EXECUTABLE)
137
138install: $(LIBRARY) $(EXECUTABLE)
139    $(INSTALL) -m 755 -s $(EXECUTABLE) $(GSDL_DIR)/bin/$(GSDLOS)
140
141clean:
142    rm -f $(OBJECTS)
143
144distclean:
145    rm -f $(OBJECTS) Makefile
146
147depend:
148    makedepend -Y -- $(DEFS) $(INCLUDES) $(CPPFLAGS) -- $(SOURCES)
Note: See TracBrowser for help on using the browser.