1 | ###########################################################################
|
---|
2 | #
|
---|
3 | # Makefile --
|
---|
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 | # This program is free software; you can redistribute it and/or modify
|
---|
11 | # it under the terms of the GNU General Public License as published by
|
---|
12 | # the Free Software Foundation; either version 2 of the License, or
|
---|
13 | # (at your option) any later version.
|
---|
14 | #
|
---|
15 | # This program is distributed in the hope that it will be useful,
|
---|
16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
18 | # GNU General Public License for more details.
|
---|
19 | #
|
---|
20 | # You should have received a copy of the GNU General Public License
|
---|
21 | # along with this program; if not, write to the Free Software
|
---|
22 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
23 | #
|
---|
24 | #
|
---|
25 | ###########################################################################
|
---|
26 |
|
---|
27 |
|
---|
28 | AR = ar
|
---|
29 | CC = gcc
|
---|
30 | CCFLAGS = -g -Wall -Wunused -pedantic -W -Woverloaded-virtual # -Wshadow
|
---|
31 | DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DUSE_FASTCGI -DGSDLSERVER \
|
---|
32 | -D_LITTLE_ENDIAN -DGSDLSERVER
|
---|
33 | INCLUDES = -I../../lib -I../../packages/mg -I../../packages/mg/lib \
|
---|
34 | -I../../packages/mg/src/text -I../../packages/fcgi/include
|
---|
35 | RANLIB = ranlib
|
---|
36 | LDFLAGS =
|
---|
37 | LIBS = -lgdbm -lstdc++ -lm #-lcrypt
|
---|
38 |
|
---|
39 | GSDLOS = linux
|
---|
40 |
|
---|
41 |
|
---|
42 | COMPILE = $(CC) -c $(CCFLAGS) $(DEFS) $(INCLUDES)
|
---|
43 | LINK = $(CC) $(LDFLAGS) -o $@
|
---|
44 |
|
---|
45 | .SUFFIXES:
|
---|
46 | .SUFFIXES: .c .o
|
---|
47 | .c.o:
|
---|
48 | $(COMPILE) $<
|
---|
49 |
|
---|
50 | .SUFFIXES: .cpp .o
|
---|
51 | .cpp.o:
|
---|
52 | $(COMPILE) $<
|
---|
53 |
|
---|
54 | COMMONHEADERS = receptionist.h cgiwrapper.h cgiargs.h action.h \
|
---|
55 | converter.h recptconfig.h cgiutils.h OIDtools.h browsetools.h htmlgen.h \
|
---|
56 | statusaction.h pageaction.h comtypes.h recptproto.h \
|
---|
57 | pingaction.h queryaction.h documentaction.h htmlutils.h \
|
---|
58 | querytools.h formattools.h tipaction.h authenaction.h infodbclass.h \
|
---|
59 | userdb.h usersaction.h
|
---|
60 |
|
---|
61 | RECEPTHEADERS =
|
---|
62 |
|
---|
63 | COLSERVRHEADERS = mgq.h mgsearch.h querycache.h queryinfo.h \
|
---|
64 | collectserver.h colservrconfig.h maptools.h filter.h \
|
---|
65 | source.h browsefilter.h queryfilter.h mggdbmsource.h \
|
---|
66 | phrasesearch.h phrasequeryfilter.h
|
---|
67 |
|
---|
68 | LIBRARYHEADERS = $(COLSERVRHEADERS) \
|
---|
69 | nullproto.h
|
---|
70 |
|
---|
71 | HEADERS = $(COMMONHEADERS) $(RECPTHEADERS) $(LIBRARYHEADERS)
|
---|
72 |
|
---|
73 |
|
---|
74 | COMMONSOURCES = receptionist.cpp cgiwrapper.cpp cgiargs.cpp action.cpp \
|
---|
75 | converter.cpp recptconfig.cpp cgiutils.cpp OIDtools.cpp browsetools.cpp \
|
---|
76 | htmlgen.cpp statusaction.cpp pageaction.cpp comtypes.cpp \
|
---|
77 | recptproto.cpp pingaction.cpp queryaction.cpp documentaction.cpp \
|
---|
78 | htmlutils.cpp querytools.cpp formattools.cpp tipaction.cpp authenaction.cpp \
|
---|
79 | infodbclass.cpp userdb.cpp usersaction.cpp
|
---|
80 |
|
---|
81 | RECPTSOURCES = recptmain.cpp
|
---|
82 |
|
---|
83 | COLSERVRSOURCES = mgq.c mgsearch.cpp querycache.cpp queryinfo.cpp \
|
---|
84 | collectserver.cpp colservrconfig.cpp maptools.cpp filter.cpp \
|
---|
85 | source.cpp browsefilter.cpp queryfilter.cpp mggdbmsource.cpp \
|
---|
86 | phrasesearch.cpp phrasequeryfilter.cpp
|
---|
87 |
|
---|
88 | LIBRARYSOURCES = $(COLSERVRSOURCES) \
|
---|
89 | nullproto.cpp librarymain.cpp
|
---|
90 |
|
---|
91 | SOURCES = $(COMMONSOURCES) $(RECPTSOURCES) $(LIBRARYSOURCES)
|
---|
92 |
|
---|
93 |
|
---|
94 | COMMONOBJECTS = receptionist.o cgiwrapper.o cgiargs.o action.o \
|
---|
95 | converter.o recptconfig.o cgiutils.o OIDtools.o browsetools.o \
|
---|
96 | htmlgen.o statusaction.o pageaction.o comtypes.o \
|
---|
97 | recptproto.o pingaction.o queryaction.o documentaction.o \
|
---|
98 | htmlutils.o querytools.o formattools.o tipaction.o authenaction.o \
|
---|
99 | infodbclass.o userdb.o usersaction.o
|
---|
100 |
|
---|
101 | RECPTOBJECTS = recptmain.o
|
---|
102 |
|
---|
103 | COLSERVROBJECTS = mgq.o mgsearch.o querycache.o queryinfo.o \
|
---|
104 | collectserver.o colservrconfig.o maptools.o filter.o \
|
---|
105 | source.o browsefilter.o queryfilter.o mggdbmsource.o \
|
---|
106 | phrasesearch.o phrasequeryfilter.o
|
---|
107 |
|
---|
108 | LIBRARYOBJECTS = $(COLSERVROBJECTS) \
|
---|
109 | nullproto.o librarymain.o
|
---|
110 |
|
---|
111 | OBJECTS = $(COMMONOBJECTS) $(RECPTOBJECTS) $(LIBRARYOBJECTS)
|
---|
112 |
|
---|
113 |
|
---|
114 | EXEC = recpt library
|
---|
115 |
|
---|
116 | all: $(COLSERVRHEADERS) $(COLSERVRSOURCES) $(EXEC)
|
---|
117 |
|
---|
118 | $(COLSERVRHEADERS) $(COLSERVRSOURCES):
|
---|
119 | ln -s ../colservr/$@
|
---|
120 |
|
---|
121 | clean:
|
---|
122 | rm -f $(COLSERVRHEADERS) $(COLSERVRSOURCES) $(OBJECTS) $(EXEC)
|
---|
123 |
|
---|
124 | install:
|
---|
125 | cp recpt /home/nzdl/nzdl-1.2/cgi-bin/recpt; \
|
---|
126 | cp library /home/nzdl/nzdl-1.2/cgi-bin/library
|
---|
127 | # cp $(EXEC) /home/nzdl/nzdl-1.2/cgi-bin
|
---|
128 |
|
---|
129 | depend:
|
---|
130 | makedepend -Y -- $(DEFS) $(INCLUDES) $(CCFLAGS) -- $(SOURCES)
|
---|
131 |
|
---|
132 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
133 |
|
---|
134 | RECPT_OBJS = $(COMMONOBJECTS) $(RECPTOBJECTS) \
|
---|
135 | ../../lib/gsdllib.a \
|
---|
136 | ../../packages/mg/src/text/libtextin.a \
|
---|
137 | ../../packages/mg/lib/libmg.a \
|
---|
138 | ../../packages/fcgi/libfcgi/libfcgi.a
|
---|
139 |
|
---|
140 | recpt: $(RECPT_OBJS)
|
---|
141 | $(LINK) $(RECPT_OBJS) $(LIBS)
|
---|
142 |
|
---|
143 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
144 |
|
---|
145 | LIBRARY_OBJS = $(COMMONOBJECTS) $(LIBRARYOBJECTS) \
|
---|
146 | ../../lib/gsdllib.a \
|
---|
147 | ../../packages/mg/src/text/libtextin.a \
|
---|
148 | ../../packages/mg/lib/libmg.a \
|
---|
149 | ../../packages/fcgi/libfcgi/libfcgi.a
|
---|
150 |
|
---|
151 | library: $(LIBRARY_OBJS)
|
---|
152 | $(LINK) $(LIBRARY_OBJS) $(LIBS)
|
---|