1 | ###########################################################################
|
---|
2 | #
|
---|
3 | # win32 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 | GSDLHOME = ..\..
|
---|
28 | USE_STLPORT = 0
|
---|
29 | LOCAL_LIBRARY = 0
|
---|
30 | DLL = 0
|
---|
31 | DLLDEBUG = 0
|
---|
32 | STLPATH = "$(GSDLHOME)\packages\windows\stlport\stlport"
|
---|
33 |
|
---|
34 | AR = lib
|
---|
35 | CC = cl
|
---|
36 |
|
---|
37 | CPPFLAGS = -GX
|
---|
38 | !IF $(DLL)
|
---|
39 | CPPFLAGS = $(CPPFLAGS) -MD
|
---|
40 | !ELSE
|
---|
41 | !IF ($(DLLDEBUG))
|
---|
42 | CPPFLAGS = $(CPPFLAGS) -MDd
|
---|
43 | !ENDIF
|
---|
44 | !ENDIF
|
---|
45 |
|
---|
46 | LDFLAGS =
|
---|
47 | DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX
|
---|
48 | INCLUDES = -I"$(GSDLHOME)\src\recpt" -I"$(GSDLHOME)\lib" -I"$(GSDLHOME)\src\colservr" \
|
---|
49 | -I"$(GSDLHOME)\packages\mg" -I"$(GSDLHOME)\packages\mg\lib" \
|
---|
50 | -I"$(GSDLHOME)\packages\mg\src\text" -I"$(GSDLHOME)\packages\windows\gdbm\gdbm" \
|
---|
51 | -I"$(GSDLHOME)\packages\windows\crypt\crypt" -I"$(GSDLHOME)\src\mgpp\lib" \
|
---|
52 | -I"$(GSDLHOME)\src\mgpp\text" -I"$(GSDLHOME)"
|
---|
53 | !IF $(USE_STLPORT)
|
---|
54 | DEFS = $(DEFS) -DGSDL_NAMESPACE_BROKEN -DGSDL_USE_IOS_H -D__STL_NO_NEW_IOSTREAMS
|
---|
55 | INCLUDES = $(INCLUDES) -I$(STLPATH)
|
---|
56 | !ENDIF
|
---|
57 | !IF $(LOCAL_LIBRARY)
|
---|
58 | DEFS = $(DEFS) -DGSDL_LOCAL_LIBRARY
|
---|
59 | !ENDIF
|
---|
60 |
|
---|
61 | LIBS = "$(GSDLHOME)\packages\windows\gdbm\gdbm\gdbm.lib" \
|
---|
62 | "$(GSDLHOME)\packages\windows\crypt\crypt\crypt.lib" \
|
---|
63 | "$(GSDLHOME)\src\colservr\gsdlcolservr.lib" \
|
---|
64 | "$(GSDLHOME)\lib\gsdllib.lib" \
|
---|
65 | "$(GSDLHOME)\packages\mg\src\text\libtextin.lib" \
|
---|
66 | "$(GSDLHOME)\packages\mg\lib\libmg.lib" \
|
---|
67 | "$(GSDLHOME)\src\mgpp\text\libtextin.lib" \
|
---|
68 | "$(GSDLHOME)\src\mgpp\lib\libmg.lib"
|
---|
69 |
|
---|
70 |
|
---|
71 | COMPILE = $(CC) -c $(CPPFLAGS) $(DEFS) $(INCLUDES)
|
---|
72 | LINK = $(CC) $(LDFLAGS) -o $@
|
---|
73 |
|
---|
74 | .SUFFIXES:
|
---|
75 | .SUFFIXES: .c .obj
|
---|
76 | .c.obj:
|
---|
77 | $(COMPILE) $<
|
---|
78 |
|
---|
79 | .SUFFIXES: .cpp .obj
|
---|
80 | .cpp.obj:
|
---|
81 | $(COMPILE) $<
|
---|
82 |
|
---|
83 |
|
---|
84 | COMMONHEADERS = receptionist.h cgiargs.h action.h browserclass.h \
|
---|
85 | converter.h recptconfig.h cgiutils.h OIDtools.h browsetools.h \
|
---|
86 | statusaction.h pageaction.h comtypes.h recptproto.h pingaction.h \
|
---|
87 | queryaction.h documentaction.h extlinkaction.h htmlutils.h \
|
---|
88 | querytools.h formattools.h tipaction.h authenaction.h infodbclass.h \
|
---|
89 | userdb.h usersaction.h vlistbrowserclass.h hlistbrowserclass.h \
|
---|
90 | datelistbrowserclass.h invbrowserclass.h pagedbrowserclass.h \
|
---|
91 | htmlbrowserclass.h historydb.h phindbrowserclass.h collectoraction.h \
|
---|
92 | nullproto.h argdb.h browseaction.h browseactiontools.h phindaction.h \
|
---|
93 | summarise.h highlighttext.h configaction.h
|
---|
94 |
|
---|
95 | CGIHEADERS = cgiwrapper.h
|
---|
96 |
|
---|
97 | HEADERS = $(COMMONHEADERS) $(CGIHEADERS)
|
---|
98 |
|
---|
99 |
|
---|
100 | COMMONSOURCES = receptionist.cpp cgiargs.cpp action.cpp browserclass.cpp \
|
---|
101 | converter.cpp recptconfig.cpp cgiutils.cpp OIDtools.cpp browsetools.cpp \
|
---|
102 | statusaction.cpp pageaction.cpp comtypes.cpp \
|
---|
103 | recptproto.cpp pingaction.cpp queryaction.cpp documentaction.cpp \
|
---|
104 | extlinkaction.cpp htmlutils.cpp querytools.cpp formattools.cpp \
|
---|
105 | tipaction.cpp authenaction.cpp infodbclass.cpp userdb.cpp usersaction.cpp \
|
---|
106 | vlistbrowserclass.cpp hlistbrowserclass.cpp datelistbrowserclass.cpp \
|
---|
107 | invbrowserclass.cpp pagedbrowserclass.cpp htmlbrowserclass.cpp \
|
---|
108 | historydb.cpp phindbrowserclass.cpp collectoraction.cpp nullproto.cpp \
|
---|
109 | argdb.cpp browseaction.cpp browseactiontools.cpp phindaction.cpp \
|
---|
110 | summarise.cpp highlighttext.cpp configaction.cpp
|
---|
111 |
|
---|
112 | CGISOURCES = librarymain.cpp cgiwrapper.cpp
|
---|
113 |
|
---|
114 | SOURCES = $(COMMONSOURCES) $(CGISOURCES)
|
---|
115 |
|
---|
116 |
|
---|
117 | COMMONOBJECTS = receptionist.obj cgiargs.obj action.obj browserclass.obj \
|
---|
118 | converter.obj recptconfig.obj cgiutils.obj OIDtools.obj browsetools.obj \
|
---|
119 | statusaction.obj pageaction.obj comtypes.obj recptproto.obj \
|
---|
120 | pingaction.obj queryaction.obj documentaction.obj extlinkaction.obj \
|
---|
121 | htmlutils.obj querytools.obj formattools.obj tipaction.obj \
|
---|
122 | authenaction.obj infodbclass.obj userdb.obj usersaction.obj \
|
---|
123 | vlistbrowserclass.obj hlistbrowserclass.obj datelistbrowserclass.obj \
|
---|
124 | invbrowserclass.obj pagedbrowserclass.obj htmlbrowserclass.obj \
|
---|
125 | historydb.obj phindbrowserclass.obj collectoraction.obj nullproto.obj \
|
---|
126 | argdb.obj browseaction.obj browseactiontools.obj phindaction.obj \
|
---|
127 | summarise.obj highlighttext.obj configaction.obj
|
---|
128 |
|
---|
129 | CGIOBJECTS = librarymain.obj cgiwrapper.obj
|
---|
130 |
|
---|
131 | OBJECTS = $(COMMONOBJECTS) $(CGIOBJECTS)
|
---|
132 |
|
---|
133 | EXEC = library.exe
|
---|
134 |
|
---|
135 | !IF $(LOCAL_LIBRARY)
|
---|
136 | all: gsdlrecpt.lib
|
---|
137 | !ELSE
|
---|
138 | all: $(EXEC)
|
---|
139 | !ENDIF
|
---|
140 |
|
---|
141 | gsdlrecpt.lib : $(COMMONOBJECTS)
|
---|
142 | if EXIST gsdlrecpt.lib del gsdlrecpt.lib
|
---|
143 | $(AR) /out:gsdlrecpt.lib $(COMMONOBJECTS)
|
---|
144 |
|
---|
145 | clean:
|
---|
146 | del *.obj
|
---|
147 | del library.exe
|
---|
148 |
|
---|
149 | !IF $(LOCAL_LIBRARY)
|
---|
150 | install:
|
---|
151 | !ELSE
|
---|
152 | install:
|
---|
153 | copy library.exe "$(GSDLHOME)\cgi-bin"
|
---|
154 | !ENDIF
|
---|
155 |
|
---|
156 | library.exe: $(OBJECTS)
|
---|
157 | $(LINK) $(OBJECTS) $(LIBS)
|
---|
158 |
|
---|
159 | # we want the following to always be compiled in case the status of
|
---|
160 | # GSDL_LOCAL_LIBRARY has changed
|
---|
161 | statusaction.obj: FORCE
|
---|
162 | configaction.obj: FORCE
|
---|
163 |
|
---|
164 | FORCE: |
---|