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

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

Moving "lib" directory into "src", to keep all the source code together. Not tested yet.

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