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 | #
|
---|
8 | # Copyright (C) 1999,2005 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 | # set by configure for each makefile (for vpath etc)
|
---|
28 | srcdir = @srcdir@
|
---|
29 | gs_srcdir = $(srcdir)/../../src
|
---|
30 | recpt_srcdir = $(gs_srcdir)/recpt
|
---|
31 | colserv_srcdir = $(gs_srcdir)/colservr
|
---|
32 |
|
---|
33 | AR = ar
|
---|
34 | CPP = @CXX@
|
---|
35 | INSTALL = @INSTALL@
|
---|
36 |
|
---|
37 | CXXFLAGS = @CXXFLAGS@
|
---|
38 | EXEEXT = @EXEEXT@
|
---|
39 |
|
---|
40 |
|
---|
41 | # -I../../packages/mg -I../../packages/mg/lib -I../../packages/mg/src/text ?
|
---|
42 | INCLUDES = -I$(srcdir)/../../lib -I$(colserv_srcdir) -I$(gs_srcdir)/mgpp/lib -I$(gs_srcdir)/mgpp/text -I$(recpt_srcdir)
|
---|
43 |
|
---|
44 |
|
---|
45 | LDFLAGS = @LDFLAGS@
|
---|
46 | # need this for linking against recpt/infodbclass.o etc
|
---|
47 | GDBM_LIBS=@GDBM_LIBPATH@ -lgdbm
|
---|
48 | LIBS = $(GDBM_LIBS) @LIBS@ -L../../packages/expat/lib/ -lexpat
|
---|
49 |
|
---|
50 |
|
---|
51 | CXXCOMPILE = $(CPP) -c $(CXXFLAGS) $(INCLUDES)
|
---|
52 | CXXLINK = $(CPP) $(LDFLAGS)
|
---|
53 |
|
---|
54 | EXEC = oaiserver$(EXEEXT)
|
---|
55 |
|
---|
56 | all: $(EXEC)
|
---|
57 |
|
---|
58 | # needed to clear builtin rules?
|
---|
59 | #.SUFFIXES:
|
---|
60 |
|
---|
61 | .SUFFIXES: .cpp .o
|
---|
62 | .cpp.o:
|
---|
63 | $(CXXCOMPILE) -o $@ $<
|
---|
64 |
|
---|
65 |
|
---|
66 | COMMONHEADERS = oaiargs.h oaiaction.h oaidispatcher.h oaiconfig.h identityaction.h recordaction.h \
|
---|
67 | listrecsaction.h listidsaction.h listsetsaction.h metaformatsaction.h oaitools.h \
|
---|
68 | abstractlistaction.h metaformat.h dublincore.h rfc1807.h resumptiontoken.h
|
---|
69 |
|
---|
70 | ifeq ($(USE_CORBA), 1)
|
---|
71 | LIBRARYHEADERS = nullproto.h z3950proto.h z3950server.h corbaproto.h
|
---|
72 | else
|
---|
73 | LIBRARYHEADERS = nullproto.h z3950proto.h z3950server.h
|
---|
74 | endif
|
---|
75 |
|
---|
76 | HEADERS = $(COMMONHEADERS) $(LIBRARYHEADERS)
|
---|
77 |
|
---|
78 |
|
---|
79 | COMMONSOURCES = oaiargs.cpp oaiaction.cpp oaidispatcher.cpp oaiconfig.cpp identityaction.cpp recordaction.cpp \
|
---|
80 | abstractlistaction.cpp listrecsaction.cpp listidsaction.cpp listsetsaction.cpp \
|
---|
81 | metaformatsaction.cpp oaitools.cpp metaformat.cpp dublincore.cpp rfc1807.cpp \
|
---|
82 | resumptiontoken.cpp
|
---|
83 |
|
---|
84 | OAISOURCES =
|
---|
85 |
|
---|
86 | SOURCES = $(COMMONSOURCES) $(OAISOURCES)
|
---|
87 |
|
---|
88 | RECPTOBJECTS = ../../src/recpt/comtypes.o ../../src/recpt/OIDtools.o \
|
---|
89 | ../../src/recpt/nullproto.o ../../src/recpt/recptproto.o \
|
---|
90 | ../../src/recpt/htmlutils.o ../../src/recpt/infodbclass.o \
|
---|
91 | ../../src/recpt/recptconfig.o ../../src/recpt/cgiargs.o \
|
---|
92 | ../../src/recpt/cgiutils.o
|
---|
93 |
|
---|
94 | COMMONOBJECTS = oaiargs.o oaiaction.o oaiconfig.o oaidispatcher.o \
|
---|
95 | identityaction.o recordaction.o abstractlistaction.o listrecsaction.o \
|
---|
96 | listidsaction.o listsetsaction.o metaformatsaction.o oaitools.o \
|
---|
97 | metaformat.o dublincore.o rfc1807.o resumptiontoken.o
|
---|
98 |
|
---|
99 | OAIOBJECTS = oaimain.o
|
---|
100 |
|
---|
101 | OBJECTS = $(COMMONOBJECTS) $(RECPTOBJECTS) $(OAIOBJECTS)
|
---|
102 |
|
---|
103 |
|
---|
104 | COLSERVROBJECTS = ../../src/colservr/mgq.o \
|
---|
105 | ../../src/colservr/search.o \
|
---|
106 | ../../src/colservr/mgsearch.o \
|
---|
107 | ../../src/colservr/querycache.o \
|
---|
108 | ../../src/colservr/queryinfo.o \
|
---|
109 | ../../src/colservr/collectserver.o \
|
---|
110 | ../../src/colservr/colservrconfig.o \
|
---|
111 | ../../src/colservr/maptools.o \
|
---|
112 | ../../src/colservr/filter.o \
|
---|
113 | ../../src/colservr/source.o \
|
---|
114 | ../../src/colservr/browsefilter.o \
|
---|
115 | ../../src/colservr/queryfilter.o \
|
---|
116 | ../../src/colservr/mggdbmsource.o \
|
---|
117 | ../../src/colservr/phrasesearch.o \
|
---|
118 | ../../src/colservr/phrasequeryfilter.o \
|
---|
119 | ../../src/colservr/mgqueryfilter.o \
|
---|
120 | ../../src/colservr/mgppsearch.o \
|
---|
121 | ../../src/colservr/mgppqueryfilter.o \
|
---|
122 | ../../src/colservr/collectset.o \
|
---|
123 | ../../src/colservr/lucenesearch.o \
|
---|
124 | ../../src/colservr/lucenequeryfilter.o \
|
---|
125 | ../../src/colservr/lucenegdbmsource.o \
|
---|
126 | ../../src/colservr/expat_resultset.o
|
---|
127 |
|
---|
128 | distclean:
|
---|
129 | rm -f $(COMMONOBJECTS) $(OAIOBJECTS) $(EXEC) Makefile
|
---|
130 |
|
---|
131 | clean:
|
---|
132 | rm -f $(COMMONOBJECTS) $(OAIOBJECTS) $(EXEC)
|
---|
133 |
|
---|
134 | install:
|
---|
135 | $(INSTALL) -m 755 -s $(EXEC) ../../cgi-bin
|
---|
136 |
|
---|
137 | depend:
|
---|
138 | makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
|
---|
139 |
|
---|
140 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
141 |
|
---|
142 | OAI_OBJS = $(OBJECTS) $(COLSERVROBJECTS) \
|
---|
143 | ../../lib/gsdllib.a \
|
---|
144 | ../../packages/mg/src/text/libtextin.a \
|
---|
145 | ../../packages/mg/lib/libmg.a \
|
---|
146 | ../../src/mgpp/text/libtextin.a \
|
---|
147 | ../../src/mgpp/lib/libmg.a
|
---|
148 |
|
---|
149 | oaiserver$(EXEEXT): $(OAI_OBJS)
|
---|
150 | $(CXXLINK) -o $@ $(OAI_OBJS) $(LIBS)
|
---|
151 |
|
---|
152 |
|
---|
153 |
|
---|
154 |
|
---|
155 |
|
---|