root/main/branches/64_bit_Greenstone/greenstone2/runtime-src/src/oaiservr/Makefile.in @ 23508

Revision 23508, 4.4 KB (checked in by sjm84, 9 years ago)

Committing 64 bit changes into the branch

  • Property svn:keywords set to Author Date Id Revision
Line 
1###########################################################################
2#
3# Makefile -- runtime-src/src/oaiservr
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 = ../../..
28COMMON_DIR = $(GSDL_DIR)/common-src
29RUNTIME_DIR = $(GSDL_DIR)/runtime-src
30
31INDEXERS_DIR = $(COMMON_DIR)/indexers
32COMMON_PACKAGES_DIR = $(COMMON_DIR)/packages
33COLSERVR_DIR = $(RUNTIME_DIR)/src/colservr
34PROTOCOL_DIR = $(RUNTIME_DIR)/src/protocol
35RECPT_DIR = $(RUNTIME_DIR)/src/recpt
36
37
38ENABLE_ACCENTFOLD = @ENABLE_ACCENTFOLD@
39ifeq ($(ENABLE_ACCENTFOLD), 1)
40ACCENTFOLD_LIBS = $(INDEXERS_DIR)/packages/unac/libunac.a $(COMMON_PACKAGES_DIR)/iconv/lib/libiconv.a
41else
42ACCENTFOLD_LIBS =
43endif
44
45
46ENABLE_MG = @ENABLE_MG@
47ifeq ($(ENABLE_MG), 1)
48MG_INDEXERS_LIBS = $(INDEXERS_DIR)/mg/src/text/libmgtext.a \
49    $(INDEXERS_DIR)/mg/lib/libmglib.a
50else
51MG_INDEXERS_LIBS =
52endif
53
54ENABLE_MGPP = @ENABLE_MGPP@
55ifeq ($(ENABLE_MGPP), 1)
56MGPP_INDEXERS_LIBS = $(INDEXERS_DIR)/mgpp/text/libmgpptext.a \
57    $(INDEXERS_DIR)/mgpp/lib/libmgpplib.a
58MGPP_INCLUDES = -I$(INDEXERS_DIR)/mgpp/text
59else
60MGPP_INDEXERS_LIBS =
61MGPP_INCLUDES =
62endif
63
64USE_GDBM = @USE_GDBM@
65ifeq ($(USE_GDBM), 1)
66GDBM_DEFINES = -DUSE_GDBM
67GDBM_LIBS = $(COMMON_PACKAGES_DIR)/gdbm/lib/libgdbm.a
68else
69GDBM_DEFINES =
70GDBM_LIBS =
71endif
72
73USE_JDBM = @USE_JDBM@
74ifeq ($(USE_JDBM), 1)
75JDBM_DEFINES = -DUSE_JDBM
76else
77JDBM_DEFINES =
78endif
79
80USE_SQLITE = @USE_SQLITE@
81ifeq ($(USE_SQLITE), 1)
82SQLITE_DEFINES = -DUSE_SQLITE
83SQLITE_LIBS = $(COMMON_PACKAGES_DIR)/sqlite/lib/libsqlite3.a -ldl -lpthread
84else
85SQLITE_LIBS =
86SQLITE_DEFINES =
87endif
88
89
90CC = @CC@
91CFLAGS = @CFLAGS@
92CXX = @CXX@
93CXXFLAGS = @CXXFLAGS@
94DEFS = @DEFS@ $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES)
95INCLUDES = -I$(COMMON_DIR)/src/lib -I$(COLSERVR_DIR) -I$(PROTOCOL_DIR) -I$(RECPT_DIR) $(MGPP_INCLUDES)
96LDFLAGS = @LDFLAGS@
97LIBS = @LIBS@ $(GDBM_LIBS) -L$(COMMON_PACKAGES_DIR)/expat/lib -lexpat \
98    $(ACCENTFOLD_LIBS) $(SQLITE_LIBS)
99INSTALL = @INSTALL@
100
101
102CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
103CXXLINK = $(CXX) $(LDFLAGS) -o $@
104
105
106.SUFFIXES:
107.SUFFIXES: .cpp .o
108.cpp.o:
109    $(CXXCOMPILE) -o $@ $<
110
111
112RECPT_OBJECTS = \
113    $(RECPT_DIR)/cgiargs.o \
114    $(RECPT_DIR)/cgiutils.o \
115    $(RECPT_DIR)/htmlutils.o
116
117SOURCES = \
118    abstractlistaction.cpp \
119    dublincore.cpp \
120    qualified_dublincore.cpp \
121    identifyaction.cpp \
122    listidsaction.cpp \
123    listrecsaction.cpp \
124    listsetsaction.cpp \
125    metaformat.cpp \
126    metaformatsaction.cpp \
127    oaiaction.cpp \
128    oaiargs.cpp \
129    oaiconfig.cpp \
130    oaidispatcher.cpp \
131    oaimain.cpp \
132    oaitools.cpp \
133    recordaction.cpp \
134    resumptiontoken.cpp \
135    rfc1807.cpp
136
137OBJECTS = \
138    abstractlistaction.o \
139    dublincore.o \
140    qualified_dublincore.o \
141    identifyaction.o \
142    listidsaction.o \
143    listrecsaction.o \
144    listsetsaction.o \
145    metaformat.o \
146    metaformatsaction.o \
147    oaiaction.o \
148    oaiargs.o \
149    oaiconfig.o \
150    oaidispatcher.o \
151    oaimain.o \
152    oaitools.o \
153    recordaction.o \
154    resumptiontoken.o \
155    rfc1807.o
156
157GSDL_LIBS = \
158    $(PROTOCOL_DIR)/gsdlprotocol.a \
159    $(COLSERVR_DIR)/gsdlcolservr.a \
160    $(MG_INDEXERS_LIBS) \
161    $(MGPP_INDEXERS_LIBS) \
162    $(COMMON_DIR)/src/lib/gsdllib.a
163
164EXECUTABLE_OBJECTS = \
165    $(OBJECTS) \
166    $(RECPT_OBJECTS) \
167    $(GSDL_LIBS)
168
169EXECUTABLE = oaiserver.cgi
170
171
172# Default target: make the oaiserver executable
173all: $(EXECUTABLE)
174
175$(EXECUTABLE): $(EXECUTABLE_OBJECTS)
176    $(CXXLINK) $(EXECUTABLE_OBJECTS) $(LIBS)
177
178install: $(EXECUTABLE)
179    $(INSTALL) -m 755 -s $(EXECUTABLE) $(GSDL_DIR)/cgi-bin
180
181clean:
182    rm -f $(OBJECTS) $(EXECUTABLE)
183
184distclean:
185    rm -f $(OBJECTS) $(EXECUTABLE) Makefile
186
187depend:
188    makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
Note: See TracBrowser for help on using the browser.