root/gsdl/trunk/src/recpt/Makefile.in @ 16323

Revision 16323, 5.4 KB (checked in by davidb, 12 years ago)

Added GSDL libraries to library dependencies, so 'library' is now recompiled if any of these libraries have been updated

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1###########################################################################
2#
3# Makefile -- src/recpt
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
32Z3950_DIR = $(GSDL_DIR)/src/z3950
33
34
35ENABLE_ACCENTFOLD = @ENABLE_ACCENTFOLD@
36ifeq ($(ENABLE_ACCENTFOLD), 1)
37ACCENTFOLD_LIBS = $(INDEXERS_DIR)/packages/unac/libunac.a
38else
39ACCENTFOLD_LIBS =
40endif
41
42USE_FASTCGI = @USE_FASTCGI@
43ifeq ($(USE_FASTCGI), 1)
44FASTCGI_DEFS = -DUSE_FASTCGI
45FASTCGI_INCLUDES = -I$(PACKAGES_DIR)/fcgi/include
46FASTCGI_LIBS = $(PACKAGES_DIR)/fcgi/libfcgi/libfcgi.a
47else
48FASTCGI_DEFS =
49FASTCGI_INCLUDES =
50FASTCGI_LIBS =
51endif
52
53USE_SQLITE = @USE_SQLITE@
54ifeq ($(USE_SQLITE), 1)
55SQLITE_LIBS = $(PACKAGES_DIR)/sqlite/lib/libsqlite3.a -ldl -lpthread
56else
57SQLITE_LIBS =
58endif
59
60USE_Z3950 = @USE_Z3950@
61ifeq ($(USE_Z3950), 1)
62Z3950_DEFS = -DUSE_Z3950
63Z3950_INCLUDES = -I$(Z3950_DIR)
64Z3950_LIBS = $(Z3950_DIR)/gsdlz3950.a $(PACKAGES_DIR)/yaz/lib/libyaz.a
65else
66Z3950_DEFS =
67Z3950_INCLUDES =
68Z3950_LIBS =
69endif
70
71
72AR = ar
73CC = @CC@
74CFLAGS=@CFLAGS@ @COMPAT32BITFLAGS@
75CXX = @CXX@
76CXXFLAGS = @CXXFLAGS@ @COMPAT32BITFLAGS@
77DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DHAVE_CONFIG_H $(FASTCGI_DEFS) $(Z3950_DEFS)
78INCLUDES = @GDBM_INCLUDE@ -I. -I$(GSDL_DIR) -I$(GSDL_DIR)/src/lib \
79        -I$(COLSERVR_DIR) -I$(PROTOCOL_DIR) \
80    -I$(INDEXERS_DIR)/mg -I$(INDEXERS_DIR)/mg/lib -I$(INDEXERS_DIR)/mgpp/text \
81        -I$(PACKAGES_DIR)/expat/include $(FASTCGI_INCLUDES) $(Z3950_INCLUDES)
82INSTALL = @INSTALL@
83LDFLAGS = @LDFLAGS@ @COMPAT32BITFLAGS@
84LIBS = @LIBS@ @GDBM_LIBPATH@ -lgdbm -L$(PACKAGES_DIR)/expat/lib -lexpat $(ACCENTFOLD_LIBS) \
85    $(FASTCGI_LIBS) $(SQLITE_LIBS) $(Z3950_LIBS)
86RANLIB = @RANLIB@
87
88
89CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
90CXXLINK = $(CXX) $(LDFLAGS) -o $@
91
92
93.SUFFIXES:
94.SUFFIXES: .cpp .o
95.cpp.o:
96    $(CXXCOMPILE) $<
97
98
99SOURCES = \
100    action.cpp \
101    argdb.cpp \
102    authenaction.cpp \
103    browseaction.cpp \
104    browseactiontools.cpp \
105    browserclass.cpp \
106    browsetoolsclass.cpp \
107    cgiargs.cpp \
108    cgiutils.cpp \
109    cgiwrapper.cpp \
110    collectoraction.cpp \
111        converter.cpp \
112    datelistbrowserclass.cpp \
113    depositoraction.cpp \
114    documentaction.cpp \
115    dynamicclassifieraction.cpp \
116    extlinkaction.cpp \
117    formattools.cpp \
118    gtiaction.cpp \
119    highlighttext.cpp \
120    historydb.cpp \
121    hlistbrowserclass.cpp \
122    htmlbrowserclass.cpp \
123    htmlutils.cpp \
124    invbrowserclass.cpp \
125    librarymain.cpp \
126    maincfg.cpp \
127    pageaction.cpp \
128    pagedbrowserclass.cpp \
129    phindaction.cpp \
130    phindbrowserclass.cpp \
131    pingaction.cpp \
132    queryaction.cpp \
133    querytools.cpp \
134    receptionist.cpp \
135    statusaction.cpp \
136    summarise.cpp \
137    tipaction.cpp \
138    userdb.cpp \
139    usersaction.cpp \
140    vlistbrowserclass.cpp \
141    wizardaction.cpp
142
143OBJECTS = \
144    action.o \
145    argdb.o \
146    authenaction.o \
147    browseaction.o \
148    browseactiontools.o \
149    browserclass.o \
150    browsetoolsclass.o \
151    cgiargs.o \
152    cgiutils.o \
153    cgiwrapper.o \
154    collectoraction.o \
155        converter.o \
156    datelistbrowserclass.o \
157    depositoraction.o \
158    documentaction.o \
159    dynamicclassifieraction.o \
160    extlinkaction.o \
161    formattools.o \
162    gtiaction.o \
163    highlighttext.o \
164    historydb.o \
165    hlistbrowserclass.o \
166    htmlbrowserclass.o \
167    htmlutils.o \
168    invbrowserclass.o \
169    librarymain.o \
170    maincfg.o \
171    pageaction.o \
172    pagedbrowserclass.o \
173    phindaction.o \
174    phindbrowserclass.o \
175    pingaction.o \
176    queryaction.o \
177    querytools.o \
178    receptionist.o \
179    statusaction.o \
180    summarise.o \
181    tipaction.o \
182    userdb.o \
183    usersaction.o \
184    vlistbrowserclass.o \
185    wizardaction.o
186
187LIBRARY = gsdlrecpt.a
188
189GSDL_LIBS = \
190    $(PROTOCOL_DIR)/gsdlprotocol.a \
191    $(COLSERVR_DIR)/gsdlcolservr.a \
192    $(INDEXERS_DIR)/mg/src/text/libmgtext.a \
193    $(INDEXERS_DIR)/mg/lib/libmglib.a \
194    $(INDEXERS_DIR)/mgpp/text/libmgpptext.a \
195    $(INDEXERS_DIR)/mgpp/lib/libmgpplib.a \
196    $(GSDL_DIR)/src/lib/gsdllib.a
197
198EXECUTABLE_OBJECTS = \
199    $(OBJECTS) \
200    $(GSDL_LIBS)
201
202EXECUTABLE = library
203
204
205# Default target: make both gsdlrecpt.a and the library executable
206all: $(LIBRARY) $(EXECUTABLE)
207
208gsdlrecpt.a: $(OBJECTS)
209    rm -f $(LIBRARY)
210    $(AR) cru $(LIBRARY) $(OBJECTS)
211    $(RANLIB) $(LIBRARY)
212
213library: $(EXECUTABLE_OBJECTS) $(GSDL_LIBS)
214    $(CXXLINK) $(EXECUTABLE_OBJECTS) $(LIBS)
215
216install: $(EXECUTABLE)
217    $(INSTALL) -m 755 -s $(EXECUTABLE) $(GSDL_DIR)/cgi-bin
218
219clean:
220    rm -f $(OBJECTS) $(LIBRARY) $(EXECUTABLE)
221
222distclean:
223    rm -f $(OBJECTS) $(LIBRARY) $(EXECUTABLE) Makefile
224
225depend:
226    makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
Note: See TracBrowser for help on using the browser.