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 |
|
---|
28 | AR = ar
|
---|
29 | CC = @CC@
|
---|
30 | CPP = @CXX@
|
---|
31 | #CCFLAGS = @CFLAGS@ -Wall -Wunused -pedantic -W -Woverloaded-virtual
|
---|
32 | CCFLAGS = @CFLAGS@
|
---|
33 | MCFLAGS = @CFLAGS@ -Wall -Wunused
|
---|
34 | DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER @DEFS@
|
---|
35 |
|
---|
36 | USE_FASTCGI = @USE_FASTCGI@
|
---|
37 | USE_MGPP = @USE_MGPP@
|
---|
38 | ifneq ($(USE_FASTCGI), 1)
|
---|
39 | DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM @DEFS@
|
---|
40 |
|
---|
41 | CGI_INCLUDES =
|
---|
42 | else
|
---|
43 | DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DUSE_FASTCGI @DEFS@
|
---|
44 |
|
---|
45 | CGI_INCLUDES = -I../../packages/fcgi/include
|
---|
46 | endif
|
---|
47 |
|
---|
48 | ifneq ($(USE_MGPP), 1)
|
---|
49 | MG_INCLUDES = -I../../packages/mg -I../../packages/mg/lib \
|
---|
50 | -I../../packages/mg/src/text
|
---|
51 | MG_HEADERS = mgq.h mgsearch.h mgqueryfilter.h
|
---|
52 |
|
---|
53 | MG_SOURCES = mgq.c mgsearch.cpp mgqueryfilter.cpp
|
---|
54 |
|
---|
55 | MG_OBJECTS = mgq.o mgsearch.o mgqueryfilter.o
|
---|
56 | MGPP_OBJECTS = mgppsearch.o mgppqueryfilter.o
|
---|
57 |
|
---|
58 | else
|
---|
59 | MG_INCLUDES = -I../mgpp/text -I../mgpp/lib
|
---|
60 |
|
---|
61 | MG_HEADERS = mgppsearch.h mgppqueryfilter.h
|
---|
62 |
|
---|
63 | MG_SOURCES = mgppsearch.cpp mgppqueryfilter.cpp
|
---|
64 |
|
---|
65 | MG_OBJECTS = mgppsearch.o mgppqueryfilter.o
|
---|
66 |
|
---|
67 | endif
|
---|
68 |
|
---|
69 | INCLUDES = -I. -I../.. -I../../lib -I../recpt \
|
---|
70 | $(CGI_INCLUDES) $(MG_INCLUDES)
|
---|
71 | MICO_DIR = @MICO_DIR@
|
---|
72 | ifeq ($(MICO_DIR), default)
|
---|
73 | MICO_INC = -I../../packages/mico/include
|
---|
74 | MICO_PATH = ../../bin/linux/
|
---|
75 | else
|
---|
76 | ifeq ($(MICO_DIR), yes)
|
---|
77 | MICO_INC =
|
---|
78 | MICO_PATH =
|
---|
79 | else
|
---|
80 | MICO_INC = -I$(MICO_DIR)
|
---|
81 | MICO_PATH =
|
---|
82 | endif
|
---|
83 | endif
|
---|
84 | MINCLUDES = -I. -I../../lib -I../recpt $(MICO_INC)
|
---|
85 |
|
---|
86 | USE_CORBA = @USE_CORBA@
|
---|
87 |
|
---|
88 | RANLIB = @RANLIB@
|
---|
89 | LDFLAGS = @LDFLAGS@
|
---|
90 | LIBS = @LIBS@
|
---|
91 |
|
---|
92 | GSDLOS = @gsdlos@
|
---|
93 |
|
---|
94 |
|
---|
95 | COMPILE = $(CC) -c $(CCFLAGS) $(DEFS) $(INCLUDES)
|
---|
96 | LINK = $(CPP) $(LDFLAGS) -o $@
|
---|
97 |
|
---|
98 | CPPCOMPILE = $(CC) -c $(CCFLAGS) $(DEFS) $(INCLUDES)
|
---|
99 | CPPLINK = $(CPP) $(LDFLAGS) -o $@
|
---|
100 |
|
---|
101 | MCOMPILE = $(MICO_PATH)mico-c++ -x c++ $(MCFLAGS) $(DEFS) $(MINCLUDES) -c
|
---|
102 | MLINK = $(MICO_PATH)mico-ld $(LDFLAGS) -lmico2.2.7 -o $@
|
---|
103 |
|
---|
104 | .SUFFIXES:
|
---|
105 | .SUFFIXES: .c .o
|
---|
106 | .c.o:
|
---|
107 | $(COMPILE) $<
|
---|
108 |
|
---|
109 | .SUFFIXES: .cpp .o
|
---|
110 | .cpp.o:
|
---|
111 | $(CPPCOMPILE) $<
|
---|
112 |
|
---|
113 | .SUFFIXES: .mpp .o
|
---|
114 | .mpp.o:
|
---|
115 | $(MCOMPILE) $<
|
---|
116 |
|
---|
117 | ifneq ($(USE_CORBA), 0)
|
---|
118 | CORBAHEADERS = \
|
---|
119 | corbaServer.h
|
---|
120 | CORBASOURCES = \
|
---|
121 | corbaServer.mpp
|
---|
122 | CORBAOBJECTS = \
|
---|
123 | corbaServer.o ../../lib/corbaiface_skel.o
|
---|
124 | else
|
---|
125 | CORBAHEADERS =
|
---|
126 | CORBASOURCES =
|
---|
127 | CORBAOBJECTS =
|
---|
128 | endif
|
---|
129 |
|
---|
130 | HEADERS = search.h querycache.h queryinfo.h collectserver.h collectset.h \
|
---|
131 | colservrconfig.h maptools.h filter.h source.h browsefilter.h \
|
---|
132 | queryfilter.h mggdbmsource.h phrasesearch.h phrasequeryfilter.h \
|
---|
133 | $(MG_HEADERS) $(CORBAHEADERS)
|
---|
134 |
|
---|
135 | SOURCES = search.cpp querycache.cpp queryinfo.cpp collectserver.cpp \
|
---|
136 | colservrconfig.cpp maptools.cpp filter.cpp source.cpp \
|
---|
137 | browsefilter.cpp queryfilter.cpp mggdbmsource.cpp phrasesearch.cpp \
|
---|
138 | phrasequeryfilter.cpp collectset.cpp \
|
---|
139 | $(MG_SOURCES) $(CORBASOURCES)
|
---|
140 |
|
---|
141 | OBJECTS = search.o querycache.o queryinfo.o collectserver.o \
|
---|
142 | colservrconfig.o maptools.o filter.o source.o browsefilter.o \
|
---|
143 | queryfilter.o mggdbmsource.o phrasesearch.o phrasequeryfilter.o \
|
---|
144 | collectset.o $(MG_OBJECTS) $(CORBAOBJECTS)
|
---|
145 |
|
---|
146 | all : $(OBJECTS)
|
---|
147 | $(MAKE) USE_MGPP=1 $(MGPP_OBJECTS)
|
---|
148 |
|
---|
149 | distclean:
|
---|
150 | rm -f $(OBJECTS) Makefile mgppsearch.o mgppqueryfilter.o
|
---|
151 | clean:
|
---|
152 | rm -f $(OBJECTS) mgppsearch.o mgppqueryfilter.o
|
---|
153 |
|
---|
154 | install:
|
---|
155 |
|
---|
156 | depend:
|
---|
157 | makedepend -Y -- $(DEFS) $(INCLUDES) $(CCFLAGS) -- $(SOURCES)
|
---|