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

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

Lots of improvements to the colservr Makefile, particularly tidying up the MGPP stuff, which is now very much core functionality.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 4.9 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-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
27AR = ar
28CC = @CC@
29CXX = @CXX@
30CFLAGS = @CFLAGS@
31CXXFLAGS = @CXXFLAGS@
32DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER @DEFS@
33LDFLAGS = @LDFLAGS@
34LIBS = @LIBS@
35RANLIB = @RANLIB@
36
37GSDLOS = @gsdlos@
38
39USE_FASTCGI = @USE_FASTCGI@
40ifneq ($(USE_FASTCGI), 1)
41DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM @DEFS@
42CGI_INCLUDES =
43else
44DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DUSE_FASTCGI @DEFS@
45CGI_INCLUDES = -I../../packages/fcgi/include
46endif
47
48INDEXERS_DIR = ../../indexers
49
50MG_INCLUDES = -I$(INDEXERS_DIR)/mg -I$(INDEXERS_DIR)/mg/lib -I$(INDEXERS_DIR)/mg/src/text
51MG_HEADERS = mgq.h mgsearch.h mgqueryfilter.h
52MG_SOURCES = mgq.c mgsearch.cpp mgqueryfilter.cpp
53MG_OBJECTS = mgq.o mgsearch.o mgqueryfilter.o
54
55MGPP_INCLUDES = -I$(INDEXERS_DIR)/mgpp/lib -I$(INDEXERS_DIR)/mgpp/text
56MGPP_HEADERS = mgppsearch.h mgppqueryfilter.h
57MGPP_SOURCES = mgppsearch.cpp mgppqueryfilter.cpp
58MGPP_OBJECTS = mgppsearch.o mgppqueryfilter.o
59
60LUCENE_INCLUDES = -I../../packages/expat/include
61LUCENE_HEADERS = lucenesearch.h lucenequeryfilter.h lucenegdbmsource.h \
62 expat_resultset.h expat_document.h
63LUCENE_SOURCES = lucenesearch.cpp lucenequeryfilter.cpp lucenegdbmsource.cpp \
64 expat_resultset.cpp expat_document.cpp
65LUCENE_OBJECTS = lucenesearch.o lucenequeryfilter.o lucenegdbmsource.o \
66 expat_resultset.o expat_document.o
67
68# Do NOT add the "recpt" directory here: the colserver should be independent of the receptionist!
69INCLUDES = -I. -I../.. -I../../lib $(CGI_INCLUDES) \
70 $(MG_INCLUDES) $(MGPP_INCLUDES) $(LUCENE_INCLUDES) @GDBM_INCLUDE@
71
72
73COMPILE = $(CC) -c $(CFLAGS) $(DEFS) $(INCLUDES)
74LINK = $(CXX) $(LDFLAGS) -o $@
75
76CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
77CXXLINK = $(CXX) $(LDFLAGS) -o $@
78
79
80# ===========================================================================================
81# CORBA SUPPORT
82
83USE_CORBA = @USE_CORBA@
84
85MCFLAGS = @CFLAGS@ -Wall -Wunused
86
87MICO_DIR = @MICO_DIR@
88ifeq ($(MICO_DIR), default)
89MICO_INC = -I../../packages/mico/include
90MICO_PATH = ../../bin/linux/
91else
92ifeq ($(MICO_DIR), yes)
93MICO_INC =
94MICO_PATH =
95else
96MICO_INC = -I$(MICO_DIR)
97MICO_PATH =
98endif
99endif
100MINCLUDES = -I. -I../../lib -I../recpt -I$(INDEXERS_DIR)/mgpp/text $(MICO_INC)
101
102MCOMPILE = $(MICO_PATH)mico-c++ -x c++ $(MCFLAGS) $(DEFS) $(MINCLUDES) -c
103MLINK = $(MICO_PATH)mico-ld $(LDFLAGS) -lmico2.2.7 -o $@
104
105.SUFFIXES: .mpp .o
106.mpp.o:
107 $(MCOMPILE) $<
108
109ifneq ($(USE_CORBA), 0)
110CORBAHEADERS = corbaServer.h
111CORBASOURCES = corbaServer.mpp
112CORBAOBJECTS = corbaServer.o ../../lib/corbaiface_skel.o
113else
114CORBAHEADERS =
115CORBASOURCES =
116CORBAOBJECTS =
117endif
118
119# ===========================================================================================
120
121
122.SUFFIXES:
123.SUFFIXES: .c .o
124.c.o:
125 $(COMPILE) $<
126
127.SUFFIXES: .cpp .o
128.cpp.o:
129 $(CXXCOMPILE) $<
130
131
132HEADERS = comtypes.h search.h querycache.h queryinfo.h collectserver.h \
133 colservrconfig.h maptools.h filter.h source.h \
134 browsefilter.h queryfilter.h mggdbmsource.h gdbmsource.h \
135 phrasesearch.h phrasequeryfilter.h collectset.h \
136 $(MG_HEADERS) $(MGPP_HEADERS) $(LUCENE_HEADERS) $(CORBAHEADERS)
137
138SOURCES = comtypes.cpp search.cpp querycache.cpp queryinfo.cpp collectserver.cpp \
139 colservrconfig.cpp maptools.cpp filter.cpp source.cpp \
140 browsefilter.cpp queryfilter.cpp mggdbmsource.cpp gdbmsource.cpp \
141 phrasesearch.cpp phrasequeryfilter.cpp collectset.cpp \
142 $(MG_SOURCES) $(MGPP_SOURCES) $(LUCENE_SOURCES) $(CORBASOURCES)
143
144OBJECTS = comtypes.o search.o querycache.o queryinfo.o collectserver.o \
145 colservrconfig.o maptools.o filter.o source.o \
146 browsefilter.o queryfilter.o mggdbmsource.o gdbmsource.o \
147 phrasesearch.o phrasequeryfilter.o collectset.o \
148 $(MG_OBJECTS) $(MGPP_OBJECTS) $(LUCENE_OBJECTS) $(CORBAOBJECTS)
149
150
151all : $(OBJECTS)
152
153distclean:
154 rm -f $(OBJECTS) Makefile
155clean:
156 rm -f $(OBJECTS)
157
158install:
159
160depend:
161 makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
Note: See TracBrowser for help on using the repository browser.