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 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 | AR = ar
|
---|
28 | CC = @CC@
|
---|
29 | CCFLAGS = @CFLAGS@ -Wall -Wunused -pedantic -W -Woverloaded-virtual
|
---|
30 | DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER \
|
---|
31 | -D_LITTLE_ENDIAN -DGSDLUSAGELOG @DEFS@
|
---|
32 |
|
---|
33 | USE_FASTCGI = @USE_FASTCGI@
|
---|
34 | ifneq ($(USE_FASTCGI), 1)
|
---|
35 | INCLUDES = -I../../lib -I. -I../colservr -I../../packages/mg \
|
---|
36 | -I../../packages/mg/lib -I../../packages/mg/src/text
|
---|
37 | else
|
---|
38 | INCLUDES = -I../../lib -I. -I../colservr -I../../packages/mg \
|
---|
39 | -I../../packages/mg/lib -I../../packages/mg/src/text \
|
---|
40 | -I../../packages/fcgi/include
|
---|
41 | endif
|
---|
42 |
|
---|
43 | RANLIB = @RANLIB@
|
---|
44 | LDFLAGS = @LDFLAGS@
|
---|
45 | LIBS = -lgdbm -lstdc++ -lm #-lcrypt
|
---|
46 |
|
---|
47 | GSDLOS = @gsdlos@
|
---|
48 |
|
---|
49 |
|
---|
50 | COMPILE = $(CC) -c $(CCFLAGS) $(DEFS) $(INCLUDES)
|
---|
51 | LINK = $(CC) $(LDFLAGS) -o $@
|
---|
52 |
|
---|
53 | .SUFFIXES:
|
---|
54 | .SUFFIXES: .c .o
|
---|
55 | .c.o:
|
---|
56 | $(COMPILE) $<
|
---|
57 |
|
---|
58 | .SUFFIXES: .cpp .o
|
---|
59 | .cpp.o:
|
---|
60 | $(COMPILE) $<
|
---|
61 |
|
---|
62 | COMMONHEADERS = receptionist.h cgiwrapper.h cgiargs.h action.h browserclass.h \
|
---|
63 | converter.h recptconfig.h cgiutils.h OIDtools.h browsetools.h htmlgen.h \
|
---|
64 | statusaction.h pageaction.h comtypes.h recptproto.h \
|
---|
65 | pingaction.h queryaction.h documentaction.h \
|
---|
66 | extlinkaction.h buildaction.h htmlutils.h \
|
---|
67 | querytools.h formattools.h tipaction.h authenaction.h infodbclass.h \
|
---|
68 | userdb.h usersaction.h vlistbrowserclass.h hlistbrowserclass.h \
|
---|
69 | datelistbrowserclass.h invbrowserclass.h pagedbrowserclass.h \
|
---|
70 | htmlbrowserclass.h
|
---|
71 |
|
---|
72 | RECEPTHEADERS =
|
---|
73 |
|
---|
74 | LIBRARYHEADERS = nullproto.h
|
---|
75 |
|
---|
76 | HEADERS = $(COMMONHEADERS) $(RECPTHEADERS) $(LIBRARYHEADERS)
|
---|
77 |
|
---|
78 |
|
---|
79 | COMMONSOURCES = receptionist.cpp cgiwrapper.cpp cgiargs.cpp action.cpp browserclass.cpp \
|
---|
80 | converter.cpp recptconfig.cpp cgiutils.cpp OIDtools.cpp browsetools.cpp \
|
---|
81 | htmlgen.cpp statusaction.cpp pageaction.cpp comtypes.cpp \
|
---|
82 | recptproto.cpp pingaction.cpp queryaction.cpp documentaction.cpp \
|
---|
83 | extlinkaction.cpp buildaction.cpp htmlutils.cpp querytools.cpp formattools.cpp \
|
---|
84 | tipaction.cpp authenaction.cpp infodbclass.cpp userdb.cpp usersaction.cpp \
|
---|
85 | vlistbrowserclass.cpp hlistbrowserclass.cpp datelistbrowserclass.cpp \
|
---|
86 | invbrowserclass.cpp pagedbrowserclass.cpp htmlbrowserclass.cpp
|
---|
87 |
|
---|
88 |
|
---|
89 | RECPTSOURCES = recptmain.cpp
|
---|
90 |
|
---|
91 | LIBRARYSOURCES = nullproto.cpp librarymain.cpp
|
---|
92 |
|
---|
93 | SOURCES = $(COMMONSOURCES) $(RECPTSOURCES) $(LIBRARYSOURCES)
|
---|
94 |
|
---|
95 |
|
---|
96 | COMMONOBJECTS = receptionist.o cgiwrapper.o cgiargs.o action.o browserclass.o \
|
---|
97 | converter.o recptconfig.o cgiutils.o OIDtools.o browsetools.o \
|
---|
98 | htmlgen.o statusaction.o pageaction.o comtypes.o \
|
---|
99 | recptproto.o pingaction.o queryaction.o documentaction.o \
|
---|
100 | extlinkaction.o buildaction.o htmlutils.o querytools.o \
|
---|
101 | formattools.o tipaction.o authenaction.o \
|
---|
102 | infodbclass.o userdb.o usersaction.o vlistbrowserclass.o \
|
---|
103 | hlistbrowserclass.o datelistbrowserclass.o invbrowserclass.o \
|
---|
104 | pagedbrowserclass.o htmlbrowserclass.o
|
---|
105 |
|
---|
106 | RECPTOBJECTS = recptmain.o
|
---|
107 |
|
---|
108 | LIBRARYOBJECTS = nullproto.o librarymain.o
|
---|
109 |
|
---|
110 | OBJECTS = $(COMMONOBJECTS) $(RECPTOBJECTS) $(LIBRARYOBJECTS)
|
---|
111 |
|
---|
112 |
|
---|
113 | COLSERVROBJECTS = ../colservr/mgq.o \
|
---|
114 | ../colservr/mgsearch.o \
|
---|
115 | ../colservr/querycache.o \
|
---|
116 | ../colservr/queryinfo.o \
|
---|
117 | ../colservr/collectserver.o \
|
---|
118 | ../colservr/colservrconfig.o \
|
---|
119 | ../colservr/maptools.o \
|
---|
120 | ../colservr/filter.o \
|
---|
121 | ../colservr/source.o \
|
---|
122 | ../colservr/browsefilter.o \
|
---|
123 | ../colservr/queryfilter.o \
|
---|
124 | ../colservr/mggdbmsource.o \
|
---|
125 | ../colservr/phrasesearch.o \
|
---|
126 | ../colservr/phrasequeryfilter.o
|
---|
127 |
|
---|
128 |
|
---|
129 | EXEC = recpt library
|
---|
130 |
|
---|
131 | all: $(EXEC)
|
---|
132 |
|
---|
133 | clean:
|
---|
134 | rm -f $(OBJECTS) $(EXEC)
|
---|
135 |
|
---|
136 | install:
|
---|
137 | cp library ../../cgi-bin/library
|
---|
138 |
|
---|
139 |
|
---|
140 | depend:
|
---|
141 | makedepend -Y -- $(DEFS) $(INCLUDES) $(CCFLAGS) -- $(SOURCES)
|
---|
142 |
|
---|
143 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
144 |
|
---|
145 | ifneq ($(USE_FASTCGI), 1)
|
---|
146 | RECPT_OBJS = $(COMMONOBJECTS) $(RECPTOBJECTS) \
|
---|
147 | ../../lib/gsdllib.a \
|
---|
148 | ../../packages/mg/src/text/libtextin.a \
|
---|
149 | ../../packages/mg/lib/libmg.a
|
---|
150 | else
|
---|
151 | RECPT_OBJS = $(COMMONOBJECTS) $(RECPTOBJECTS) \
|
---|
152 | ../../lib/gsdllib.a \
|
---|
153 | ../../packages/mg/src/text/libtextin.a \
|
---|
154 | ../../packages/mg/lib/libmg.a \
|
---|
155 | ../../packages/fcgi/libfcgi/libfcgi.a
|
---|
156 | endif
|
---|
157 |
|
---|
158 | recpt: $(RECPT_OBJS)
|
---|
159 | $(LINK) $(RECPT_OBJS) $(LIBS)
|
---|
160 |
|
---|
161 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
162 |
|
---|
163 | ifneq ($(USE_FASTCGI), 1)
|
---|
164 | LIBRARY_OBJS = $(COMMONOBJECTS) $(LIBRARYOBJECTS) $(COLSERVROBJECTS) \
|
---|
165 | ../../lib/gsdllib.a \
|
---|
166 | ../../packages/mg/src/text/libtextin.a \
|
---|
167 | ../../packages/mg/lib/libmg.a
|
---|
168 | else
|
---|
169 | LIBRARY_OBJS = $(COMMONOBJECTS) $(LIBRARYOBJECTS) $(COLSERVROBJECTS) \
|
---|
170 | ../../lib/gsdllib.a \
|
---|
171 | ../../packages/mg/src/text/libtextin.a \
|
---|
172 | ../../packages/mg/lib/libmg.a \
|
---|
173 | ../../packages/fcgi/libfcgi/libfcgi.a
|
---|
174 | endif
|
---|
175 |
|
---|
176 | library: $(LIBRARY_OBJS)
|
---|
177 | $(LINK) $(LIBRARY_OBJS) $(LIBS)
|
---|