root/main/trunk/greenstone2/runtime-src/src/w32server/win32.mak @ 22080

Revision 22080, 5.6 KB (checked in by ak19, 10 years ago)

Undoing partial commit: accidentally committed windows makefiles along with the Linux makefiles which were the only ones I wanted to commit. Undoing commit because the changes are untested and only some changed files were committed.

  • Property svn:keywords set to Author Date Id Revision
Line 
1###########################################################################
2#
3# win32 makefile -- src/w32server
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
27GSDL_DIR = ..\..\..
28COMMON_DIR = $(GSDL_DIR)\common-src
29RUNTIME_DIR = $(GSDL_DIR)\runtime-src
30
31INDEXERS_DIR = $(COMMON_DIR)\indexers
32COMMON_PACKAGES_DIR = $(COMMON_DIR)\packages
33PACKAGES_DIR = $(RUNTIME_DIR)\packages
34COLSERVR_DIR = $(RUNTIME_DIR)\src\colservr
35PROTOCOL_DIR = $(RUNTIME_DIR)\src\protocol
36RECPT_DIR    = $(RUNTIME_DIR)\src\recpt
37
38
39GSDL_VC4 = 0
40DEBUG = 0
41ENABLE_ACCENTFOLD = 1
42USE_SQLITE = 1
43ENABLE_MG = 1
44ENABLE_MGPP = 1
45ENABLE_LUCENE = 1
46
47!IF $(DEBUG)
48CXXFLAGS = -DEBUG -Z7 /errorReport:prompt
49LDFLAGS = -DEBUG -Z7 /errorReport:prompt
50!ELSE
51CXXFLAGS =
52LDFLAGS =
53!ENDIF
54
55
56!IF $(GSDL_VC4)
57CXXFLAGS = $(CXXFLAGS) -GX
58!ELSE
59CXXFLAGS = $(CXXFLAGS) -EHsc
60!ENDIF
61
62!IF $(ENABLE_ACCENTFOLD)
63ACCENTFOLD_LIBS = "$(INDEXERS_DIR)\packages\unac\libunac.lib" "$(INDEXERS_DIR)\packages\windows\iconv\iconv\lib\iconv.lib"
64!ELSE
65ACCENTFOLD_LIBS =
66!ENDIF
67
68!IF $(USE_SQLITE)
69SQLITE_LIBS = "$(COMMON_PACKAGES_DIR)\sqlite\lib\sqlite3.lib"
70!ELSE
71SQLITE_LIBS =
72!ENDIF
73
74!IF $(ENABLE_MG)
75MG_DEFS = -DENABLE_MG
76MG_LIBS = "$(INDEXERS_DIR)\mg\src\text\libmgtext.lib" \
77    "$(INDEXERS_DIR)\mg\lib\libmglib.lib"
78MG_INCLUDES = -I"$(INDEXERS_DIR)\mg" -I"$(INDEXERS_DIR)\mg\lib" -I"$(INDEXERS_DIR)\mg\src\text"
79!ELSE
80MG_DEFS =
81MG_LIBS =
82MG_INCLUDES =
83!ENDIF
84
85!IF $(ENABLE_MGPP)
86MGPP_DEFS = -DENABLE_MGPP
87MGPP_LIBS = "$(INDEXERS_DIR)\mgpp\text\libmgpptext.lib" \
88    "$(INDEXERS_DIR)\mgpp\lib\libmgpplib.lib"
89MGPP_INCLUDES = -I"$(INDEXERS_DIR)\mgpp\lib" -I"$(INDEXERS_DIR)\mgpp\text"
90!ELSE
91MGPP_DEFS =
92MGPP_LIBS =
93MGPP_INCLUDES =
94!ENDIF
95
96!IF $(ENABLE_LUCENE)
97LUCENE_DEFS = -DENABLE_LUCENE
98!ELSE
99LUCENE_DEFS=
100!ENDIF
101
102AR = lib
103CC = cl
104DEFS = -D__WIN32__ -DHAVE_CONFIG_H -D_LITTLE_ENDIAN -DPARADOCNUM -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE \
105    $(MG_DEFS) $(MGPP_DEFS) $(LUCENE_DEFS)
106INCLUDES = -I"$(GSDL_DIR)" -I"$(COMMON_DIR)\src\lib" -I"$(COLSERVR_DIR)" -I"$(PROTOCOL_DIR)" -I"$(RECPT_DIR)" \
107    -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3" -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3\windows" \
108    -I"$(COLSERVR_DIR)" \
109    $(MG_INCLUDES) \
110        $(MGPP_INCLUDES)
111
112LIBS = "$(COMMON_PACKAGES_DIR)\windows\crypt\crypt\crypt.lib" "$(COMMON_PACKAGES_DIR)\windows\expat\expat\libexpat.lib" \
113        "$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3\gdbm.lib" $(ACCENTFOLD_LIBS) $(SQLITE_LIBS)
114RSC = rc
115WINLIBS = kernel32.lib user32.lib gdi32.lib winspool.lib \
116          comdlg32.lib advapi32.lib shell32.lib ole32.lib \
117          oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
118#wsock32.lib
119
120
121!IF $(GSDL_VC4)
122DEFS = $(DEFS) -DGSDL_NAMESPACE_BROKEN -DGSDL_USE_IOS_H -D__STL_NO_NEW_IOSTREAMS
123INCLUDES = $(INCLUDES) -I"$(COMMON_PACKAGES_DIR)\windows\stlport\stlport"
124!ENDIF
125
126
127COMPILE = $(CC) -nologo -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
128LINK = $(CC) -nologo $(LDFLAGS) -Fe"$@"
129
130
131.SUFFIXES:
132.SUFFIXES: .cpp .obj
133.cpp.obj:
134    $(COMPILE) $<
135
136
137SOURCES = \
138    cgiwrapper.cpp \
139    conftools.cpp \
140    d_winsock.cpp \
141    fnord.cpp \
142    httpreq.cpp \
143    httpsend.cpp \
144        httpsrv.cpp \
145    locate.cpp \
146    netio.cpp \
147    parse.cpp \
148    settings.cpp \
149    startbrowser.cpp \
150    wincgiutils.cpp
151
152OBJECTS = \
153    cgiwrapper.obj \
154    conftools.obj \
155    d_winsock.obj \
156    fnord.obj \
157    httpreq.obj \
158    httpsend.obj \
159        httpsrv.obj \
160    locate.obj \
161    netio.obj \
162    parse.obj \
163    settings.obj \
164    startbrowser.obj \
165    wincgiutils.obj
166
167RESOURCES = \
168    server.res
169
170GSDL_LIBS = \
171    "$(RECPT_DIR)\gsdlrecpt.lib" \
172    "$(PROTOCOL_DIR)\gsdlprotocol.lib" \
173    "$(COLSERVR_DIR)\gsdlcolservr.lib" \
174    $(MG_LIBS) \
175    $(MGPP_LIBS) \
176    "$(COMMON_DIR)\src\lib\gsdllib.lib"
177
178EXECUTABLE_OBJECTS = \
179    $(OBJECTS) \
180    $(RESOURCES) \
181    $(GSDL_LIBS)
182
183EXECUTABLE = server.exe
184
185
186# Default target: make the local library executable
187all: $(EXECUTABLE)
188
189server.exe: $(EXECUTABLE_OBJECTS)
190    $(LINK) $(EXECUTABLE_OBJECTS) $(LIBS) $(WINLIBS)
191install:
192    copy $(EXECUTABLE) "$(GSDL_DIR)"
193
194clean:
195    del *.obj
196    del $(EXECUTABLE)
197    if exist *.pdb del *.pdb
198
199# Resources stuff
200SOURCE = "$(RUNTIME_DIR)\src\w32server\newgsdl.bmp"
201SOURCE = "$(RUNTIME_DIR)\src\w32server\resource.h"
202SOURCE = "$(RUNTIME_DIR)\src\w32server\server.ico"
203SOURCE = "$(RUNTIME_DIR)\src\w32server\gsdlcol.bmp"
204SOURCE = "$(RUNTIME_DIR)\src\w32server\server.rc"
205DEP_RSC_SERVE=\
206    "$(RUNTIME_DIR)\src\w32server\gsdlcol.bmp"\
207    "$(RUNTIME_DIR)\src\w32server\newgsdl.bmp"\
208    "$(RUNTIME_DIR)\src\w32server\server.ico"
209
210server.res : $(SOURCE) $(DEP_RSC_SERVE) "$(RUNTIME_DIR)\src\w32server"
211   $(RSC) /l 0x409 /fo"$(RUNTIME_DIR)\src\w32server\server.res" /i "$(RUNTIME_DIR)\src\w32server" \
212 /i "$(VCINSTALLDIR)/include/mfc" /d "NDEBUG" $(SOURCE)
213
214"$(RUNTIME_DIR)\src\w32server\server.res" : $(SOURCE) $(DEP_RSC_SERVE) "$(RUNTIME_DIR)\src\w32server"
215   $(RSC) /l 0x409 /fo"$(RUNTIME_DIR)\src\w32server\server.res" /i "$(RUNTIME_DIR)\src\w32server" \
216 /d "NDEBUG" $(SOURCE)
Note: See TracBrowser for help on using the browser.