[8182] | 1 | ###########################################################################
|
---|
| 2 | #
|
---|
| 3 | # Makefile -- 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 | #
|
---|
[15457] | 8 | # Copyright (C) 1999-2008 The New Zealand Digital Library Project
|
---|
[8182] | 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 |
|
---|
[15457] | 27 | GSDL_DIR = ../..
|
---|
| 28 | INDEXERS_DIR = $(GSDL_DIR)/indexers
|
---|
[15546] | 29 | PACKAGES_DIR = $(GSDL_DIR)/packages
|
---|
[15457] | 30 | COLSERVR_DIR = $(GSDL_DIR)/src/colservr
|
---|
| 31 | PROTOCOL_DIR = $(GSDL_DIR)/src/protocol
|
---|
| 32 | RECPT_DIR = $(GSDL_DIR)/src/recpt
|
---|
[8182] | 33 |
|
---|
[15476] | 34 |
|
---|
[12927] | 35 | ENABLE_ACCENTFOLD = @ENABLE_ACCENTFOLD@
|
---|
| 36 | ifeq ($(ENABLE_ACCENTFOLD), 1)
|
---|
[15457] | 37 | ACCENTFOLD_LIBS = $(INDEXERS_DIR)/packages/unac/libunac.a
|
---|
[12927] | 38 | else
|
---|
[15457] | 39 | ACCENTFOLD_LIBS =
|
---|
[12927] | 40 | endif
|
---|
| 41 |
|
---|
[15786] | 42 | USE_SQLITE = @USE_SQLITE@
|
---|
| 43 | ifeq ($(USE_SQLITE), 1)
|
---|
| 44 | SQLITE_LIBS = $(PACKAGES_DIR)/sqlite/lib/libsqlite3.a -ldl -lpthread
|
---|
| 45 | else
|
---|
| 46 | SQLITE_LIBS =
|
---|
| 47 | endif
|
---|
| 48 |
|
---|
| 49 |
|
---|
[15551] | 50 | CC = @CC@
|
---|
| 51 | CFLAGS = @CFLAGS@ @COMPAT32BITFLAGS@
|
---|
| 52 | CXX = @CXX@
|
---|
| 53 | CXXFLAGS = @CXXFLAGS@ @COMPAT32BITFLAGS@
|
---|
[15457] | 54 | INCLUDES = -I$(GSDL_DIR)/lib -I$(COLSERVR_DIR) -I$(PROTOCOL_DIR) -I$(RECPT_DIR) -I$(INDEXERS_DIR)/mgpp/text
|
---|
[15551] | 55 | LDFLAGS = @LDFLAGS@ @COMPAT32BITFLAGS@
|
---|
[15786] | 56 | LIBS = @LIBS@ @GDBM_LIBPATH@ -lgdbm -L$(PACKAGES_DIR)/expat/lib -lexpat $(ACCENTFOLD_LIBS) $(SQLITE_LIBS)
|
---|
[8877] | 57 | INSTALL = @INSTALL@
|
---|
[8182] | 58 |
|
---|
[15482] | 59 |
|
---|
[15551] | 60 | CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(INCLUDES)
|
---|
| 61 | CXXLINK = $(CXX) $(LDFLAGS) -o $@
|
---|
[8182] | 62 |
|
---|
| 63 |
|
---|
[15457] | 64 | .SUFFIXES:
|
---|
[8182] | 65 | .SUFFIXES: .cpp .o
|
---|
| 66 | .cpp.o:
|
---|
[15551] | 67 | $(CXXCOMPILE) -o $@ $<
|
---|
[8182] | 68 |
|
---|
| 69 |
|
---|
[15457] | 70 | RECPT_OBJECTS = \
|
---|
| 71 | $(RECPT_DIR)/cgiargs.o \
|
---|
| 72 | $(RECPT_DIR)/cgiutils.o \
|
---|
[15574] | 73 | $(RECPT_DIR)/htmlutils.o
|
---|
[8182] | 74 |
|
---|
[15457] | 75 | SOURCES = \
|
---|
| 76 | abstractlistaction.cpp \
|
---|
| 77 | dublincore.cpp \
|
---|
| 78 | identityaction.cpp \
|
---|
| 79 | listidsaction.cpp \
|
---|
| 80 | listrecsaction.cpp \
|
---|
| 81 | listsetsaction.cpp \
|
---|
| 82 | metaformat.cpp \
|
---|
| 83 | metaformatsaction.cpp \
|
---|
| 84 | oaiaction.cpp \
|
---|
| 85 | oaiargs.cpp \
|
---|
| 86 | oaiconfig.cpp \
|
---|
| 87 | oaidispatcher.cpp \
|
---|
| 88 | oaimain.cpp \
|
---|
| 89 | oaitools.cpp \
|
---|
| 90 | recordaction.cpp \
|
---|
| 91 | resumptiontoken.cpp \
|
---|
| 92 | rfc1807.cpp
|
---|
[8182] | 93 |
|
---|
[15457] | 94 | OBJECTS = \
|
---|
| 95 | abstractlistaction.o \
|
---|
| 96 | dublincore.o \
|
---|
| 97 | identityaction.o \
|
---|
| 98 | listidsaction.o \
|
---|
| 99 | listrecsaction.o \
|
---|
| 100 | listsetsaction.o \
|
---|
| 101 | metaformat.o \
|
---|
| 102 | metaformatsaction.o \
|
---|
| 103 | oaiaction.o \
|
---|
| 104 | oaiargs.o \
|
---|
| 105 | oaiconfig.o \
|
---|
| 106 | oaidispatcher.o \
|
---|
| 107 | oaimain.o \
|
---|
| 108 | oaitools.o \
|
---|
| 109 | recordaction.o \
|
---|
| 110 | resumptiontoken.o \
|
---|
| 111 | rfc1807.o
|
---|
[8182] | 112 |
|
---|
[15457] | 113 | GSDL_LIBS = \
|
---|
[15489] | 114 | $(PROTOCOL_DIR)/gsdlprotocol.a \
|
---|
[15482] | 115 | $(COLSERVR_DIR)/gsdlcolservr.a \
|
---|
[15457] | 116 | $(INDEXERS_DIR)/mg/src/text/libmgtext.a \
|
---|
| 117 | $(INDEXERS_DIR)/mg/lib/libmglib.a \
|
---|
| 118 | $(INDEXERS_DIR)/mgpp/text/libmgpptext.a \
|
---|
[15489] | 119 | $(INDEXERS_DIR)/mgpp/lib/libmgpplib.a \
|
---|
| 120 | $(GSDL_DIR)/lib/gsdllib.a
|
---|
[8182] | 121 |
|
---|
[15482] | 122 | EXECUTABLE_OBJECTS = \
|
---|
[15457] | 123 | $(OBJECTS) \
|
---|
| 124 | $(RECPT_OBJECTS) \
|
---|
| 125 | $(GSDL_LIBS)
|
---|
[8182] | 126 |
|
---|
[15482] | 127 | EXECUTABLE = oaiserver
|
---|
[8182] | 128 |
|
---|
| 129 |
|
---|
[15579] | 130 | # Default target: make the oaiserver executable
|
---|
| 131 | all: $(EXECUTABLE)
|
---|
| 132 |
|
---|
[15482] | 133 | oaiserver: $(EXECUTABLE_OBJECTS)
|
---|
[15551] | 134 | $(CXXLINK) $(EXECUTABLE_OBJECTS) $(LIBS)
|
---|
[8182] | 135 |
|
---|
[15482] | 136 | install: $(EXECUTABLE)
|
---|
| 137 | $(INSTALL) -m 755 -s $(EXECUTABLE) $(GSDL_DIR)/cgi-bin
|
---|
[8182] | 138 |
|
---|
[15468] | 139 | clean:
|
---|
[15482] | 140 | rm -f $(OBJECTS) $(EXECUTABLE)
|
---|
[15468] | 141 |
|
---|
[8182] | 142 | distclean:
|
---|
[15482] | 143 | rm -f $(OBJECTS) $(EXECUTABLE) Makefile
|
---|
[8182] | 144 |
|
---|
| 145 | depend:
|
---|
[15551] | 146 | makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
|
---|