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

Revision 15546, 3.6 KB (checked in by mdewsnip, 12 years ago)

Added a new "PACKAGE_DIRS" path value in the Makefiles to make paths a bit shorter.

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