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

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

(Adding new DB support) Now includes sqlite library if enabled.

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