root/gsdl/trunk/src/recpt/win32.mak @ 15580

Revision 15580, 5.7 KB (checked in by mdewsnip, 11 years ago)

Hopefully the last of the makefile tidy ups.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
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-2008  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
27GSDL_DIR = ..\..
28INDEXERS_DIR = $(GSDL_DIR)\indexers
29PACKAGES_DIR = $(GSDL_DIR)\packages
30COLSERVR_DIR = $(GSDL_DIR)\src\colservr
31PROTOCOL_DIR = $(GSDL_DIR)\src\protocol
32Z3950_DIR = $(GSDL_DIR)\src\z3950
33
34
35GSDL_VC4 = 0
36LOCAL_LIBRARY = 0
37USE_Z3950 = 0
38DLL = 0
39DLLDEBUG = 0
40ENABLE_ACCENTFOLD = 1
41
42STLPATH = "$(PACKAGES_DIR)\windows\stlport\stlport"
43
44
45!IF $(GSDL_VC4)
46CPPFLAGS = -GX
47!ELSE
48CPPFLAGS = -EHsc
49!ENDIF
50
51!IF $(DLL)
52CPPFLAGS = $(CPPFLAGS) -MD
53!ELSE
54!IF ($(DLLDEBUG))
55CPPFLAGS = $(CPPFLAGS) -MDd
56!ENDIF
57!ENDIF
58
59!IF $(ENABLE_ACCENTFOLD)
60ACCENTFOLD_LIBS = "$(INDEXERS_DIR)\packages\unac\libunac.lib" "$(INDEXERS_DIR)\packages\unac\iconv.lib"
61!ELSE
62ACCENTFOLD_LIBS =
63!ENDIF
64
65!IF $(USE_Z3950)
66Z3950_DEFS = -DUSE_Z3950
67Z3950_INCLUDES = -I$(Z3950_DIR)
68Z3950_LIBS = $(Z3950_DIR)\gsdlz3950.lib $(PACKAGES_DIR)\yaz\yaz-2.1.4\lib\yaz.lib
69!ELSE
70Z3950_DEFS =
71Z3950_INCLUDES =
72Z3950_LIBS =
73!ENDIF
74
75
76AR = lib
77CC = cl
78DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE -DGSDL_NOCACHE $(Z3950_DEFS)
79INCLUDES = -I. -I"$(GSDL_DIR)" -I"$(GSDL_DIR)\lib" -I"$(COLSERVR_DIR)" -I"$(PROTOCOL_DIR)" \
80    -I"$(INDEXERS_DIR)\mg" -I"$(INDEXERS_DIR)\mg\lib" -I"$(INDEXERS_DIR)\mgpp\text" \
81    -I"$(PACKAGES_DIR)\windows\crypt\crypt" -I"$(PACKAGES_DIR)\windows\expat\expat" \
82    -I"$(PACKAGES_DIR)\windows\gdbm\gdbm" $(Z3950_INCLUDES)
83LDFLAGS =
84LIBS = "$(PACKAGES_DIR)\windows\crypt\crypt\crypt.lib" "$(PACKAGES_DIR)\windows\expat\expat\libexpat.lib" \
85        "$(PACKAGES_DIR)\windows\gdbm\gdbm\gdbm.lib" $(ACCENTFOLD_LIBS) $(Z3950_LIBS)
86
87!IF $(GSDL_VC4)
88DEFS = $(DEFS) -DGSDL_NAMESPACE_BROKEN -DGSDL_USE_IOS_H -D__STL_NO_NEW_IOSTREAMS
89INCLUDES = $(INCLUDES) -I$(STLPATH)
90!ENDIF
91!IF $(LOCAL_LIBRARY)
92DEFS = $(DEFS) -DGSDL_LOCAL_LIBRARY
93!ENDIF
94
95
96COMPILE = $(CC) -nologo -c $(CPPFLAGS) $(DEFS) $(INCLUDES)
97LINK = $(CC) -nologo -Fe"$@" $(LDFLAGS)
98
99
100.SUFFIXES:
101.SUFFIXES: .cpp .obj
102.cpp.obj:
103    $(COMPILE) $<
104
105
106SOURCES = \
107    action.cpp \
108    argdb.cpp \
109    authenaction.cpp \
110    browseaction.cpp \
111    browseactiontools.cpp \
112    browserclass.cpp \
113    browsetoolsclass.cpp \
114    cgiargs.cpp \
115    cgiutils.cpp \
116    cgiwrapper.cpp \
117    collectoraction.cpp \
118    configaction.cpp \
119        converter.cpp \
120    datelistbrowserclass.cpp \
121    depositoraction.cpp \
122    documentaction.cpp \
123    extlinkaction.cpp \
124    formattools.cpp \
125    gtiaction.cpp \
126    highlighttext.cpp \
127    historydb.cpp \
128    hlistbrowserclass.cpp \
129    htmlbrowserclass.cpp \
130    htmlutils.cpp \
131    invbrowserclass.cpp \
132    librarymain.cpp \
133    maincfg.cpp \
134    pageaction.cpp \
135    pagedbrowserclass.cpp \
136    phindaction.cpp \
137    phindbrowserclass.cpp \
138    pingaction.cpp \
139    queryaction.cpp \
140    querytools.cpp \
141    receptionist.cpp \
142    statusaction.cpp \
143    summarise.cpp \
144    tipaction.cpp \
145    userdb.cpp \
146    usersaction.cpp \
147    vlistbrowserclass.cpp \
148    wizardaction.cpp
149
150OBJECTS = \
151    action.obj \
152    argdb.obj \
153    authenaction.obj \
154    browseaction.obj \
155    browseactiontools.obj \
156    browserclass.obj \
157    browsetoolsclass.obj \
158    cgiargs.obj \
159    cgiutils.obj \
160    cgiwrapper.obj \
161    collectoraction.obj \
162    configaction.obj \
163        converter.obj \
164    datelistbrowserclass.obj \
165    depositoraction.obj \
166    documentaction.obj \
167    extlinkaction.obj \
168    formattools.obj \
169    gtiaction.obj \
170    highlighttext.obj \
171    historydb.obj \
172    hlistbrowserclass.obj \
173    htmlbrowserclass.obj \
174    htmlutils.obj \
175    invbrowserclass.obj \
176    librarymain.obj \
177    maincfg.obj \
178    pageaction.obj \
179    pagedbrowserclass.obj \
180    phindaction.obj \
181    phindbrowserclass.obj \
182    pingaction.obj \
183    queryaction.obj \
184    querytools.obj \
185    receptionist.obj \
186    statusaction.obj \
187    summarise.obj \
188    tipaction.obj \
189    userdb.obj \
190    usersaction.obj \
191    vlistbrowserclass.obj \
192    wizardaction.obj
193
194LIBRARY = gsdlrecpt.lib
195
196GSDL_LIBS = \
197    "$(PROTOCOL_DIR)\gsdlprotocol.lib" \
198    "$(COLSERVR_DIR)\gsdlcolservr.lib" \
199    "$(GSDL_DIR)\lib\gsdllib.lib" \
200    "$(INDEXERS_DIR)\mg\src\text\libmgtext.lib" \
201    "$(INDEXERS_DIR)\mg\lib\libmglib.lib" \
202    "$(INDEXERS_DIR)\mgpp\text\libmgpptext.lib" \
203    "$(INDEXERS_DIR)\mgpp\lib\libmgpplib.lib"
204
205EXECUTABLE_OBJECTS = \
206    $(OBJECTS) \
207    $(GSDL_LIBS)
208
209EXECUTABLE = library.exe
210
211
212# Default target: make gsdlrecpt.lib if LOCAL_LIBRARY is set, otherwise both gsdlrecpt.lib and library.exe
213!IF $(LOCAL_LIBRARY)
214all: $(LIBRARY)
215!ELSE
216all: $(LIBRARY) $(EXECUTABLE)
217!ENDIF
218
219gsdlrecpt.lib: $(OBJECTS)
220    if EXIST $(LIBRARY) del $(LIBRARY)
221    $(AR) -nologo /out:$(LIBRARY) $(OBJECTS)
222
223library.exe: $(EXECUTABLE_OBJECTS)
224    $(LINK) $(EXECUTABLE_OBJECTS) $(LIBS)
225
226!IF $(LOCAL_LIBRARY)
227install:
228!ELSE
229install: $(EXECUTABLE)
230    copy $(EXECUTABLE) "$(GSDL_DIR)\cgi-bin"
231!ENDIF
232
233clean:
234    del *.obj
235    del $(LIBRARY)
236    del $(EXECUTABLE)
237
238
239# Always recompile configaction and statusaction in case GSDL_LOCAL_LIBRARY has changed
240statusaction.obj: FORCE
241configaction.obj: FORCE
242
243FORCE:
Note: See TracBrowser for help on using the browser.