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