source: trunk/gsdl/src/colservr/Makefile.in@ 10176

Last change on this file since 10176 was 10176, checked in by kjdon, 19 years ago

added the packages/d2m dir into includes for z3950

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 5.3 KB
Line 
1###########################################################################
2#
3# Makefile -- src/colservr
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 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
27
28AR = ar
29CC = @CC@
30CXX = @CXX@
31CFLAGS = @CFLAGS@
32CXXFLAGS = @CXXFLAGS@
33MCFLAGS = @CFLAGS@ -Wall -Wunused
34DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER @DEFS@
35
36USE_FASTCGI = @USE_FASTCGI@
37USE_MGPP = @USE_MGPP@
38ifneq ($(USE_FASTCGI), 1)
39DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM @DEFS@
40
41CGI_INCLUDES =
42else
43DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DUSE_FASTCGI @DEFS@
44
45CGI_INCLUDES = -I../../packages/fcgi/include
46endif
47
48ifneq ($(USE_MGPP), 1)
49MG_INCLUDES = -I../../packages/mg -I../../packages/mg/lib \
50 -I../../packages/mg/src/text
51MG_HEADERS = mgq.h mgsearch.h mgqueryfilter.h
52
53MG_SOURCES = mgq.c mgsearch.cpp mgqueryfilter.cpp
54
55MG_OBJECTS = mgq.o mgsearch.o mgqueryfilter.o
56MGPP_OBJECTS = mgppsearch.o mgppqueryfilter.o
57
58else
59MG_INCLUDES = -I../mgpp/text -I../mgpp/lib
60
61MG_HEADERS = mgppsearch.h mgppqueryfilter.h
62
63MG_SOURCES = mgppsearch.cpp mgppqueryfilter.cpp
64
65MG_OBJECTS = mgppsearch.o mgppqueryfilter.o
66
67endif
68
69LC_INCLUDES = -I../../packages/expat/include
70LC_HEADERS = lucenesearch.h lucenequeryfilter.h lucenegdbmsource.h \
71 expat_resultset.h expat_document.h
72
73LC_SOURCES = lucenesearch.cpp lucenequeryfilter.cpp lucenegdbmsource.cpp \
74 expat_resultset.cpp expat_document.cpp
75
76LC_OBJECTS = lucenesearch.o lucenequeryfilter.o lucenegdbmsource.o \
77 expat_resultset.o expat_document.o
78
79INCLUDES = -I. -I../.. -I../../lib -I../recpt \
80 $(CGI_INCLUDES) $(MG_INCLUDES) $(LC_INCLUDES) @GDBM_INCLUDE@
81MICO_DIR = @MICO_DIR@
82ifeq ($(MICO_DIR), default)
83MICO_INC = -I../../packages/mico/include
84MICO_PATH = ../../bin/linux/
85else
86ifeq ($(MICO_DIR), yes)
87MICO_INC =
88MICO_PATH =
89else
90MICO_INC = -I$(MICO_DIR)
91MICO_PATH =
92endif
93endif
94MINCLUDES = -I. -I../../lib -I../recpt -I../mgpp/text $(MICO_INC)
95
96USE_CORBA = @USE_CORBA@
97USE_Z3950 = @USE_Z3950@
98
99RANLIB = @RANLIB@
100LDFLAGS = @LDFLAGS@
101LIBS = @LIBS@
102
103GSDLOS = @gsdlos@
104
105
106COMPILE = $(CC) -c $(CFLAGS) $(DEFS) $(INCLUDES)
107LINK = $(CXX) $(LDFLAGS) -o $@
108
109CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
110CXXLINK = $(CXX) $(LDFLAGS) -o $@
111
112MCOMPILE = $(MICO_PATH)mico-c++ -x c++ $(MCFLAGS) $(DEFS) $(MINCLUDES) -c
113MLINK = $(MICO_PATH)mico-ld $(LDFLAGS) -lmico2.2.7 -o $@
114
115.SUFFIXES:
116.SUFFIXES: .c .o
117.c.o:
118 $(COMPILE) $<
119
120.SUFFIXES: .cpp .o
121.cpp.o:
122 $(CXXCOMPILE) $<
123
124.SUFFIXES: .mpp .o
125.mpp.o:
126 $(MCOMPILE) $<
127
128ifneq ($(USE_CORBA), 0)
129CORBAHEADERS = \
130 corbaServer.h
131CORBASOURCES = \
132 corbaServer.mpp
133CORBAOBJECTS = \
134 corbaServer.o ../../lib/corbaiface_skel.o
135else
136CORBAHEADERS =
137CORBASOURCES =
138CORBAOBJECTS =
139endif
140
141ifeq ($(USE_Z3950), 1)
142INCLUDES += -I../../packages/yaz/include -I../../packages/d2m
143Z3950HEADERS =
144Z3950SOURCES = z3950parser.cpp z3950explain.cpp z3950_to_gsdl.cpp \
145 z3950server.cpp read-grs.cpp
146Z3950OBJECTS = z3950parser.o z3950explain.o z3950_to_gsdl.o \
147 z3950server.o read-grs.o
148else
149Z3950HEADERS =
150Z3950SOURCES =
151Z3950OBJECTS =
152endif
153
154# following objects need both mg and mgpp stuff - jrm21
155MG_MGPP_OBJECTS=collectset.o
156
157HEADERS = search.h querycache.h queryinfo.h collectserver.h collectset.h \
158 colservrconfig.h maptools.h filter.h source.h browsefilter.h \
159 queryfilter.h mggdbmsource.h gdbmsource.h \
160 phrasesearch.h phrasequeryfilter.h \
161 $(MG_HEADERS) $(LC_HEADERS) $(CORBAHEADERS)
162
163SOURCES = search.cpp querycache.cpp queryinfo.cpp collectserver.cpp \
164 colservrconfig.cpp maptools.cpp filter.cpp source.cpp \
165 browsefilter.cpp queryfilter.cpp mggdbmsource.cpp gdbmsource.cpp \
166 phrasesearch.cpp phrasequeryfilter.cpp collectset.cpp \
167 $(MG_SOURCES) $(LC_SOURCES) $(CORBASOURCES)
168
169OBJECTS = search.o querycache.o queryinfo.o collectserver.o \
170 colservrconfig.o maptools.o filter.o source.o browsefilter.o \
171 queryfilter.o mggdbmsource.o gdbmsource.o \
172 phrasesearch.o phrasequeryfilter.o \
173 $(MG_MGPP_OBJECTS) $(MG_OBJECTS) $(LC_OBJECTS) $(CORBAOBJECTS)
174
175all : $(OBJECTS)
176 $(MAKE) USE_MGPP=1 $(MGPP_OBJECTS) $(Z3950OBJECTS)
177
178distclean:
179 rm -f $(OBJECTS) Makefile mgppsearch.o mgppqueryfilter.o
180clean:
181 rm -f $(OBJECTS) mgppsearch.o mgppqueryfilter.o
182
183install:
184
185# needs IndexData.h from mgpp...
186$(MG_MGPP_OBJECTS): %.o : %.cpp
187 $(CXXCOMPILE) -I../mgpp/text -I../mgpp/lib -o $@ $<
188
189depend:
190 makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
Note: See TracBrowser for help on using the repository browser.